[Python-modules-commits] [twisted] 05/06: Fix test writing to stderr
Free Ekanayaka
freee at moszumanska.debian.org
Sat Nov 26 12:01:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
freee pushed a commit to branch master
in repository twisted.
commit 44fa14b6341c4576e68f05f1fd27526000ff3320
Author: Free Ekanayaka <freee at debian.org>
Date: Sat Nov 26 11:41:23 2016 +0000
Fix test writing to stderr
---
.../patches/0009-no-stderr-in-test_ckeygen.patch | 35 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 36 insertions(+)
diff --git a/debian/patches/0009-no-stderr-in-test_ckeygen.patch b/debian/patches/0009-no-stderr-in-test_ckeygen.patch
new file mode 100644
index 0000000..0b89dfa
--- /dev/null
+++ b/debian/patches/0009-no-stderr-in-test_ckeygen.patch
@@ -0,0 +1,35 @@
+From: Free Ekanayaka <freee at debian.org>
+Date: Sat, 26 Nov 2016 11:37:52 +0000
+Subject: no-stderr-in-test_ckeygen
+
+Fix an test writing to stderr. See:
+
+https://twistedmatrix.com/trac/ticket/8924
+---
+ src/twisted/conch/test/test_ckeygen.py | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/twisted/conch/test/test_ckeygen.py b/src/twisted/conch/test/test_ckeygen.py
+index 49c1eca..a5727bd 100644
+--- a/src/twisted/conch/test/test_ckeygen.py
++++ b/src/twisted/conch/test/test_ckeygen.py
+@@ -7,6 +7,7 @@ Tests for L{twisted.conch.scripts.ckeygen}.
+
+ import getpass
+ import sys
++import os
+ import subprocess
+
+ from io import BytesIO, StringIO
+@@ -94,7 +95,10 @@ class KeyGenTests(TestCase):
+ def test_runBadKeytype(self):
+ filename = self.mktemp()
+ with self.assertRaises(subprocess.CalledProcessError):
+- subprocess.check_call(['ckeygen', '-t', 'foo', '-f', filename])
++ with open(os.devnull, "rb") as devnull:
++ subprocess.check_call(
++ ['ckeygen', '-t', 'foo', '-f', filename],
++ stderr=devnull)
+
+
+
diff --git a/debian/patches/series b/debian/patches/series
index abc9956..3b10682 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-fix-sphinx-import-path.patch
0007-openssl-1.1.0.patch
0008-sort-option-keys.patch
+0009-no-stderr-in-test_ckeygen.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/twisted.git
More information about the Python-modules-commits
mailing list