From 2897755caeb2e216ea5ee7a67c73a89b108adc15 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Jul 2021 08:10:37 -0400 Subject: [PATCH] Tests: Move contents of tests/conftest.py --- monkey/tests/conftest.py | 23 ----------------------- monkey/tests/unit_tests/conftest.py | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 23 deletions(-) delete mode 100644 monkey/tests/conftest.py diff --git a/monkey/tests/conftest.py b/monkey/tests/conftest.py deleted file mode 100644 index fc44af014..000000000 --- a/monkey/tests/conftest.py +++ /dev/null @@ -1,23 +0,0 @@ -import os -import sys -from pathlib import Path - -import pytest - -MONKEY_BASE_PATH = str(Path(__file__).parent.parent) -sys.path.insert(0, MONKEY_BASE_PATH) - - -@pytest.fixture(scope="session") -def data_for_tests_dir(pytestconfig): - return Path(os.path.join(pytestconfig.rootdir, "monkey", "tests", "data_for_tests")) - - -@pytest.fixture(scope="session") -def stable_file(data_for_tests_dir) -> Path: - return data_for_tests_dir / "stable_file.txt" - - -@pytest.fixture(scope="session") -def stable_file_sha256_hash() -> str: - return "d9dcaadc91261692dafa86e7275b1bf39bb7e19d2efcfacd6fe2bfc9a1ae1062" diff --git a/monkey/tests/unit_tests/conftest.py b/monkey/tests/unit_tests/conftest.py index 8e0fc96d9..64b2737c4 100644 --- a/monkey/tests/unit_tests/conftest.py +++ b/monkey/tests/unit_tests/conftest.py @@ -1,5 +1,27 @@ +import os +import sys +from pathlib import Path + import pytest +MONKEY_BASE_PATH = str(Path(__file__).parent.parent.parent) +sys.path.insert(0, MONKEY_BASE_PATH) + + +@pytest.fixture(scope="session") +def data_for_tests_dir(pytestconfig): + return Path(os.path.join(pytestconfig.rootdir, "monkey", "tests", "data_for_tests")) + + +@pytest.fixture(scope="session") +def stable_file(data_for_tests_dir) -> Path: + return data_for_tests_dir / "stable_file.txt" + + +@pytest.fixture(scope="session") +def stable_file_sha256_hash() -> str: + return "d9dcaadc91261692dafa86e7275b1bf39bb7e19d2efcfacd6fe2bfc9a1ae1062" + @pytest.fixture def patched_home_env(monkeypatch, tmp_path):