From 664d31d0fba15412725440d0989fa10b222bcbb7 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Sun, 17 Jan 2021 12:01:30 +0100 Subject: [PATCH] use django_ynh.pytest_helper --- run_pytest.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 run_pytest.py diff --git a/run_pytest.py b/run_pytest.py new file mode 100644 index 0000000..a398526 --- /dev/null +++ b/run_pytest.py @@ -0,0 +1,25 @@ +""" + Run pytest against local test creation +""" + +from pathlib import Path + + +try: + from django_ynh.pytest_helper import run_pytest +except ImportError as err: + raise ImportError('Did you forget to activate a virtual environment?') from err + + +BASE_PATH = Path(__file__).parent + + +def main(): + run_pytest( + django_settings_path=BASE_PATH / 'conf' / 'settings.py', + destination=BASE_PATH / 'local_test', + ) + + +if __name__ == '__main__': + main()