Merge lp:~gz/testtools/trivial_test_testresults into lp:~testtools-committers/testtools/trunk

Proposed by Martin Packman
Status: Merged
Merged at revision: 65
Proposed branch: lp:~gz/testtools/trivial_test_testresults
Merge into: lp:~testtools-committers/testtools/trunk
Diff against target: 21 lines (+2/-2)
1 file modified
testtools/tests/test_testresult.py (+2/-2)
To merge this branch: bzr merge lp:~gz/testtools/trivial_test_testresults
Reviewer Review Type Date Requested Status
testtools developers Pending
Review via email: mp+26351@code.launchpad.net

Description of the change

Make the string value check on ZeroDivisionError more liberal still so that testtools.tests.test_testresult.TestTextTestResult.test_stopTestRun_shows_details passes on IronPython. Not a terribly important change, but prevents it printing out a hundred and twenty lines of confusing junk when I'm trying to test other things. I don't like that doctest string checking stuff...

While I was there I also changed the parent class of that test class to plain TestCase as it wasn't using TestWithFakeExceptions.makeExceptionInfo anywhere.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Looks good to me.

I wrote an exception matcher in testrepository; we should bring that
into the fold and then we can use it rather than stringification.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'testtools/tests/test_testresult.py'
2--- testtools/tests/test_testresult.py 2009-12-18 00:29:07 +0000
3+++ testtools/tests/test_testresult.py 2010-05-28 23:40:52 +0000
4@@ -254,7 +254,7 @@
5 self.assertResultLogsEqual([('stopTestRun')])
6
7
8-class TestTextTestResult(TestWithFakeExceptions):
9+class TestTextTestResult(TestCase):
10 """Tests for `TextTestResult`."""
11
12 def setUp(self):
13@@ -377,7 +377,7 @@
14 testMethod()
15 File "...testtools...tests...test_testresult.py", line ..., in error
16 1/0
17-ZeroDivisionError: int... division or modulo by zero
18+ZeroDivisionError: ... divi... by zero...
19 ------------
20 ======================================================================
21 FAIL: testtools.tests.test_testresult.Test.failed

Subscribers

People subscribed via source and target branches