A few internal attributes changed but they are only poked at for
testing, they are not part of the interface.
assert t.is_alive()
p.close()
- assert not p._sched_runner.is_alive()
+ assert not (p._sched_runner and p._sched_runner.is_alive())
for t in p._workers:
- assert not t.is_alive()
+ assert not (t and t.is_alive())
def test_putconn_no_pool(dsn):
assert not t.done()
await p.close()
- assert p._sched_runner.done()
+ assert not p._sched_runner or p._sched_runner.done()
for t in p._workers:
assert t.done()