Skip to content

Commit aaff721

Browse files
author
Sylvain MARIE
committed
Fixed test for python 3.6
1 parent 71c3c7d commit aaff721

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pyfields/tests/issues/test_issue_73.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
def test_self_referenced_class(str_hint, fix_in_class_field):
1111
"""Fix https://github.com/smarie/python-pyfields/issues/73 """
1212
if str_hint:
13-
# this is the old behaviour that happens even when PEP563 is not enabled at the top of the module
13+
# this is the old behaviour that happens when PEP563 is not enabled at the top of the module
1414
from ._test_py36 import test_issue_73
1515
Foo = test_issue_73()
1616
else:
1717
# this is the new behaviour that happens when PEP563 is enabled at the top of the module
18+
if sys.version_info < (3, 7):
19+
pytest.skip("python 3.6 does not support PEP563")
1820
from ._test_py36_pep563 import test_issue_73
1921
Foo = test_issue_73()
2022

@@ -40,9 +42,13 @@ def test_self_referenced_class(str_hint, fix_in_class_field):
4042
@pytest.mark.parametrize('fix_in_class_field', [False, True], ids="fix_in_class_field={}".format)
4143
def test_cross_referenced_class(str_hint, fix_in_class_field):
4244
if str_hint:
45+
# this is the old behaviour that happens when PEP563 is not enabled at the top of the module
4346
from ._test_py36 import test_issue_73_cross_ref
4447
A, B = test_issue_73_cross_ref()
4548
else:
49+
# this is the new behaviour that happens when PEP563 is enabled at the top of the module
50+
if sys.version_info < (3, 7):
51+
pytest.skip("python 3.6 does not support PEP563")
4652
from ._test_py36_pep563 import test_issue_73_cross_ref
4753
A, B = test_issue_73_cross_ref()
4854

0 commit comments

Comments
 (0)