Yelp / Testify

A more pythonic testing framework.
Other
308 stars 67 forks source link

assert that our doctests actually work as shown. #197

Closed bukzor closed 11 years ago

bukzor commented 11 years ago

There are quite a few doctests in the code base already existing, but up to now we haven't assert that they work as shown. This branch adds those assertion, and in so doing adds eight tests to the test suite. A few small edits were necessary to make these "new" tests pass.

$ testify test -v --summary | grep DocTest
test.utils.stringdiffer_test DocTest.test_doc:highlight ... ok in 0.00s
test.utils.stringdiffer_test DocTest.test_doc:highlight_regions ... ok in 0.00s
test.utils.test_turtle DocTest.test_doc ... ok in 0.00s
test.assertions_test DocTest.test_doc:assert_exactly_one ... ok in 0.00s
test.assertions_test DocTest.test_doc:assert_raises ... ok in 0.00s
test.assertions_test DocTest.test_doc:assert_raises_such_that ... ok in 0.00s
test.assertions_test DocTest.test_doc:assert_warns ... ok in 0.00s
test.assertions_test DocTest.test_doc:assert_warns_such_that ... ok in 0.00s

I've also added a base class for DocMetaTestCase to simplify making doctest suites.

milki commented 11 years ago

shipit