Skip to content

Commit

Permalink
Migrate entrypoint of test from setuptools to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
road-master committed Nov 6, 2021
1 parent 0b1106c commit 2212654
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
7 changes: 4 additions & 3 deletions Pipfile
Expand Up @@ -20,14 +20,15 @@ pipenv-setup = "*"
pylint = "*"
# To test
pytest = "*"
radon = "*"
xenon = "*"
pytest-resource-path = "*"
pytest-asyncio = "*"
pytest-mock = "*"
radon = "*"
requests-mock = "*"
types-requests = "*"
showroompodcast = {editable = true, path = "."}
tox = "*"
types-requests = "*"
xenon = "*"

[packages]
# To use async / await syntax for CPU bound task
Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Expand Up @@ -40,3 +40,14 @@ module = [
"urllib3.*"
]
ignore_missing_imports = true

[tool.tox]
# see: https://pipenv-fork.readthedocs.io/en/latest/advanced.html#tox-automation-project
# Now we are avoiding to use tox-pipenv since we want to define only Pipenv as deps in tox.
legacy_tox_ini = """
[testenv]
deps = pipenv
commands=
pipenv install --skip-lock --dev
pytest tests
"""
3 changes: 0 additions & 3 deletions setup.cfg
@@ -1,8 +1,5 @@
[metadata]
license_files = LICENSE
[options]
setup_requires =
pytest-runner
[flake8]
exclude = docs
# see: https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Expand Up @@ -45,8 +45,6 @@
packages=find_packages(include=["showroompodcast", "showroompodcast.*"]),
package_data={"showroompodcast": ["py.typed"]},
python_requires=">=3.9",
test_suite="tests",
tests_require=["pytest>=3"],
url="https://github.com/road-master/showroom-podcast",
version="20210822183000",
zip_safe=False,
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Expand Up @@ -133,7 +133,7 @@ def test(context):
Run tests
"""
pty = platform.system() == "Linux"
context.run("python {} test".format(SETUP_PY), pty=pty)
context.run("tox -e py", pty=pty)


@task(help={"publish": "Publish the result via coveralls", "xml": "Export report as xml format"})
Expand Down

0 comments on commit 2212654

Please sign in to comment.