(self)
| 96 | self.assertEqual(second_context.make_current_count, 2) |
| 97 | |
| 98 | def test_free(self): |
| 99 | with self.context.make_current(): |
| 100 | pass |
| 101 | |
| 102 | thread = self.context.thread |
| 103 | self.assertIn(id(self.context), base._CURRENT_THREAD_FOR_CONTEXT) |
| 104 | self.assertIn(thread, base._CURRENT_CONTEXT_FOR_THREAD) |
| 105 | |
| 106 | self.context.free() |
| 107 | self.assertIs(self.context.free_thread, thread) |
| 108 | self.assertIsNone(self.context.thread) |
| 109 | |
| 110 | self.assertNotIn(id(self.context), base._CURRENT_THREAD_FOR_CONTEXT) |
| 111 | self.assertNotIn(thread, base._CURRENT_CONTEXT_FOR_THREAD) |
| 112 | |
| 113 | def test_free_with_multiple_contexts(self): |
| 114 | context1 = ContextBaseTests.ContextMock(WIDTH, HEIGHT, |
nothing calls this directly
no test coverage detected