Skip to content
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
gh-108303: Move more files to Lib/test/test_module (GH-111880)
(cherry picked from commit 0c42f73)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
sobolevn authored and miss-islington committed Nov 9, 2023
commit ecceb5f4143ea2c9a292db2f780ab5e3ec2a2a85
2 changes: 1 addition & 1 deletion Lib/test/test_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def test_module_repr_source(self):

def test_module_finalization_at_shutdown(self):
# Module globals and builtins should still be available during shutdown
rc, out, err = assert_python_ok("-c", "from test import final_a")
rc, out, err = assert_python_ok("-c", "from test.test_module import final_a")
self.assertFalse(err)
lines = out.splitlines()
self.assertEqual(set(lines), {
Expand Down
4 changes: 2 additions & 2 deletions Lib/test/final_a.py → Lib/test/test_module/final_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"""

import shutil
import test.final_b
import test.test_module.final_b

x = 'a'

class C:
def __del__(self):
# Inspect module globals and builtins
print("x =", x)
print("final_b.x =", test.final_b.x)
print("final_b.x =", test.test_module.final_b.x)
print("shutil.rmtree =", getattr(shutil.rmtree, '__name__', None))
print("len =", getattr(len, '__name__', None))

Expand Down
4 changes: 2 additions & 2 deletions Lib/test/final_b.py → Lib/test/test_module/final_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"""

import shutil
import test.final_a
import test.test_module.final_a

x = 'b'

class C:
def __del__(self):
# Inspect module globals and builtins
print("x =", x)
print("final_a.x =", test.final_a.x)
print("final_a.x =", test.test_module.final_a.x)
print("shutil.rmtree =", getattr(shutil.rmtree, '__name__', None))
print("len =", getattr(len, '__name__', None))

Expand Down