sqlite - What to do when a py.test hangs silently? -



sqlite - What to do when a py.test hangs silently? -

while using py.test, have tests run fine sqlite hang silently when switch postgresql. how go debugging that? there "verbose" mode can run tests in, or set breakpoint ? more generally, standard plan of attack when pytest stalls silently? i've tried using pytest-timeout, , ran test $ py.test --timeout=300, tests still hang no activity on screen whatsoever

i had similar problem pytest , postgresql while testing flask app used sqlalchemy. seems pytest has hard time running teardown using request.addfinalizer method postgresql.

previously had:

@pytest.fixture def db(app, request): def teardown(): _db.drop_all() _db.app = app _db.create_all() request.addfinalizer(teardown) homecoming _db

( _db instance of sqlalchemy import extensions.py ) if drop database every time database fixture called:

@pytest.fixture def db(app, request): _db.app = app _db.drop_all() _db.create_all() homecoming _db

then pytest won't hang after first test.

sqlite postgresql timeout hang py.test

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -