Unittest - Example of TAP diag use in template.t
* Also prettify its output with the amazing whitespace
This commit is contained in:
@@ -34,6 +34,9 @@ class TestBugNumber(TestCase):
|
|||||||
expected = "Copyright \(C\) \d{4} - %d" % (datetime.now().year,)
|
expected = "Copyright \(C\) \d{4} - %d" % (datetime.now().year,)
|
||||||
self.assertRegexpMatches(out.decode("utf8"), expected)
|
self.assertRegexpMatches(out.decode("utf8"), expected)
|
||||||
|
|
||||||
|
# TAP diagnostics on the bas
|
||||||
|
self.diag("Yay TAP diagnostics")
|
||||||
|
|
||||||
def test_fail_other(self):
|
def test_fail_other(self):
|
||||||
"""Nothing to do with Copyright"""
|
"""Nothing to do with Copyright"""
|
||||||
self.assertEqual("I like to code", "I like\nto code\n")
|
self.assertEqual("I like to code", "I like\nto code\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user