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 2a2bc82 commit 7ac94fcCopy full SHA for 7ac94fc
Lib/test/test_site.py
@@ -855,12 +855,15 @@ def get_excepted_output(self, *args):
855
return 10, None
856
857
def invoke_command_line(self, *args):
858
- args = ["-m", "site", *args]
+ cmd_args = []
859
+ if sys.flags.no_user_site:
860
+ cmd_args.append("-s")
861
+ cmd_args.extend(["-m", "site", *args])
862
863
with EnvironmentVarGuard() as env:
864
env["PYTHONUTF8"] = "1"
865
env["PYTHONIOENCODING"] = "utf-8"
- proc = spawn_python(*args, text=True, env=env,
866
+ proc = spawn_python(*cmd_args, text=True, env=env,
867
encoding='utf-8', errors='replace')
868
869
output = kill_python(proc)
0 commit comments