scripttest
scripttest copied to clipboard
PytestCollectionWarning: cannot collect test class 'TestFileEnvironment' because it has a __init__ constructor (from: tests/test_testscript.py)
$ tox -e py37
GLOB sdist-make: /tmp/scripttest/setup.py
py37 inst-nodeps: /tmp/scripttest/.tox/.tmp/package/1/scripttest-1.3.zip
py37 installed: exceptiongroup==1.1.1,importlib-metadata==6.6.0,iniconfig==2.0.0,packaging==23.1,pluggy==1.0.0,pytest==7.3.2,scripttest @ file:///tmp/scripttest/.tox/.tmp/package/1/scripttest-1.3.zip#sha256=fbc6c9943df657a02515ae3a83d6acc3d385cd653d514cbab8cabb540febe183,tomli==2.0.1,typing_extensions==4.6.3,zipp==3.15.0
py37 run-test-pre: PYTHONHASHSEED='2680854770'
py37 run-test: commands[0] | py.test
============================= test session starts ==============================
platform linux -- Python 3.7.16, pytest-7.3.2, pluggy-1.0.0
cachedir: .tox/py37/.pytest_cache
rootdir: /tmp/scripttest
collected 6 items
tests/test_string.py .... [ 66%]
tests/test_testscript.py .. [100%]
=============================== warnings summary ===============================
scripttest.py:58
/tmp/scripttest/scripttest.py:58: PytestCollectionWarning: cannot collect test class 'TestFileEnvironment' because it has a __init__ constructor (from: tests/test_testscript.py)
class TestFileEnvironment:
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================= 6 passed, 1 warning in 1.12s =========================
___________________________________ summary ____________________________________
py37: commands succeeded
congratulations :)