Skip to content

Commit 6c79660

Browse files
committed
Skip test_modules.py if Python version < 3.10 (#279)
- MkDocs-Test incompatible with earlier versions
1 parent cec7440 commit 6c79660

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from super_collections import SuperDict
1414
from mkdocs_test import DocProject, MkDocsPage
15-
15+
import os
1616

1717
class MacrosPage(MkDocsPage):
1818
"Specific for MkDocs-Macros"

test/test_modules.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
"""
44

55
import os
6+
import sys
7+
8+
if sys.version_info < (3, 10):
9+
print("Skipping MkDocs-Test tests: Python 3.10+ required.")
10+
sys.exit(0)
11+
612
import pytest
713

814
from .fixture import MacrosDocProject

0 commit comments

Comments
 (0)