From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 11 Dec 2023 19:00:45 +0000 (+0100) Subject: [3.12] gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108... X-Git-Tag: v3.12.2~340 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac8adf97c40b9869d1db0e02cf07b9d83e24da41;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108) (#112976) gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108) (cherry picked from commit 0738b9a338fd27ff2d4456dd9c15801a8858ffd9) Co-authored-by: Nikita Sobolev --- diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 67904cf42566..0e38e483dc28 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -406,9 +406,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): diff --git a/Lib/test/double_const.py b/Lib/test/test_import/data/double_const.py similarity index 100% rename from Lib/test/double_const.py rename to Lib/test/test_import/data/double_const.py