def close(namespace): iface = PyRQIface(ref="testCloseDuringGet", namespace=namespace, quiet=self.quiet, loggingModule=testLoggingModule) iface.close()
assert True else: assert False finally: try: iface.close() except: pass # Now attempt a GET: iface = PyRQIface(ref="testPostCloseDifferentIface.1", namespace=self.namespace, quiet=self.quiet, loggingModule=testLoggingModule) try: iface.get(block=block, timeout=timeout) except ClosedError, _e: assert True else: assert False finally: try: iface.close() except: pass def testCloseDuringGet(self): self.testCreate() def close(namespace): iface = PyRQIface(ref="testCloseDuringGet", namespace=namespace, quiet=self.quiet, loggingModule=testLoggingModule) iface.close() threading.Timer(0, close, args=[self.namespace]).start() try: self.iface.get(block=True, timeout=None) except ClosedError, _e: assert True except Exception, _e: pass else: assert False