summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch')
-rw-r--r--dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch b/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch
new file mode 100644
index 00000000000..4126e2bdced
--- /dev/null
+++ b/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch
@@ -0,0 +1,35 @@
+From fb1fc865000c92fc431a04d54116001c35ec0cdd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
+Date: Fri, 21 Dec 2012 00:29:53 +0100
+Subject: [PATCH] Exit with failure when doctests fail.
+
+---
+ documentation.py | 3 ++-
+ documentation3.py | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/documentation.py b/documentation.py
+index 3d5a5c0..0ddd681 100644
+--- a/documentation.py
++++ b/documentation.py
+@@ -1131,4 +1131,5 @@ def hello(user):
+ print('hello %s' % user)
+
+ if __name__ == '__main__':
+- import doctest; doctest.testmod()
++ import doctest
++ sys.exit(0 if doctest.testmod()[0] == 0 else 1)
+diff --git a/documentation3.py b/documentation3.py
+index bd86cc6..4162d56 100644
+--- a/documentation3.py
++++ b/documentation3.py
+@@ -1167,4 +1167,5 @@ def hello(user):
+ print('hello %s' % user)
+
+ if __name__ == '__main__':
+- import doctest; doctest.testmod()
++ import doctest
++ sys.exit(0 if doctest.testmod()[0] == 0 else 1)
+--
+1.8.0.2
+