Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove an obsolete version check from tests #192

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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