Skip to content

Commit

Permalink
Improve tests with syrupy and fixture (#425)
Browse files Browse the repository at this point in the history
* Add syrupy package to Poetry

* Add fixture and update the tests for syrupy
  • Loading branch information
klaasnicolaas authored Apr 15, 2024
1 parent b77a1ef commit 7eb7d37
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 91 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ To run just the Python tests:
poetry run pytest
```

To update the [syrupy](https://github.com/tophat/syrupy) snapshot tests:

```bash
poetry run pytest --snapshot-update
```

## License

MIT License
Expand Down
39 changes: 21 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ pytz = "^2023.3"
Changelog = "https://github.com/klaasnicolaas/python-odp-gent/releases"

[tool.poetry.group.dev.dependencies]
ruff = "0.3.7"
aresponses = "3.0.0"
blacken-docs = "1.16.0"
codespell = "2.2.6"
covdefaults = "2.3.0"
coverage = {version = "7.4.4", extras = ["toml"]}
mypy = "1.9.0"
pre-commit = "3.7.0"
Expand All @@ -48,9 +48,10 @@ pylint = "3.1.0"
pytest = "8.1.1"
pytest-asyncio = "0.23.6"
pytest-cov = "5.0.0"
yamllint = "1.35.1"
covdefaults = "2.3.0"
ruff = "0.3.7"
syrupy = "4.6.1"
types-pytz = "2024.1.0.20240203"
yamllint = "1.35.1"

[tool.coverage.run]
plugins = ["covdefaults"]
Expand Down Expand Up @@ -94,6 +95,9 @@ warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.pylint.MASTER]
ignore = ["tests"]

[tool.pylint.BASIC]
good-names = ["_", "ex", "fp", "i", "id", "j", "k", "on", "Run", "T"]

Expand Down
Loading

0 comments on commit 7eb7d37

Please sign in to comment.