mirror of
https://github.com/YunoHost-Apps/django-for-runners_ynh.git
synced 2024-09-03 18:26:16 +02:00
use django_ynh.pytest_helper
This commit is contained in:
parent
8b7bc3f377
commit
664d31d0fb
1 changed files with 25 additions and 0 deletions
25
run_pytest.py
Normal file
25
run_pytest.py
Normal file
|
@ -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()
|
Loading…
Reference in a new issue