Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c0f0c5 commit 21d0e1bCopy full SHA for 21d0e1b
1 file changed
Lib/test/test_site.py
@@ -28,8 +28,13 @@
28
29
if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
30
# need to add user site directory for tests
31
- os.makedirs(site.USER_SITE)
32
- site.addsitedir(site.USER_SITE)
+ try:
+ os.makedirs(site.USER_SITE)
33
+ site.addsitedir(site.USER_SITE)
34
+ except PermissionError as exc:
35
+ raise unittest.SkipTest('unable to create user site directory (%r): %s'
36
+ % (site.USER_SITE, exc))
37
+
38
39
class HelperFunctionsTests(unittest.TestCase):
40
"""Tests for helper functions.
0 commit comments