mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/tests: show SQL queries only with -v
This commit is contained in:
@ -51,9 +51,10 @@ def query_counter():
|
||||
|
||||
@pytest.fixture
|
||||
def query_logger():
|
||||
import logging
|
||||
logging.basicConfig()
|
||||
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||
if pytest.config.option.verbose > 0:
|
||||
import logging
|
||||
logging.basicConfig()
|
||||
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||
|
||||
@pytest.yield_fixture(scope='function', autouse=True)
|
||||
def session(query_logger):
|
||||
|
Reference in New Issue
Block a user