Commit 30e9e05f authored by Denis Bilenko's avatar Denis Bilenko

fix test__api.py to pass on Windows

parent d030fd34
...@@ -63,7 +63,8 @@ class Test(greentest.TestCase): ...@@ -63,7 +63,8 @@ class Test(greentest.TestCase):
switcher.kill() switcher.kill()
def test_wait_read_invalid_switch(self): def test_wait_read_invalid_switch(self):
p = gevent.spawn(util.wrap_errors(AssertionError, socket.wait_read), 0) sock = socket.socket()
p = gevent.spawn(util.wrap_errors(AssertionError, socket.wait_read), sock.fileno())
gevent.sleep(0) gevent.sleep(0)
switcher = gevent.spawn(p.switch, None) switcher = gevent.spawn(p.switch, None)
result = p.get() result = p.get()
...@@ -72,7 +73,8 @@ class Test(greentest.TestCase): ...@@ -72,7 +73,8 @@ class Test(greentest.TestCase):
switcher.kill() switcher.kill()
def test_wait_write_invalid_switch(self): def test_wait_write_invalid_switch(self):
p = gevent.spawn(util.wrap_errors(AssertionError, socket.wait_write), 0) sock = socket.socket()
p = gevent.spawn(util.wrap_errors(AssertionError, socket.wait_write), sock.fileno())
gevent.sleep(0) gevent.sleep(0)
switcher = gevent.spawn(p.switch, None) switcher = gevent.spawn(p.switch, None)
result = p.get() result = p.get()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment