Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-108303: Move double_const to test_import where it belongs #112108

Merged
merged 6 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
13 changes: 8 additions & 5 deletions Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,6 @@ def test_case_sensitivity(self):
with self.assertRaises(ImportError):
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

def test_import(self):
def test_with_extension(ext):
# The extension is normally ".py", perhaps ".pyw".
Expand Down Expand Up @@ -877,6 +872,14 @@ def test_pyc_always_writable(self):
m = __import__(name)
self.assertEqual(m.x, 'rewritten')

def test_double_const(self):
sobolevn marked this conversation as resolved.
Show resolved Hide resolved
# 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
brettcannon marked this conversation as resolved.
Show resolved Hide resolved


class PycRewritingTests(unittest.TestCase):
# Test that the `co_filename` attribute on code objects always points
Expand Down
File renamed without changes.
Loading