Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
use pytest-datadir instead of my custom thing which was broken
  • Loading branch information
salotz committed Mar 12, 2024
1 parent b4e7367 commit d4d6e47
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 39 deletions.
1 change: 1 addition & 0 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ python = "3.12"

dependencies = [
"pytest",
"pytest-datadir",
"black",
"ruff",
"mypy",
Expand Down
26 changes: 0 additions & 26 deletions tests/conftest.py

This file was deleted.

12 changes: 6 additions & 6 deletions tests/test_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@


@pytest.mark.pointer(target=detect_files)
def test_detect_files(test_data_dir):
assert len(detect_files(test_data_dir / "detect_files")) == 2
def test_detect_files(datadir):
assert len(detect_files(datadir / "detect_files")) == 2


@pytest.mark.pointer(target=resolve_fq_modules)
def test_resolve_fq_modules(test_data_dir):
def test_resolve_fq_modules(datadir):

expected_module_fqs = [
"mymodule.thing",
"mymodule.other",
]

search_dir = test_data_dir / "resolve_fq_modules"
search_dir = datadir / "resolve_fq_modules"
modpath = search_dir / "mymodule"
submod_paths = [
modpath / "thing.py",
Expand All @@ -44,9 +44,9 @@ def test_resolve_fq_modules(test_data_dir):


@pytest.mark.pointer(target=resolve_fq_targets)
def test_resolve_fq_targets(test_data_dir):
def test_resolve_fq_targets(datadir):

search_dir = test_data_dir / "resolve_fq_targets"
search_dir = datadir / "resolve_fq_targets"
modpath = search_dir / "mymodule"
submod_paths = modpath.glob("**/*.py")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions tests/test_data.py

This file was deleted.

0 comments on commit d4d6e47

Please sign in to comment.