[3.11] gh-108303: Move more files to Lib/test/test_module (GH-111880) (#111892)

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

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-11-09 16:10:26 +01:00 committed by GitHub
parent 409a0ac8e5
commit 3e7e39c977
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -268,7 +268,7 @@ a = A(destroyed)"""
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), {

View file

@ -3,7 +3,7 @@ Fodder for module finalization tests in test_module.
"""
import shutil
import test.final_b
import test.test_module.final_b
x = 'a'
@ -11,7 +11,7 @@ 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))

View file

@ -3,7 +3,7 @@ Fodder for module finalization tests in test_module.
"""
import shutil
import test.final_a
import test.test_module.final_a
x = 'b'
@ -11,7 +11,7 @@ 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))