diff options
author | Jelmer Vernooij <jelmer@jelmer.uk> | 2018-04-05 01:02:40 +0100 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2018-04-05 12:04:12 +1200 |
commit | e2f84ae6b2bcf89221613056d0c45dd308f46d62 (patch) | |
tree | 1011f62410dc71725a12dbd51b5fca5bc8bcba85 | |
parent | ce71d072613b368d8a531065cb202c92fbdfbe89 (diff) | |
download | testrepository-git-e2f84ae6b2bcf89221613056d0c45dd308f46d62.tar.gz |
Fix the testrepository tests with newer versions of testtools.
-rw-r--r-- | testrepository/tests/commands/test_failing.py | 2 | ||||
-rw-r--r-- | testrepository/tests/test_repository.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/testrepository/tests/commands/test_failing.py b/testrepository/tests/commands/test_failing.py index 56c97ef..4e52f6a 100644 --- a/testrepository/tests/commands/test_failing.py +++ b/testrepository/tests/commands/test_failing.py @@ -90,7 +90,7 @@ class TestCommand(ResourcedTestCase): finally: log.stopTestRun() self.assertEqual( - log._events, [ + [tuple(ev) for ev in log._events], [ ('startTestRun',), ('status', 'failing', 'inprogress', None, True, None, None, False, None, None, Wildcard), diff --git a/testrepository/tests/test_repository.py b/testrepository/tests/test_repository.py index 4a8667b..28d99bc 100644 --- a/testrepository/tests/test_repository.py +++ b/testrepository/tests/test_repository.py @@ -113,9 +113,10 @@ class FailingCase: def run(self, result): result.startTest(self) result.addError( - self, None, details={'traceback': content.text_content("")}) + self, None, details={'traceback': content.text_content("tb")}) result.stopTest(self) + def make_test(id, should_pass): """Make a test.""" if should_pass: @@ -409,7 +410,7 @@ class TestRepositoryContract(ResourcedTestCase): finally: log.stopTestRun() self.assertEqual( - log._events, [ + [tuple(ev) for ev in log._events], [ ('startTestRun',), ('status', 'testrepository.tests.test_repository.Case.method', @@ -465,7 +466,7 @@ class TestRepositoryContract(ResourcedTestCase): finally: log.stopTestRun() self.assertEqual( - log._events, + [tuple(ev) for ev in log._events], [ ('startTestRun',), ('status', |