[Python-modules-commits] [twisted] 04/06: Add sort-option-keys patch to fix failing test

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 b2dc1f250248c2fedaa90835f4b09e00cecd9c0f
Author: Free Ekanayaka <freee at debian.org>
Date:   Sat Nov 26 10:42:13 2016 +0000

    Add sort-option-keys patch to fix failing test
---
 debian/patches/0008-sort-option-keys.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/0008-sort-option-keys.patch b/debian/patches/0008-sort-option-keys.patch
new file mode 100644
index 0000000..c448710
--- /dev/null
+++ b/debian/patches/0008-sort-option-keys.patch
@@ -0,0 +1,26 @@
+From: Free Ekanayaka <freee at debian.org>
+Date: Sat, 26 Nov 2016 10:40:11 +0000
+Subject: sort-option-keys
+
+Fix flaky twisted.test.test_main.MainTests.test_twisted which fails
+if options are not in the same order.
+
+See https://twistedmatrix.com/trac/attachment/ticket/8923.
+
+---
+ src/twisted/python/usage.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/twisted/python/usage.py b/src/twisted/python/usage.py
+index 4a3a972..3335583 100644
+--- a/src/twisted/python/usage.py
++++ b/src/twisted/python/usage.py
+@@ -388,7 +388,7 @@ class Options(dict):
+         dct = {}
+         reflect.addMethodNamesToDict(self.__class__, dct, "opt_")
+ 
+-        for name in dct.keys():
++        for name in sorted(dct.keys()):
+             method = getattr(self, 'opt_'+name)
+ 
+             takesArg = not flagFunction(method, name)
diff --git a/debian/patches/series b/debian/patches/series
index 35ac63f..abc9956 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 0005-insecure-pythonpath.patch
 0006-fix-sphinx-import-path.patch
 0007-openssl-1.1.0.patch
+0008-sort-option-keys.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