diff --git a/docs/development.rst b/docs/development.rst index 003ffad96c2e059689403a4f34be6ef5ee4bc9f8..796247231e907b4debc8de8a628a3c84227ba96a 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -70,13 +70,8 @@ functional tests (within ``functional_tests/`` directory). Tests can be run in a number of different ways, depending on what you want to test and how. -To run the unit tests via setup script, run the following command from -repository root:: - - python setup.py test - -To run the unit tests directly, run the following command from -repository root:: +To run the unit tests, run the following command from repository +root:: pytest @@ -125,16 +120,16 @@ Tests can also be run using `tox `_: :: # Run full suite of tests on all supported Python versions. - tox + tox run # List available tox environments. - tox -l + tox list # Run tests against specific Python version. - tox -e py38 + tox run -e py38 # Run documentation and linting tests only. - tox -e doc,lint + tox run -e doc,lint Running tests on all supproted Python versions @@ -180,7 +175,7 @@ perform the following steps: :: - tox --workdir /tmp/ + tox run --workdir /tmp/ Building documentation diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 9af7e6f11bb01f7306f796faf7bfbe3e2955cd94..0000000000000000000000000000000000000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[aliases] -test=pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 7d5b340bb555af25f01c6a29df2c2eebdd961342..b2b5a277ad7c90669124f1ec45d1e88a9f685e98 100755 --- a/setup.py +++ b/setup.py @@ -36,25 +36,21 @@ doc_requirements = [ ] test_lint_requirements = [ - 'flake8>=3.8,<3.9', + 'flake8>=7.0,<7.1', ] test_requirements = [ - 'freezegun>=1.0,<1.1', - 'pytest>=6.1,<6.2', - 'pytest-cov>=2.10,<2.11', - 'tox>=3.20,<3.21', - 'pexpect>=4.8,<4.9', + 'freezegun>=1.3,<1.4', + 'pytest>=8.0,<8.1', + 'pytest-cov>=4.1,<4.2', + 'tox>=4.13,<4.14', + 'pexpect>=4.9,<4.10', ] release_requirements = [ 'twine', ] -setup_requirements = [ - 'pytest-runner>=5.2,<5.3', -] - development_requirements = doc_requirements + test_requirements + test_lint_requirements + release_requirements extras_requirements = { @@ -80,7 +76,6 @@ setup( author_email='branko@majic.rs', python_requires=python_requirements, install_requires=install_requirements, - setup_requires=setup_requirements, tests_require=test_requirements, extras_require=extras_requirements, entry_points={ diff --git a/tox.ini b/tox.ini index 36705607c0a9f4f2688ea265a2fd01f2b4f504f2..e92d203da7b26bca7e9416b33be25266b3b2b3e6 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = {py38,py39},lint,doc [testenv] -whitelist_externals = +allowlist_externals = make basepython = @@ -14,6 +14,11 @@ basepython = deps = .[test] +setenv = + # Force column width for functional tests since they depend on + # predictable output format. + COLUMNS=80 + commands = # Must specify cov-report explicitly, otherwise coverage starts # going through the tests as well.