From 56aeea38f048d7a8f8946302458062abb9e40916 Mon Sep 17 00:00:00 2001 From: Rob Nagler <5495179+robnagler@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:34:54 -0600 Subject: [PATCH] Fix #8 conftest.py adds project root to sys.path (#10) --- tests/conftest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..36e1fe3 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,14 @@ +"""Set up for chronver tests + +:copyright: Copyright (c) 2024 RadiaSoft LLC. All Rights Reserved. +:license: http://www.apache.org/licenses/LICENSE-2.0.html +""" + +import pytest + + +@pytest.hookimpl(tryfirst=True) +def pytest_runtest_protocol(*args, **kwargs): + import pathlib, sys + + sys.path.insert(0, str(pathlib.Path(__file__).parent.parent))