tests/run-tests: Run CPYTHON3 with -S flag.
S is "don't imply 'import site' on initialization". This avoids sys.path
minipulation and possibility of importing any module outside CPython
standard library. This is required for clean-room testing, as CPython
installtion may have user modules named "uio", "utime", etc.
@@ -430,7 +430,7 @@ def run_tests(pyb, tests, args, base_path="."):
else:
# run CPython to work out expected output
try:
- output_expected = subprocess.check_output([CPYTHON3, '-B', test_file])
+ output_expected = subprocess.check_output([CPYTHON3, '-S', '-B', test_file])
if args.write_exp:
with open(test_file_expected, 'wb') as f:
f.write(output_expected)
