(self)
| 185 | eq_(p.checkedout(), 0) |
| 186 | |
| 187 | def test_rec_info(self): |
| 188 | p = self._queuepool_fixture(pool_size=1, max_overflow=0) |
| 189 | |
| 190 | c = p.connect() |
| 191 | self.assert_(not c.record_info) |
| 192 | self.assert_(c.record_info is c._connection_record.record_info) |
| 193 | |
| 194 | c.record_info["foo"] = "bar" |
| 195 | c.close() |
| 196 | del c |
| 197 | |
| 198 | c = p.connect() |
| 199 | self.assert_("foo" in c.record_info) |
| 200 | |
| 201 | c.invalidate() |
| 202 | c = p.connect() |
| 203 | self.assert_("foo" in c.record_info) |
| 204 | |
| 205 | c.record_info["foo2"] = "bar2" |
| 206 | c.detach() |
| 207 | is_(c.record_info, None) |
| 208 | is_(c._connection_record, None) |
| 209 | |
| 210 | c2 = p.connect() |
| 211 | |
| 212 | assert c2.record_info |
| 213 | assert "foo2" in c2.record_info |
| 214 | |
| 215 | def test_rec_unconnected(self): |
| 216 | # test production of a _ConnectionRecord with an |
nothing calls this directly
no test coverage detected