Skip to content

Commit

Permalink
[3.11] gh-108303: Move more files to Lib/test/test_module (GH-111880)…
Browse files Browse the repository at this point in the history
… (#111892)

gh-108303: Move more files to `Lib/test/test_module` (GH-111880)
(cherry picked from commit 0c42f73)

Co-authored-by: Nikita Sobolev <[email protected]>
  • Loading branch information
miss-islington and sobolevn authored Nov 9, 2023
1 parent 409a0ac commit 3e7e39c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,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

0 comments on commit 3e7e39c

Please sign in to comment.