(self)
| 953 | self.assertEqual(len(exceptions), 0) |
| 954 | |
| 955 | def test_thread_sharing_count(self): |
| 956 | self.assertIs(connection.allow_thread_sharing, False) |
| 957 | connection.inc_thread_sharing() |
| 958 | self.assertIs(connection.allow_thread_sharing, True) |
| 959 | connection.inc_thread_sharing() |
| 960 | self.assertIs(connection.allow_thread_sharing, True) |
| 961 | connection.dec_thread_sharing() |
| 962 | self.assertIs(connection.allow_thread_sharing, True) |
| 963 | connection.dec_thread_sharing() |
| 964 | self.assertIs(connection.allow_thread_sharing, False) |
| 965 | msg = "Cannot decrement the thread sharing count below zero." |
| 966 | with self.assertRaisesMessage(RuntimeError, msg): |
| 967 | connection.dec_thread_sharing() |
| 968 | |
| 969 | |
| 970 | class MySQLAutoPKZeroTests(TestCase): |
nothing calls this directly
no test coverage detected