deprecated
deprecated copied to clipboard
1.2.13: pytest warnings
I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
-
python3 -sBm build -w --no-isolation
- because I'm calling
build
with--no-isolation
I'm using during all processes only locally installed modules - install .whl file in </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-deprecated-1.2.13-5.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-deprecated-1.2.13-5.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/deprecated-1.2.13, configfile: setup.cfg
collected 159 items
tests/test.py .. [ 1%]
tests/test_deprecated.py ......................................... [ 27%]
tests/test_deprecated_class.py ....... [ 31%]
tests/test_deprecated_metaclass.py .... [ 33%]
tests/test_sphinx.py .................................................................................. [ 85%]
tests/test_sphinx_adapter.py ............ [ 93%]
tests/test_sphinx_class.py ....... [ 97%]
tests/test_sphinx_metaclass.py .... [100%]
============================================================================= warnings summary =============================================================================
tests/test_deprecated_class.py::test_simple_class_deprecation_with_args
/home/tkloczko/rpmbuild/BUILD/deprecated-1.2.13/tests/test_deprecated_class.py:148: DeprecationWarning: Call to deprecated class MyClass. (kwargs class)
MyClass(5)
tests/test_sphinx_class.py::test_isinstance_deprecated
/home/tkloczko/rpmbuild/BUILD/deprecated-1.2.13/tests/test_sphinx_class.py:134: DeprecationWarning: Call to deprecated class DeprecatedChildCls. (some reason) -- Deprecated since version Y.Z.
instance = DeprecatedChildCls()
tests/test_sphinx_class.py::test_isinstance_deprecated
/home/tkloczko/rpmbuild/BUILD/deprecated-1.2.13/deprecated/classic.py:173: DeprecationWarning: Call to deprecated class DeprecatedCls. (some reason) -- Deprecated since version X.Y.
return old_new1(cls, *args, **kwargs)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================================================== 159 passed, 3 warnings in 0.44s ======================================================================