mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 11:14:38 +08:00
Use shared doctest checker
This commit is contained in:
1 parent
c52edc3593
commit
1551db16d7
1 file changed
+2
-7
Vendored
+2
-7
@@ -402,15 +402,10 @@ Some size constraints (all fail.)
|
||||
|
||||
__test__ = {'doctests' : doctests}
|
||||
|
||||
EXPECTED_FAILURE = doctest.register_optionflag('EXPECTED_FAILURE') # TODO: RUSTPYTHON
|
||||
class CustomOutputChecker(doctest.OutputChecker): # TODO: RUSTPYTHON
|
||||
def check_output(self, want, got, optionflags): # TODO: RUSTPYTHON
|
||||
if optionflags & EXPECTED_FAILURE: # TODO: RUSTPYTHON
|
||||
return not super().check_output(want, got, optionflags) # TODO: RUSTPYTHON
|
||||
return super().check_output(want, got, optionflags) # TODO: RUSTPYTHON
|
||||
|
||||
def load_tests(loader, tests, pattern):
|
||||
tests.addTest(doctest.DocTestSuite(checker=CustomOutputChecker())) # TODO: RUSTPYTHON
|
||||
from test.support.rustpython import DocTestChecker # TODO: RUSTPYTHON
|
||||
tests.addTest(doctest.DocTestSuite(checker=DocTestChecker())) # XXX: RUSTPYTHON
|
||||
return tests
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user