using @pytest.mark.parametrize instead of calling one test many times from another as suggested by @nicoddemus in pr #1754
This commit is contained in:
parent
ec7695e15d
commit
e229a27e8b
|
@ -804,7 +804,8 @@ class TestDoctestReportingOption:
|
|||
""")
|
||||
return testdir.runpytest("--doctest-modules", "--doctest-report", format)
|
||||
|
||||
def test_doctest_report_udiff(self, testdir, format='udiff'):
|
||||
@pytest.mark.parametrize('format', ['udiff', 'UDIFF', 'uDiFf'])
|
||||
def test_doctest_report_udiff(self, testdir, format):
|
||||
result = self._run_doctest_report(testdir, format)
|
||||
result.stdout.fnmatch_lines([
|
||||
' 0 1 4',
|
||||
|
@ -855,10 +856,6 @@ class TestDoctestReportingOption:
|
|||
' 2 3 6',
|
||||
])
|
||||
|
||||
def test_doctest_report_case_insensitive(self, testdir):
|
||||
for format in 'udiff', 'UDIFF', 'uDiFf':
|
||||
self.test_doctest_report_udiff(testdir, format)
|
||||
|
||||
def test_doctest_report_invalid(self, testdir):
|
||||
result = self._run_doctest_report(testdir, 'obviously_invalid_format')
|
||||
result.stderr.fnmatch_lines([
|
||||
|
|
Loading…
Reference in New Issue