Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/testrepository/, dev-python/testrepository/files/
Date: Sat, 14 Jul 2018 15:46:13
Message-Id: 1531583160.0cde98695d945cd046bd614535549b298cf1b768.mgorny@gentoo
1 commit: 0cde98695d945cd046bd614535549b298cf1b768
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 14 15:38:13 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 14 15:46:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cde9869
7
8 dev-python/testrepository: Backport more test fixes
9
10 Closes: https://bugs.gentoo.org/648442
11
12 .../testrepository-0.0.20-test-backport2.patch | 61 ++++++++++++++++++++++
13 .../testrepository/testrepository-0.0.20.ebuild | 1 +
14 2 files changed, 62 insertions(+)
15
16 diff --git a/dev-python/testrepository/files/testrepository-0.0.20-test-backport2.patch b/dev-python/testrepository/files/testrepository-0.0.20-test-backport2.patch
17 new file mode 100644
18 index 00000000000..a0614b671e1
19 --- /dev/null
20 +++ b/dev-python/testrepository/files/testrepository-0.0.20-test-backport2.patch
21 @@ -0,0 +1,61 @@
22 +From e2f84ae6b2bcf89221613056d0c45dd308f46d62 Mon Sep 17 00:00:00 2001
23 +From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@××××××.uk>
24 +Date: Thu, 5 Apr 2018 01:02:40 +0100
25 +Subject: [PATCH] Fix the testrepository tests with newer versions of
26 + testtools.
27 +
28 +---
29 + testrepository/tests/commands/test_failing.py | 2 +-
30 + testrepository/tests/test_repository.py | 7 ++++---
31 + 2 files changed, 5 insertions(+), 4 deletions(-)
32 +
33 +diff --git a/testrepository/tests/commands/test_failing.py b/testrepository/tests/commands/test_failing.py
34 +index 56c97ef..4e52f6a 100644
35 +--- a/testrepository/tests/commands/test_failing.py
36 ++++ b/testrepository/tests/commands/test_failing.py
37 +@@ -90,7 +90,7 @@ class TestCommand(ResourcedTestCase):
38 + finally:
39 + log.stopTestRun()
40 + self.assertEqual(
41 +- log._events, [
42 ++ [tuple(ev) for ev in log._events], [
43 + ('startTestRun',),
44 + ('status', 'failing', 'inprogress', None, True, None, None, False,
45 + None, None, Wildcard),
46 +diff --git a/testrepository/tests/test_repository.py b/testrepository/tests/test_repository.py
47 +index 4a8667b..28d99bc 100644
48 +--- a/testrepository/tests/test_repository.py
49 ++++ b/testrepository/tests/test_repository.py
50 +@@ -113,9 +113,10 @@ class FailingCase:
51 + def run(self, result):
52 + result.startTest(self)
53 + result.addError(
54 +- self, None, details={'traceback': content.text_content("")})
55 ++ self, None, details={'traceback': content.text_content("tb")})
56 + result.stopTest(self)
57 +
58 ++
59 + def make_test(id, should_pass):
60 + """Make a test."""
61 + if should_pass:
62 +@@ -409,7 +410,7 @@ class TestRepositoryContract(ResourcedTestCase):
63 + finally:
64 + log.stopTestRun()
65 + self.assertEqual(
66 +- log._events, [
67 ++ [tuple(ev) for ev in log._events], [
68 + ('startTestRun',),
69 + ('status',
70 + 'testrepository.tests.test_repository.Case.method',
71 +@@ -465,7 +466,7 @@ class TestRepositoryContract(ResourcedTestCase):
72 + finally:
73 + log.stopTestRun()
74 + self.assertEqual(
75 +- log._events,
76 ++ [tuple(ev) for ev in log._events],
77 + [
78 + ('startTestRun',),
79 + ('status',
80 +--
81 +2.18.0
82 +
83
84 diff --git a/dev-python/testrepository/testrepository-0.0.20.ebuild b/dev-python/testrepository/testrepository-0.0.20.ebuild
85 index 59fbcc1f08b..2c7ffaca0ff 100644
86 --- a/dev-python/testrepository/testrepository-0.0.20.ebuild
87 +++ b/dev-python/testrepository/testrepository-0.0.20.ebuild
88 @@ -37,6 +37,7 @@ DISTUTILS_IN_SOURCE_BUILD=1
89 PATCHES=(
90 "${FILESDIR}"/${P}-test-backport.patch
91 "${FILESDIR}"/${P}-test-backport1.patch
92 + "${FILESDIR}"/${P}-test-backport2.patch
93 )
94
95 python_test() {