forked from pool/python-sh
Accepting request 705674 from home:aplanas:branches:devel:languages:python
- Add patches to fix some tests: * fix-test_signal_group.diff * fix-test_general_signal.diff (bsc#1120329) OBS-URL: https://build.opensuse.org/request/show/705674 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sh?expand=0&rev=20
This commit is contained in:
committed by
Git OBS Bridge
parent
e5b6917c11
commit
8c4d2a3b8f
34
fix-test_general_signal.diff
Normal file
34
fix-test_general_signal.diff
Normal file
@@ -0,0 +1,34 @@
|
||||
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)
|
Reference in New Issue
Block a user