Commit 7a736d44 authored by Denis Bilenko's avatar Denis Bilenko

test__select.py: test that proper error is raised on windows

parent c01cefa3
import sys
from gevent import select
import greentest
......@@ -10,11 +11,24 @@ class TestSelect(greentest.GenericWaitTestCase):
class TestSelectTypes(greentest.TestCase):
def test_int(self):
select.select([1], [], [], 0.001)
if sys.platform == 'win32':
def test_long(self):
select.select([1L], [], [], 0.001)
def test_int(self):
import msvcrt
self.assertRaises(select.error, select.select, [msvcrt.get_osfhandle(1)], [], [], 0.001)
self.assertRaises(select.error, select.select, [int(msvcrt.get_osfhandle(1))], [], [], 0.001)
def test_long(self):
import msvcrt
self.assertRaises(IOError, select.select, [long(msvcrt.get_osfhandle(1))], [], [], 0.001)
else:
def test_int(self):
select.select([1], [], [], 0.001)
def test_long(self):
select.select([1L], [], [], 0.001)
def test_string(self):
self.switch_expected = False
......
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