]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-108303: Move `double_const` to `test_import` where it belongs (#112108)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 11 Dec 2023 18:29:43 +0000 (21:29 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2023 18:29:43 +0000 (19:29 +0100)
Lib/test/test_import/__init__.py
Lib/test/test_import/data/double_const.py [moved from Lib/test/double_const.py with 100% similarity]

index 1ecac4f37fe1c1cdc5e62b67af5d28c73364b8d5..bbfbb57b1d82996af49411369f4d6c4490183390 100644 (file)
@@ -409,9 +409,12 @@ class ImportTests(unittest.TestCase):
             import RAnDoM
 
     def test_double_const(self):
-        # Another brief digression to test the accuracy of manifest float
-        # constants.
-        from test import double_const  # don't blink -- that *was* the test
+        # Importing double_const checks that float constants
+        # serialiazed by marshal as PYC files don't lose precision
+        # (SF bug 422177).
+        from test.test_import.data import double_const
+        unload('test.test_import.data.double_const')
+        from test.test_import.data import double_const
 
     def test_import(self):
         def test_with_extension(ext):