Skip to content

Commit

Permalink
Make sure scons_subproc_run test also passes on py3.6
Browse files Browse the repository at this point in the history
Signed-off-by: Mats Wichmann <[email protected]>
  • Loading branch information
mwichmann committed Oct 4, 2023
1 parent 964d74a commit bbe8226
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SCons/ActionTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2349,6 +2349,9 @@ def mock_subprocess_run(*args, **kwargs):
@mock.patch("subprocess.run", mock_subprocess_run)
def test_scons_subproc_run(self):
"""Test the argument remapping options."""
# set phony Python versions to trigger the logic in scons_subproc_run:
# any version greater than 3.6, really
save_info, sys.version_info = sys.version_info, (3, 11, 1)
env = Environment()
self.assertEqual(scons_subproc_run(env), {"check": False})
with self.subTest():
Expand All @@ -2368,7 +2371,7 @@ def test_scons_subproc_run(self):
)

# 3.6:
save_info, sys.version_info = sys.version_info, (3, 6, 2)
sys.version_info = (3, 6, 2)
with self.subTest():
self.assertEqual(
scons_subproc_run(env, capture_output=True),
Expand Down

0 comments on commit bbe8226

Please sign in to comment.