Skip to content

Commit a8b7229

Browse files
authored
Merge pull request #90 from nschloe/sys
import sys
2 parents b2bab38 + 11ce3e8 commit a8b7229

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/pytest_codeblocks/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.16.0"
1+
__version__ = "0.16.1"

src/pytest_codeblocks/plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ def collect(self):
4141
out.obj = block
4242

4343
for mark in block.marks:
44+
# A common thing is
45+
#
46+
# pytest.mark.skipif(sys.version_info < (3, 10), reason="...")
47+
#
48+
# which needs sys. Import it here.
49+
import sys
50+
4451
out.add_marker(eval(mark))
4552

4653
yield out

0 commit comments

Comments
 (0)