Sisyphus repository
Last update: 22 october 2019 | SRPMs: 17517 | Visits: 15403356
en ru br
ALT Linux repos
S:1.7.0-alt1

Group :: Development/Documentation
RPM: python3-module-execnet-docs

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: python3-module-execnet-docs-1.7.0-alt.patch
Download


 testing/test_gateway.py | 4 ++--
 testing/test_xspec.py   | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/testing/test_gateway.py b/testing/test_gateway.py
index 9de8bc7..1df9d73 100644
--- a/testing/test_gateway.py
+++ b/testing/test_gateway.py
@@ -30,10 +30,10 @@ def test_deprecation(recwarn, monkeypatch):
     execnet.PopenGateway().exit()
     assert recwarn.pop(DeprecationWarning)
     monkeypatch.setattr(socket, 'socket', fails)
-    py.test.raises(Exception, 'execnet.SocketGateway("localhost", 8811)')
+    py.test.raises(Exception, execnet.SocketGateway, "localhost", 8811)
     assert recwarn.pop(DeprecationWarning)
     monkeypatch.setattr(subprocess, 'Popen', fails)
-    py.test.raises(Exception, 'execnet.SshGateway("not-existing")')
+    py.test.raises(Exception, execnet.SshGateway, "not-existing")
     assert recwarn.pop(DeprecationWarning)
 
 
diff --git a/testing/test_xspec.py b/testing/test_xspec.py
index 5a43241..2e0b8bc 100644
--- a/testing/test_xspec.py
+++ b/testing/test_xspec.py
@@ -138,9 +138,13 @@ class TestMakegateway:
         remotenice = gw.remote_exec(getnice).receive()
         gw.exit()
         if remotenice is not None:
-            gw = makegateway("popen//nice=5")
+            LINUX_NICE_MAX = 19
+            # check for Linux
+            assert remotenice <= LINUX_NICE_MAX
+            nice = LINUX_NICE_MAX - remotenice
+            gw = makegateway("popen//nice={}".format(nice))
             remotenice2 = gw.remote_exec(getnice).receive()
-            assert remotenice2 == remotenice + 5
+            assert remotenice2 == remotenice + nice
 
     def test_popen_env(self, makegateway):
         gw = makegateway("popen//env:NAME123=123")
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin