18 lines
497 B
Python
18 lines
497 B
Python
import os
|
|
import sys
|
|
|
|
from piccolo.utils.warnings import colored_warning
|
|
|
|
|
|
def pytest_configure(*args):
|
|
if os.environ.get("PICCOLO_TEST_RUNNER") != "True":
|
|
colored_warning(
|
|
"\n\n"
|
|
"We recommend running Piccolo tests using the "
|
|
"`piccolo tester run` command, which wraps Pytest, and makes "
|
|
"sure the test database is being used. "
|
|
"To stop this warning, modify conftest.py."
|
|
"\n\n"
|
|
)
|
|
sys.exit(1)
|