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 231552c commit e69fb20Copy full SHA for e69fb20
Lib/test/test_site.py
@@ -846,12 +846,15 @@ def get_excepted_output(self, *args):
846
return 10, None
847
848
def invoke_command_line(self, *args):
849
- args = ["-m", "site", *args]
+ cmd_args = []
850
+ if sys.flags.no_user_site:
851
+ cmd_args.append("-s")
852
+ cmd_args.extend(["-m", "site", *args])
853
854
with EnvironmentVarGuard() as env:
855
env["PYTHONUTF8"] = "1"
856
env["PYTHONIOENCODING"] = "utf-8"
- proc = spawn_python(*args, text=True, env=env,
857
+ proc = spawn_python(*cmd_args, text=True, env=env,
858
encoding='utf-8', errors='replace')
859
860
output = kill_python(proc)
0 commit comments