Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
339f260
gh-108927: Do not remove tested modules from sys.modules
serhiy-storchaka Sep 5, 2023
e52be9b
Update NEWS entry.
serhiy-storchaka Sep 5, 2023
68c014e
Fix unloading the newly imported modules after testing.
serhiy-storchaka Sep 6, 2023
c1ad70c
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Sep 12, 2023
3f25ab4
Add tests.
serhiy-storchaka Sep 12, 2023
7673248
Update Misc/NEWS.d/next/Tests/2023-09-05-20-46-35.gh-issue-108927.Tpw…
serhiy-storchaka Sep 12, 2023
5df4c8b
Move save/unload modules down in single.py.
serhiy-storchaka Sep 13, 2023
eb7766b
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Sep 13, 2023
0eae535
Refactoring.
serhiy-storchaka Sep 13, 2023
66437b5
Remove also attributes from parent modules.
serhiy-storchaka Sep 13, 2023
8470b33
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Oct 14, 2023
544c068
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Nov 27, 2023
1e7ea34
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Nov 28, 2023
56621ab
Only unload modules if run tests sequentially.
serhiy-storchaka Nov 28, 2023
ba5597a
Apply suggestions from code review
serhiy-storchaka Dec 1, 2023
d025e22
Merge branch 'main' into regretest-no-remove-test-module
serhiy-storchaka Dec 4, 2023
1aae341
Add a comment.
serhiy-storchaka Dec 4, 2023
017f01d
Test that test modules are really unloaded.
serhiy-storchaka Dec 4, 2023
5086405
Merge remote-tracking branch 'refs/remotes/origin/regretest-no-remove…
serhiy-storchaka Dec 4, 2023
b3ea8fa
Update Lib/test/test_regrtest.py
serhiy-storchaka Dec 4, 2023
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
Prev Previous commit
Next Next commit
Merge branch 'main' into regretest-no-remove-test-module
  • Loading branch information
serhiy-storchaka committed Sep 13, 2023
commit eb7766baa4956dd1f4d7a7c6c0740bc0f4127b05
21 changes: 21 additions & 0 deletions Lib/test/test_regrtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1870,6 +1870,27 @@ def test_random_seed(self):
def test_random_seed_workers(self):
self._check_random_seed(run_workers=True)

def test_python_command(self):
code = textwrap.dedent(r"""
import sys
import unittest

class WorkerTests(unittest.TestCase):
def test_dev_mode(self):
self.assertTrue(sys.flags.dev_mode)
""")
tests = [self.create_test(code=code) for _ in range(3)]

# Custom Python command: "python -X dev"
python_cmd = [sys.executable, '-X', 'dev']
# test.libregrtest.cmdline uses shlex.split() to parse the Python
# command line string
python_cmd = shlex.join(python_cmd)

output = self.run_tests("--python", python_cmd, "-j0", *tests)
self.check_executed_tests(output, tests,
stats=len(tests), parallel=True)

def test_import_from_tests(self):
Comment thread
serhiy-storchaka marked this conversation as resolved.
Outdated
testdir = os.path.join(os.path.dirname(__file__),
'regrtestdata', 'import_from_tests')
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.