Skip to content

Remove __cleanenv from PEP-657 tests #27060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def f():
assert f.__code__.co_endlinetable is None
assert f.__code__.co_columntable is None
""")
assert_python_ok('-X', 'no_debug_ranges', '-c', code, __cleanenv=True)
assert_python_ok('-X', 'no_debug_ranges', '-c', code)

def test_endline_and_columntable_none_when_no_debug_ranges_env(self):
# Same as above but using the environment variable opt out.
Expand All @@ -395,7 +395,7 @@ def f():
assert f.__code__.co_endlinetable is None
assert f.__code__.co_columntable is None
""")
assert_python_ok('-c', code, PYTHONNODEBUGRANGES='1', __cleanenv=True)
assert_python_ok('-c', code, PYTHONNODEBUGRANGES='1')

# co_positions behavior when info is missing.

Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ def test_no_columntable_and_endlinetable_with_no_debug_ranges(self):
marshal.dump(co, f)

assert_python_ok('-X', 'no_debug_ranges',
'-c', code, os_helper.TESTFN,
__cleanenv=True)
'-c', code, os_helper.TESTFN)
finally:
os_helper.unlink(os_helper.TESTFN)

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_no_caret_with_no_debug_ranges_flag(self):
f.write("x = 1 / 0\n")

_, _, stderr = assert_python_failure(
'-X', 'no_debug_ranges', TESTFN, __cleanenv=True)
'-X', 'no_debug_ranges', TESTFN)

lines = stderr.splitlines()
self.assertEqual(len(lines), 4)
Expand All @@ -108,7 +108,7 @@ def test_no_caret_with_no_debug_ranges_flag_python_traceback(self):
f.write(code)

_, _, stderr = assert_python_ok(
'-X', 'no_debug_ranges', TESTFN, __cleanenv=True)
'-X', 'no_debug_ranges', TESTFN)

lines = stderr.splitlines()
self.assertEqual(len(lines), 4)
Expand Down