From ae4a4e8e7cd626d59faa32e00a80914dfaeaecb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Nov 2023 08:14:14 +0100 Subject: [PATCH] make tests directory a proper python module --- tests/__init__.py | 0 tests/conftest.py | 4 ++-- tests/direnv_project.py | 3 ++- tests/test_gc.py | 4 ++-- tests/test_use_nix.py | 5 +++-- 5 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/conftest.py b/tests/conftest.py index 8a849bf..1f74975 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ pytest_plugins = [ - "direnv_project", - "root", + "tests.direnv_project", + "tests.root", ] diff --git a/tests/direnv_project.py b/tests/direnv_project.py index ebca017..d568183 100644 --- a/tests/direnv_project.py +++ b/tests/direnv_project.py @@ -6,7 +6,8 @@ from tempfile import TemporaryDirectory from typing import Iterator import pytest -from procs import run + +from .procs import run @dataclass diff --git a/tests/test_gc.py b/tests/test_gc.py index e46fcfd..48a62ad 100644 --- a/tests/test_gc.py +++ b/tests/test_gc.py @@ -3,9 +3,9 @@ import sys import unittest import pytest -from direnv_project import DirenvProject -from procs import run +from .direnv_project import DirenvProject +from .procs import run def common_test(direnv_project: DirenvProject) -> None: run(["nix-collect-garbage"]) diff --git a/tests/test_use_nix.py b/tests/test_use_nix.py index 0c79fa5..ce85a35 100644 --- a/tests/test_use_nix.py +++ b/tests/test_use_nix.py @@ -5,8 +5,9 @@ import unittest from typing import Optional import pytest -from direnv_project import DirenvProject -from procs import run + +from .direnv_project import DirenvProject +from .procs import run def direnv_exec(