(self)
| 189 | run_cases(self.c, [NonUnique, Unique, InsertOneAndFind]) |
| 190 | |
| 191 | def test_pool_reuses_open_socket(self): |
| 192 | # Test Pool's _check_closed() method doesn't close a healthy socket. |
| 193 | cx_pool = self.create_pool(max_pool_size=10) |
| 194 | cx_pool._check_interval_seconds = 0 # Always check. |
| 195 | with cx_pool.checkout() as conn: |
| 196 | pass |
| 197 | |
| 198 | with cx_pool.checkout() as new_connection: |
| 199 | self.assertEqual(conn, new_connection) |
| 200 | |
| 201 | self.assertEqual(1, len(cx_pool.conns)) |
| 202 | |
| 203 | def test_get_socket_and_exception(self): |
| 204 | # get_socket() returns socket after a non-network error. |
nothing calls this directly
no test coverage detected