nix-direnv/tests/root.py
Jörg Thalheim 748988f4b9
rewrite tests using pytest
this allows us to use fixtures that are more flexible
2022-06-01 08:20:43 +02:00

24 lines
371 B
Python

#!/usr/bin/env python3
from pathlib import Path
import pytest
TEST_ROOT = Path(__file__).parent.resolve()
PROJECT_ROOT = TEST_ROOT.parent
@pytest.fixture
def test_root() -> Path:
"""
Root directory of the tests
"""
return TEST_ROOT
@pytest.fixture
def project_root() -> Path:
"""
Root directory of the tests
"""
return PROJECT_ROOT