testtools.tests.test_assert_that.AssertThatTests(object)
class documentationtesttools.tests.test_assert_that
(View In Hierarchy)
Known subclasses: testtools.tests.test_assert_that.TestAssertThatFunction, testtools.tests.test_assert_that.TestAssertThatMethod
Method | assert_that_callable | Undocumented |
Method | assertFails | Assert that function raises a failure with the given message. |
Method | test_assertThat_matches_clean | Undocumented |
Method | test_assertThat_mismatch_raises_description | Undocumented |
Method | test_assertThat_output | Undocumented |
Method | test_assertThat_message_is_annotated | Undocumented |
Method | test_assertThat_verbose_output | Undocumented |
Method | get_error_string | Get the string showing how 'e' would be formatted in test output. |
Method | test_assertThat_verbose_unicode | Undocumented |
Get the string showing how 'e' would be formatted in test output.
This is a little bit hacky, since it's designed to give consistent output regardless of Python version.
In testtools, TestResult._exc_info_to_unicode is the point of dispatch between various different implementations of methods that format exceptions, so that's what we have to call. However, that method cares about stack traces and formats the exception class. We don't care about either of these, so we take its output and parse it a little.