summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/execfile.py2
-rw-r--r--tests/test_arcs.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/coverage/execfile.py b/coverage/execfile.py
index ffe3ca18..9502778b 100644
--- a/coverage/execfile.py
+++ b/coverage/execfile.py
@@ -255,7 +255,7 @@ def make_code_from_pyc(filename):
raise NoCode("Bad magic number in .pyc file")
date_based = True
- if sys.version_info >= (3, 7):
+ if sys.version_info > (3, 7, 0, 'alpha', 2):
flags = struct.unpack('<L', fpyc.read(4))[0]
hash_based = flags & 0x01
if hash_based:
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index 2111c9bc..ef71ea16 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -1123,7 +1123,7 @@ class OptimizedIfTest(CoverageTest):
arcz=".1 12 24 41 26 61 1.",
)
# Before 3.7, no Python optimized away "if not __debug__:"
- if env.PYVERSION < (3, 7):
+ if env.PYVERSION < (3, 7, 0, 'alpha', 4):
arcz = ".1 12 23 31 34 41 26 61 1."
arcz_missing = "34 41"
else: