(notification_queue, msg)
| 72 | |
| 73 | |
| 74 | def wait_for_notification(notification_queue, msg): |
| 75 | __tracebackhide__ = True |
| 76 | try: |
| 77 | from Queue import Empty |
| 78 | except ImportError: |
| 79 | from queue import Empty |
| 80 | try: |
| 81 | found = notification_queue.get(timeout=2) |
| 82 | assert found == msg |
| 83 | except Empty: |
| 84 | raise AssertionError("Timed out while waiting for %s notification." % (msg,)) |
| 85 | |
| 86 | |
| 87 | def join_thread(t): |
no test coverage detected