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 f09a6a2 commit 9fb32ebCopy full SHA for 9fb32eb
Lib/test/test_site.py
@@ -836,12 +836,15 @@ def get_excepted_output(self, *args):
836
return 10, None
837
838
def invoke_command_line(self, *args):
839
- args = ["-m", "site", *args]
+ cmd_args = []
840
+ if sys.flags.no_user_site:
841
+ cmd_args.append("-s")
842
+ cmd_args.extend(["-m", "site", *args])
843
844
with EnvironmentVarGuard() as env:
845
env["PYTHONUTF8"] = "1"
846
env["PYTHONIOENCODING"] = "utf-8"
- proc = spawn_python(*args, text=True, env=env,
847
+ proc = spawn_python(*cmd_args, text=True, env=env,
848
encoding='utf-8', errors='replace')
849
850
output = kill_python(proc)
0 commit comments