(self)
| 997 | self.assertEqual(sorted(results), inputs) |
| 998 | |
| 999 | def test_references(self): |
| 1000 | # The queue should lose references to each item as soon as |
| 1001 | # it leaves the queue. |
| 1002 | class C: |
| 1003 | pass |
| 1004 | |
| 1005 | N = 20 |
| 1006 | q = self.q |
| 1007 | for i in range(N): |
| 1008 | q.put(C()) |
| 1009 | for i in range(N): |
| 1010 | wr = weakref.ref(q.get()) |
| 1011 | gc_collect() # For PyPy or other GCs. |
| 1012 | self.assertIsNone(wr()) |
| 1013 | |
| 1014 | |
| 1015 | class PySimpleQueueTest(BaseSimpleQueueTest, unittest.TestCase): |
nothing calls this directly
no test coverage detected