dev-python/testrepository: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-09-26 19:05:40 +02:00
parent 6677d3cfc0
commit d2580b93b3
6 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
From e2f84ae6b2bcf89221613056d0c45dd308f46d62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk>
Date: Thu, 5 Apr 2018 01:02:40 +0100
Subject: [PATCH] Fix the testrepository tests with newer versions of
testtools.
--- 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),
--- 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',