mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-04-30 16:57:29 -07:00
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=537536 Package-Manager: portage-2.2.23 Signed-off-by: Justin Lecher <jlec@gentoo.org>
42 lines
1.1 KiB
Diff
42 lines
1.1 KiB
Diff
diff --git a/testrepository/tests/test_repository.py b/testrepository/tests/test_repository.py
|
|
index e2e5e05..4a8667b 100644
|
|
--- a/testrepository/tests/test_repository.py
|
|
+++ b/testrepository/tests/test_repository.py
|
|
@@ -28,6 +28,7 @@
|
|
from testresources import TestResource
|
|
from testtools import (
|
|
clone_test_with_new_id,
|
|
+ content,
|
|
PlaceHolder,
|
|
)
|
|
import testtools
|
|
@@ -103,19 +104,24 @@ class Case(ResourcedTestCase):
|
|
def passing(self):
|
|
pass
|
|
|
|
- def failing(self):
|
|
- self.fail("oops")
|
|
-
|
|
def unexpected_success(self):
|
|
self.expectFailure("unexpected success", self.assertTrue, True)
|
|
|
|
|
|
+class FailingCase:
|
|
+
|
|
+ def run(self, result):
|
|
+ result.startTest(self)
|
|
+ result.addError(
|
|
+ self, None, details={'traceback': content.text_content("")})
|
|
+ result.stopTest(self)
|
|
+
|
|
def make_test(id, should_pass):
|
|
"""Make a test."""
|
|
if should_pass:
|
|
case = Case("passing")
|
|
else:
|
|
- case = Case("failing")
|
|
+ case = FailingCase()
|
|
return clone_test_with_new_id(case, id)
|
|
|
|
|