diff --git a/Pipfile b/Pipfile index 3bc431e..9f87aac 100644 --- a/Pipfile +++ b/Pipfile @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 4200d0c..92da340 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 +""" diff --git a/setup.cfg b/setup.cfg index 2495308..b73631f 100644 --- a/setup.cfg +++ b/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 diff --git a/setup.py b/setup.py index b5aed9c..0c022bc 100644 --- a/setup.py +++ b/setup.py @@ -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, diff --git a/tasks.py b/tasks.py index c8b6584..0866606 100644 --- a/tasks.py +++ b/tasks.py @@ -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"})