Belle II Software  release-08-01-10
fixtures.py
1 
8 try:
9  from queue import Empty
10 except ImportError:
11  from Queue import Empty
12 
13 # @cond internal_test
14 
15 
16 class 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