summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-07-14 17:38:13 +0200
committerMichał Górny <mgorny@gentoo.org>2018-07-14 17:46:00 +0200
commit0cde98695d945cd046bd614535549b298cf1b768 (patch)
treebd75b92a666a49fc434bc5d731c19413cb6b29f4 /dev-python
parentwww-plugins/chrome-binary-plugins: automated update (68.0.3440.59, 69.0.3486.0) (diff)
downloadgentoo-0cde98695d945cd046bd614535549b298cf1b768.tar.gz
gentoo-0cde98695d945cd046bd614535549b298cf1b768.tar.bz2
gentoo-0cde98695d945cd046bd614535549b298cf1b768.zip
dev-python/testrepository: Backport more test fixes
Closes: https://bugs.gentoo.org/648442
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/testrepository/files/testrepository-0.0.20-test-backport2.patch61
-rw-r--r--dev-python/testrepository/testrepository-0.0.20.ebuild1
2 files changed, 62 insertions, 0 deletions
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
new file mode 100644
index 000000000000..a0614b671e1a
--- /dev/null
+++ b/dev-python/testrepository/files/testrepository-0.0.20-test-backport2.patch
@@ -0,0 +1,61 @@
+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.
+
+---
+ testrepository/tests/commands/test_failing.py | 2 +-
+ 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',
+--
+2.18.0
+
diff --git a/dev-python/testrepository/testrepository-0.0.20.ebuild b/dev-python/testrepository/testrepository-0.0.20.ebuild
index 59fbcc1f08b6..2c7ffaca0ffe 100644
--- a/dev-python/testrepository/testrepository-0.0.20.ebuild
+++ b/dev-python/testrepository/testrepository-0.0.20.ebuild
@@ -37,6 +37,7 @@ DISTUTILS_IN_SOURCE_BUILD=1
PATCHES=(
"${FILESDIR}"/${P}-test-backport.patch
"${FILESDIR}"/${P}-test-backport1.patch
+ "${FILESDIR}"/${P}-test-backport2.patch
)
python_test() {