Skip to content

Commit

Permalink
Merge pull request #192 from eerovaher/rm-tests-old-versioncheck
Browse files Browse the repository at this point in the history
Remove an obsolete version check from tests
  • Loading branch information
pllim authored Oct 10, 2022
2 parents ef0a3e1 + ae46cac commit a9c99ae
Showing 1 changed file with 28 additions and 30 deletions.
58 changes: 28 additions & 30 deletions tests/test_doctestplus.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import glob
import os
from packaging.version import Version
from textwrap import dedent
import sys

Expand Down Expand Up @@ -676,35 +675,34 @@ def f():
).assertoutcome(passed=2)


if Version('4.3.0') <= Version(pytest.__version__):
def test_ignore_glob_option(testdir):
testdir.makepyfile(foo="""
def f():
'''
>>> 1+1
2
'''
pass
""")
testdir.makepyfile(bar="""
def f():
'''
>>> 1+1
2
'''
pass
""")
testdir.makefile('.rst', foo='>>> 1+1\n2')

testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', 'foo*'
).assertoutcome(passed=1)
testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', 'bar*'
).assertoutcome(passed=2)
testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', '*.rst'
).assertoutcome(passed=2)
def test_ignore_glob_option(testdir):
testdir.makepyfile(foo="""
def f():
'''
>>> 1+1
2
'''
pass
""")
testdir.makepyfile(bar="""
def f():
'''
>>> 1+1
2
'''
pass
""")
testdir.makefile('.rst', foo='>>> 1+1\n2')

testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', 'foo*'
).assertoutcome(passed=1)
testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', 'bar*'
).assertoutcome(passed=2)
testdir.inline_run(
'--doctest-plus', '--doctest-rst', '--ignore-glob', '*.rst'
).assertoutcome(passed=2)


def test_doctest_only(testdir, makepyfile, maketestfile, makerstfile):
Expand Down

0 comments on commit a9c99ae

Please sign in to comment.