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 d351827 commit ec8d6c2Copy full SHA for ec8d6c2
1 file changed
Lib/test/test_site.py
@@ -26,8 +26,13 @@
26
27
if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
28
# need to add user site directory for tests
29
- os.makedirs(site.USER_SITE)
30
- site.addsitedir(site.USER_SITE)
+ try:
+ os.makedirs(site.USER_SITE)
31
+ site.addsitedir(site.USER_SITE)
32
+ except OSError as exc:
33
+ raise unittest.SkipTest('unable to create user site directory (%r): %s'
34
+ % (site.USER_SITE, exc))
35
+
36
37
class HelperFunctionsTests(unittest.TestCase):
38
"""Tests for helper functions.
0 commit comments