From 2e6a3b2a7b86f213c6cd15b3b38a0f2fde08d3b4 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Mon, 28 Dec 2020 20:15:30 +0100 Subject: [PATCH] remove test file --- django_ynh/pytest_plugin.py | 45 ------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 django_ynh/pytest_plugin.py diff --git a/django_ynh/pytest_plugin.py b/django_ynh/pytest_plugin.py deleted file mode 100644 index 652d9ed..0000000 --- a/django_ynh/pytest_plugin.py +++ /dev/null @@ -1,45 +0,0 @@ -import os -import sys -from pathlib import Path - -import pytest - -from django_ynh.path_utils import assert_is_dir, assert_is_file - - -def pytest_addoption(parser): - group = parser.getgroup("django_ynh") - group.addoption( - "--django_settings_path", - action="store", - metavar="path", - help='Path to YunoHost package settings.py file (in "conf" directory)', - ) - - -@pytest.hookimpl(tryfirst=True) -def pytest_load_initial_conftests(early_config, parser, args): - base_path = Path(__file__).parent.parent - - local_test = Path(base_path / 'local_test') - assert_is_dir(local_test) - - local_test_opt_yunohost = Path(local_test / 'opt_yunohost') - assert_is_dir(local_test_opt_yunohost) - - assert_is_file(local_test_opt_yunohost / 'django_ynh_demo_settings.py') - - sys.path.insert(0, str(local_test_opt_yunohost)) - os.environ['DJANGO_SETTINGS_MODULE'] = 'django_ynh_demo_settings' - - # print(1111111111111, early_config) # _pytest.config.Config - # print(22222, parser) # _pytest.config.argparsing.Parser - # print(3333, args) # ['--import-mode=importlib', '--reuse-db', '--nomigrations', '--cov=.', '--cov-report', 'term-missing', '--cov-report', 'html', '--cov-report', 'xml', '--no-cov-on-fail', '--showlocals', '--doctest-modules', '--failed-first', '--last-failed-no-failures', 'all', '--new-first', '-p', 'django_ynh.pytest_plugin', '-x', '--trace-config'] - # - # options = parser.parse_known_args(args) - # if options.version or options.help: - # return - # - # conf_path = options.conf_path - # - # raise RuntimeError(f'{conf_path}')