mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-45668: Fix PGO tests without test extensions (GH-29315)
This commit is contained in:
parent
762a4dc936
commit
e73283a20f
13 changed files with 60 additions and 28 deletions
|
@ -8,6 +8,7 @@ import time
|
|||
import unittest
|
||||
|
||||
from test import support
|
||||
from test.support import import_helper
|
||||
from test.test_grammar import (VALID_UNDERSCORE_LITERALS,
|
||||
INVALID_UNDERSCORE_LITERALS)
|
||||
from math import isinf, isnan, copysign, ldexp
|
||||
|
@ -714,7 +715,7 @@ class IEEEFormatTestCase(unittest.TestCase):
|
|||
|
||||
@support.requires_IEEE_754
|
||||
def test_serialized_float_rounding(self):
|
||||
from _testcapi import FLT_MAX
|
||||
FLT_MAX = import_helper.import_module('_testcapi').FLT_MAX
|
||||
self.assertEqual(struct.pack("<f", 3.40282356e38), struct.pack("<f", FLT_MAX))
|
||||
self.assertEqual(struct.pack("<f", -3.40282356e38), struct.pack("<f", -FLT_MAX))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue