Skip to content

Commit 55f1d60

Browse files
committed
Python 3.7 can't count
1 parent 880bb71 commit 55f1d60

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

tests/demo_code.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# stdlib
22
import sys
3+
import platform
34

45
if sys.version_info < (3, 8): # pragma: no cover (py38+)
56
pass
@@ -8,8 +9,6 @@
89
else: # pragma: no cover (<py38)
910
pass
1011

11-
import platform
12-
1312
if platform.processor() != "x86_64": # pragma: no cover
1413
pass
1514

tests/test_grammar.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,17 @@ def test_grammar_current_platform_etc():
8080
assert evaluate_exclude(f"{platform.system()}")
8181

8282

83-
@pytest.mark.parametrize("expression, exception", [
84-
("36", ParseBaseException),
85-
("36 and", ParseBaseException),
86-
("py36 and", ParseBaseException),
87-
("windows and", ParseBaseException),
88-
("!bpython and pypy", ParseBaseException),
89-
("<py38+", SyntaxError),
90-
])
83+
@pytest.mark.parametrize(
84+
"expression, exception",
85+
[
86+
("36", ParseBaseException),
87+
("36 and", ParseBaseException),
88+
("py36 and", ParseBaseException),
89+
("windows and", ParseBaseException),
90+
("!bpython and pypy", ParseBaseException),
91+
("<py38+", SyntaxError),
92+
]
93+
)
9194
def test_bad_grammar(expression: str, exception: Type[Exception]):
9295
with pytest.raises(exception):
9396
evaluate_exclude(expression)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Name Stmts Miss Cover
22
----------------------------------------
3-
tests/demo_code.py 3 0 100%
3+
tests/demo_code.py 4 0 100%
44
----------------------------------------
5-
TOTAL 3 0 100%
5+
TOTAL 4 0 100%

0 commit comments

Comments
 (0)