django_example_ynh/run_pytest.py

26 lines
487 B
Python
Raw Normal View History

"""
Run pytest against local test creation
"""
from pathlib import Path
try:
2021-09-15 19:16:35 +02:00
from django_yunohost_integration.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(
2020-12-29 11:35:39 +01:00
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
destination=BASE_PATH / 'local_test',
)
if __name__ == '__main__':
main()