We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 534939e commit aaf2b0aCopy full SHA for aaf2b0a
Lib/test/support/__init__.py
@@ -519,7 +519,6 @@ def dec(*args, **kwargs):
519
SOCK_MAX_SIZE = 16 * 1024 * 1024 + 1
520
521
def _have_ieee_doubles():
522
- import ctypes
523
import math
524
# Check parameters for encoding of floats; a quick exit
525
# if they aren't same as for IEC 60559 doubles. Check
@@ -534,6 +533,10 @@ def _have_ieee_doubles():
534
533
or sys.float_info.max_10_exp != 308
535
or not math.issubnormal(math.nextafter(0, 1))):
536
return False
+ try:
537
+ import ctypes
538
+ except ImportError:
539
+ return True
540
# We attempt to determine if this machine is using IEC
541
# floating-point formats by peering at the bits of some
542
# carefully chosen value. Assume that integer and
0 commit comments