Skip to content

Commit

Permalink
Use pytest and update tested Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bennylope committed Oct 30, 2024
1 parent 5a06ba0 commit 433ad88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ requires-python = ">=3.9"
dependencies = [
"requests>=1.0.0",
]
[project.optional-dependencies]
tests = [
"requests>=1.0.0",
"httpretty>=0.9.7",
"pytest>=7.0",
"pytest-cov>=4.0",
]
docs = [
"Sphinx==7.0.1",
]

[project.urls]
Homepage = "https://github.com/bennylope/pygeocodio"
Expand All @@ -45,3 +55,11 @@ include = [
"README.rst",
"HISTORY.rst",
]

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q"
testpaths = [
"tests",
]
python_files = ["test_*.py", "*_test.py"]
1 change: 0 additions & 1 deletion requirements-docs.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[tox]
envlist = py38, py39, py310, py311, flake8
envlist = py39, py310, py311, py312, py313, flake8

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/geocodio
commands = python setup.py test
allowlist_externals = pytest
commands = pytest {posargs:tests/}
deps =
-r{toxinidir}/requirements.txt

.[tests]

[testenv:flake8]
basepython=python3
Expand Down

0 comments on commit 433ad88

Please sign in to comment.