Skip to content

Commit

Permalink
test: improve functional tests (#921)
Browse files Browse the repository at this point in the history
* test(functional): remove obsolete `project_with_future_deprecated_obsolete_argument`

* test: rename `data` to `fixtures`

* test(unit): avoid dependency on full projects

* test(functional): depend on exact versions

* test(functional): use `arrow` instead of `tomli`

`tomli` is usually conditionally imported based on Python version, so
this breaks tests on specific versions.
  • Loading branch information
mkniewallner authored Oct 29, 2024
1 parent b8e1882 commit d9a1ba1
Show file tree
Hide file tree
Showing 101 changed files with 519 additions and 539 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ source = ["python/deptry"]
mypy_path = "python"
files = ["python/deptry", "scripts", "tests"]
explicit_package_bases = true
exclude = ["tests/data"]
exclude = ["tests/fixtures"]
disallow_any_unimported = true
enable_error_code = [
"ignore-without-code",
Expand Down Expand Up @@ -119,12 +119,12 @@ DEP001 = ["tomllib"]
[tool.pytest.ini_options]
addopts = "--doctest-modules"
filterwarnings = ["error"]
norecursedirs = ["data*"]
norecursedirs = ["fixtures*"]

[tool.ruff]
line-length = 120
fix = true
extend-exclude = ["tests/data/*"]
extend-exclude = ["tests/fixtures/*"]

[tool.ruff.format]
preview = true
Expand Down
20 changes: 0 additions & 20 deletions tests/data/example_project/pyproject.toml

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions tests/data/project_with_gitignore/pyproject.toml

This file was deleted.

2 changes: 0 additions & 2 deletions tests/data/project_with_poetry/poetry.toml

This file was deleted.

33 changes: 0 additions & 33 deletions tests/data/project_with_poetry/pyproject.toml

This file was deleted.

37 changes: 0 additions & 37 deletions tests/data/project_with_poetry/src/notebook.ipynb

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions tests/data/project_with_requirements_in/requirements.in

This file was deleted.

37 changes: 0 additions & 37 deletions tests/data/project_with_requirements_in/src/notebook.ipynb

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions tests/data/project_with_requirements_txt/requirements.txt

This file was deleted.

7 changes: 0 additions & 7 deletions tests/data/project_with_requirements_txt/src/main.py

This file was deleted.

37 changes: 0 additions & 37 deletions tests/data/project_with_requirements_txt/src/notebook.ipynb

This file was deleted.

This file was deleted.

Loading

0 comments on commit d9a1ba1

Please sign in to comment.