def main(): optionflags, verbosity, kbinterrupt_continue = 0, 1, 0 testrun = doctest_driver.run(TESTS, optionflags, verbosity, kbinterrupt_continue) if not testrun.failures == 0: print print "A test failed unexpectedly. Please report this error" print "to the nltk-dev mailinglist." exit(1) # TODO: create an option for the doctest driver to disable output # when the expected-to-fail tests run for ft in FAILING_TESTS: testrun = doctest_driver.run([ft], optionflags, verbosity, kbinterrupt_continue) if testrun.failures == 0: print print "A test that was expected to fail actually passed: %s" % ft print "Please report this to the nltk-dev mailinglist." exit(1) print print "All tests OK! (The ones that did fail were expected to fail)"
def main(): optionflags = doctest.NORMALIZE_WHITESPACE | doctest.IGNORE_EXCEPTION_DETAIL verbosity, kbinterrupt_continue = 1, 0 testrun = doctest_driver.run(TESTS, optionflags, verbosity, kbinterrupt_continue) if not testrun.failures == 0: print print "A test failed unexpectedly. Please report this error" print "to the nltk-dev mailinglist." exit(0) # this should really be exit(1) but we don't want tox to stop # TODO: create an option for the doctest driver to disable output # when the expected-to-fail tests run for ft in FAILING_TESTS: testrun = doctest_driver.run([ft], optionflags, verbosity, kbinterrupt_continue) if testrun.failures == 0: print print "A test that was expected to fail actually passed: %s" % ft print "Please report this to the nltk-dev mailinglist." exit(0) # this should really be exit(1) but we don't want tox to stop print print "All tests OK! (The ones that did fail were expected to fail)"