Skip to content

Commit 877c89a

Browse files
committed
Some type inference tests don't work on 3.7 or below.
1 parent 23ea6be commit 877c89a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typed_python/compiler/tests/type_inference_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def f(x: OneOf(None, str)):
411411

412412
assert f("hi")['x'] == str
413413

414-
@pytest.mark.skipif('sys.platform=="darwin"')
414+
@pytest.mark.skipif("sys.version_info.minor < 8")
415415
def test_assertion_prunes_types(self):
416416
@Entrypoint
417417
def f(x: OneOf(None, str)):
@@ -422,7 +422,7 @@ def f(x: OneOf(None, str)):
422422
assert f.resultTypeFor(str).typeRepresentation is str
423423
assert f.resultTypeFor(type(None)).typeRepresentation is str
424424

425-
@pytest.mark.skipif('sys.platform=="darwin"')
425+
@pytest.mark.skipif("sys.version_info.minor < 8")
426426
def test_branch_with_raise_prunes_types(self):
427427
@Entrypoint
428428
def f(x: OneOf(None, str)):

0 commit comments

Comments
 (0)