[core+tests] Improved poll handling

- mock poll instead of epoll
- increase timeout for poll (1ms is a lot of system load for nothing)
This commit is contained in:
Tobias Witek 2019-06-23 16:51:28 +02:00
parent ff82604036
commit 928c37a972
4 changed files with 29 additions and 20 deletions

View file

@ -20,10 +20,10 @@ class TestI3BarInput(unittest.TestCase):
self.popen = mocks.MockPopen()
self.stdin.fileno.return_value = 1
epoll = mock.Mock()
self.select.epoll.return_value = epoll
poll = mock.Mock()
self.select.poll.return_value = poll
epoll.poll.return_value = [(self.stdin.fileno.return_value, 2)]
poll.poll.return_value = [(self.stdin.fileno.return_value, 2)]
self.anyModule = mock.Mock()
self.anyModule.id = mocks.rand(10)