Skip to content

Commit

Permalink
Check -s for usercustomize
Browse files Browse the repository at this point in the history
  • Loading branch information
csm10495 committed Sep 15, 2023
1 parent c9145ea commit e442411
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Lib/test/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,15 @@ def test_customization_modules_on_startup(self):
output = subprocess.check_output(f'{sys.executable} -c ""')
self.assertIn(eyecatcher, output.decode('utf-8'))

# -S blocks any site-packages
output = subprocess.check_output(f'{sys.executable} -S -c ""')
self.assertNotIn(eyecatcher, output.decode('utf-8'))

# -s blocks user site-packages
if 'usercustomize' == module_name:
output = subprocess.check_output(f'{sys.executable} -s -c ""')
self.assertNotIn(eyecatcher, output.decode('utf-8'))

@unittest.skipUnless(hasattr(urllib.request, "HTTPSHandler"),
'need SSL support to download license')
@test.support.requires_resource('network')
Expand Down

0 comments on commit e442411

Please sign in to comment.