Hello community,

here is the log from the commit of package python-sh for openSUSE:Factory 
checked in at 2019-05-28 09:43:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sh (Old)
 and      /work/SRC/openSUSE:Factory/.python-sh.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sh"

Tue May 28 09:43:24 2019 rev:6 rq:705683 version:1.12.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sh/python-sh.changes      2019-02-02 
21:50:08.947934047 +0100
+++ /work/SRC/openSUSE:Factory/.python-sh.new.5148/python-sh.changes    
2019-05-28 09:43:26.137840744 +0200
@@ -1,0 +2,7 @@
+Mon May 27 11:59:53 UTC 2019 - Alberto Planas Dominguez <apla...@suse.com>
+
+- Add patches to fix some tests:
+  * fix-test_signal_group.diff
+  * fix-test_general_signal.diff (bsc#1120329)
+
+-------------------------------------------------------------------

New:
----
  fix-test_general_signal.diff
  fix-test_signal_group.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-sh.spec ++++++
--- /var/tmp/diff_new_pack.3Sp4Vy/_old  2019-05-28 09:43:26.921840473 +0200
+++ /var/tmp/diff_new_pack.3Sp4Vy/_new  2019-05-28 09:43:26.921840473 +0200
@@ -29,6 +29,8 @@
 Patch1:         no-coverage.patch
 Patch2:         0001-Fix-tests-for-the-drop-the-unversion-python.patch
 Patch3:         pep-0538-test-fix.patch
+Patch4:         fix-test_signal_group.diff
+Patch5:         fix-test_general_signal.diff
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch

++++++ fix-test_general_signal.diff ++++++
Index: sh-1.12.14/test.py
===================================================================
--- sh-1.12.14.orig/test.py
+++ sh-1.12.14/test.py
@@ -1374,10 +1374,9 @@ for i in range(5):
         self.assertTrue("4" not in stdout)
 
     def test_general_signal(self):
-        import signal
         from signal import SIGINT
 
-        py = create_tmp_test("""
+        py = create_tmp_test(r"""
 import sys
 import os
 import time
@@ -1386,7 +1385,7 @@ import signal
 def sig_handler(sig, frame):
     print(10)
     exit(0)
-    
+
 signal.signal(signal.SIGINT, sig_handler)
 
 for i in range(5):
@@ -1403,7 +1402,7 @@ for i in range(5):
                 process.signal(SIGINT)
                 return True
 
-        p = python(py.name, _out=agg, _tee=True)
+        p = python('-u', py.name, _out=agg, _tee=True)
         p.wait()
 
         self.assertEqual(p.process.exit_code, 0)
++++++ fix-test_signal_group.diff ++++++
Index: sh-1.12.14/test.py
===================================================================
--- sh-1.12.14.orig/test.py
+++ sh-1.12.14/test.py
@@ -1,4 +1,4 @@
-# -*- coding: utf8 -*-
+# -*- coding: utf-8 -*-
 import sys
 import os
 
@@ -2048,7 +2048,8 @@ time.sleep(3)
 """)
 
         parent = create_tmp_test("""
-import sys
+import os, sys
+sys.path.insert(0, os.getcwd())
 import sh
 system_python = sh.Command(sh.which("python%d.%d" % sys.version_info[:2]))
 p = system_python("{child_file}", _bg=True, _new_session=False)

Reply via email to