Changeset - 9293b6b67ca7
[Not reviewed]
1 3 0
Branko Majic (branko) - 2 months ago 2024-02-23 19:26:52
branko@majic.rs
GC-45: Update development-related requirements:

- Dropped ability to run setup.py test command (deprecation).
- Updated documentation for tox invocations.
- Updated all test and development-related requirements.
- Dropped use of deprecated project pytest-runner.
- Updated tox configuration (deprecations).
- Unfortunately, tox seems to mess with the COLUMNS environment
variable that breaks functional tests which depend on specific
formatting of help (breaklines included). Make sure the tests run
with column width of 80.
4 files changed with 19 insertions and 26 deletions:
0 comments (0 inline, 0 general)
docs/development.rst
Show inline comments
 
@@ -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 <https://tox.readthedocs.io/>`_:
 
::
 

	
 
  # 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
setup.cfg
Show inline comments
 
deleted file
setup.py
Show inline comments
 
@@ -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={
tox.ini
Show inline comments
 
@@ -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.
0 comments (0 inline, 0 general)