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

Make sure unittest fails if doctest has failures #115

Merged
merged 1 commit into from
Jan 28, 2016
Merged

Conversation

karenc
Copy link
Contributor

@karenc karenc commented Jan 28, 2016

Even if README examples failed, unittest was passing:

**********************************************************************
1 items had failures:
  29 of  62 in README.rst
***Test Failed*** 29 failures.
ok

----------------------------------------------------------------------
Ran 1 test in 6.217s

OK

This PR changes this to:

**********************************************************************
1 items had failures:
  29 of  62 in README.rst
***Test Failed*** 29 failures.
FAIL

======================================================================
FAIL: test_readme (cnxpublishing.tests.test_doctests.DocTestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/karen/cnx-publishing/cnxpublishing/tests/test_doctests.py", line 59, in test_readme
    self.fail('DocTest failed: {}'.format(results))
AssertionError: DocTest failed: TestResults(failed=29, attempted=62)

----------------------------------------------------------------------
Ran 1 test in 6.221s

FAILED (failures=1)

mmulich pushed a commit that referenced this pull request Jan 28, 2016
Make sure unittest fails if doctest has failures
@mmulich mmulich merged commit d69f417 into master Jan 28, 2016
@mmulich mmulich deleted the doctests branch January 28, 2016 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants