aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rpython/rlib')
-rw-r--r--rpython/rlib/test/test_rposix.py17
-rw-r--r--rpython/rlib/test/test_rsocket.py9
2 files changed, 15 insertions, 11 deletions
diff --git a/rpython/rlib/test/test_rposix.py b/rpython/rlib/test/test_rposix.py
index 09f747725e..7071fe0146 100644
--- a/rpython/rlib/test/test_rposix.py
+++ b/rpython/rlib/test/test_rposix.py
@@ -948,15 +948,12 @@ def test_get_and_set_scheduler_and_param():
rposix.sched_setparam(-1, param)
with pytest.raises(OSError):
rposix.sched_setscheduler(-1, mine, param)
- with pytest.raises(TypeError):
- rposix.sched_setscheduler(0, mine, None)
- with pytest.raises(TypeError):
- rposix.sched_setparam(0, None)
large = 214748364700
- param = large # rposix.sched_param(large)
- with pytest.raises(OSError):
- rposix.sched_setparam(0, param)
- # param = rposix.sched_param(sched_priority=-large)
- # with pytest.raises(OverflowError):
- # rposix.sched_setparam(0, param)
+ if large < sys.maxint:
+ param = large # rposix.sched_param(large)
+ with pytest.raises(OSError):
+ rposix.sched_setparam(0, param)
+ # param = rposix.sched_param(sched_priority=-large)
+ # with pytest.raises(OverflowError):
+ # rposix.sched_setparam(0, param)
diff --git a/rpython/rlib/test/test_rsocket.py b/rpython/rlib/test/test_rsocket.py
index 24ab1e2fc8..9e0e22acd3 100644
--- a/rpython/rlib/test/test_rsocket.py
+++ b/rpython/rlib/test/test_rsocket.py
@@ -576,7 +576,14 @@ def test_inet_ntop():
@pytest.mark.skipif(getattr(rsocket, 'AF_UNIX', None) is None,
reason='AF_UNIX not supported.')
def test_unix_socket_connect(tmpdir, do_recv):
- sockpath = str(tmpdir.join('test_unix_socket_connect'))
+ prev_dir = tmpdir.chdir() # workaround for limited path length
+ try:
+ do_test_unix_socket_connect(do_recv)
+ finally:
+ prev_dir.chdir()
+
+def do_test_unix_socket_connect(do_recv):
+ sockpath = './test_unix_socket_connect'
a = UNIXAddress(sockpath)
serversock = RSocket(AF_UNIX)