Merge 3.5 (test_site)

This commit is contained in:
Victor Stinner 2016-03-14 17:47:30 +01:00
commit 3719779765
1 changed files with 7 additions and 2 deletions

View File

@ -28,8 +28,13 @@ import site
if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
# need to add user site directory for tests
os.makedirs(site.USER_SITE)
site.addsitedir(site.USER_SITE)
try:
os.makedirs(site.USER_SITE)
site.addsitedir(site.USER_SITE)
except PermissionError as exc:
raise unittest.SkipTest('unable to create user site directory (%r): %s'
% (site.USER_SITE, exc))
class HelperFunctionsTests(unittest.TestCase):
"""Tests for helper functions.