Belle II Software light-2406-ragdoll
fixtures.py
1
8try:
9 from queue import Empty
10except ImportError:
11 from Queue import Empty
12
13# @cond internal_test
14
15
16class MockQueue:
17
18 def __init__(self):
19 self.internal_storage = []
20
21 def put(self, item, block=True):
22 self.internal_storage.append(item)
23
24 def get_nowait(self):
25 try:
26 return self.internal_storage.pop(0)
27 except IndexError:
28 raise Empty
29
30# @endcond