File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66"""
77import unittest
88import test .support
9- from test .support import run_unittest , TESTFN , EnvironmentVarGuard
10- from test .support import captured_stderr
9+ from test .support import captured_stderr , TESTFN , EnvironmentVarGuard
1110import builtins
1211import os
1312import sys
1918import sysconfig
2019from copy import copy
2120
22- # Need to make sure to not import 'site' if someone specified ``-S`` at the
23- # command-line. Detect this by just making sure 'site' has not been imported
24- # already .
25- if "site" in sys .modules :
26- import site
27- else :
28- raise unittest . SkipTest ( "importation of site.py suppressed" )
21+ # These tests are not particularly useful if Python was invoked with -S.
22+ # If you add tests that are useful under -S, this skip should be moved
23+ # to the class level .
24+ if sys .flags . no_site :
25+ raise unittest . SkipTest ( "Python was invoked with -S" )
26+
27+ import site
2928
3029if site .ENABLE_USER_SITE and not os .path .isdir (site .USER_SITE ):
3130 # need to add user site directory for tests
Original file line number Diff line number Diff line change 130130Tests
131131-----
132132
133+ - Issue #19828: Fixed test_site when the whole suite is run with -S.
134+
133135- Issue #19928: Implemented a test for repr() of cell objects.
134136
135137- Issue #19535: Fixed test_docxmlrpc when python is run with -OO.
You can’t perform that action at this time.
0 commit comments