MCPcopy Index your code
hub / github.com/python/cpython / test_create

Method test_create

Lib/test/test_epoll.py:66–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 return client, server
65
66 def test_create(self):
67 try:
68 ep = select.epoll(16)
69 except OSError as e:
70 raise AssertionError(str(e))
71 self.assertTrue(ep.fileno() > 0, ep.fileno())
72 self.assertTrue(not ep.closed)
73 ep.close()
74 self.assertTrue(ep.closed)
75 self.assertRaises(ValueError, ep.fileno)
76
77 if hasattr(select, "EPOLL_CLOEXEC"):
78 select.epoll(-1, select.EPOLL_CLOEXEC).close()
79 select.epoll(flags=select.EPOLL_CLOEXEC).close()
80 select.epoll(flags=0).close()
81
82 def test_badcreate(self):
83 self.assertRaises(TypeError, select.epoll, 1, 2, 3)

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
assertTrueMethod · 0.80
filenoMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected