New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.1.1: pytest is failing #5
Comments
Thanks for this report. It's worth mentioning a few things. I haven't touched this code in forever so the integration tests could very well could be breaking. I'll double check that. Either way, I think it'd be good to add That said, this repository is simply not set up for pytest so I make no guarantees on pytest running. This repository uses standard unittest calls that ship with Python and Are you calling pytest yourself? If so, I recommend to instead Anyway, I'll give this a shot over the weekend and let you know how it goes. |
Thank you 👍 And tox: I'm running wole build in isolated env which has installaled only what is required during build, install and test so running tox does not make to much sense. Other thing is that use pytest instead tox allows me to perform mass tests across all packages with pytjon modules (currently I have +1.1k such packages) and alter testing procedure by py install in build env additional pytest extension adn/or change rpm %pytest macro definition to execute pytest with some addional params. |
All the same, the fix seems to be trivial and is available for review over at #6. Please try that branch out and let me know if you're still getting the error. |
Just tested that and indeed it fixed the issue. However I see as well some warnings as well + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-code-include-1.1.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-code-include-1.1.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-code-include-1.1.1
configfile: setup.cfg
testpaths: tests
plugins: Faker-18.4.0
collected 37 items
tests/integrations/test_code_include.py ...... [ 16%]
tests/unittests/test_code_include.py ................. [ 62%]
tests/unittests/test_tag.py .............. [100%]
===================================================================================== warnings summary ======================================================================================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1248
/usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1248: PytestRemovedIn8Warning: The --strict option is deprecated, use --strict-markers instead.
self.issue_config_time_warning(
../../BUILDROOT/python-sphinx-code-include-1.1.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/code_include/extension.py:16
/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-code-include-1.1.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/code_include/extension.py:16: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
_SETTINGS = frontend.OptionParser().get_default_values()
../../../../../usr/lib64/python3.8/optparse.py:1000: 50 warnings
/usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
option = self.option_class(*args, **kwargs)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================== 37 passed, 52 warnings in 4.81s ============================================================================== |
Oh okay. Well luckily that line is unused so it can be removed. Thanks for your issue and please let me know if you face any more problems! |
issues/5-invalid_mock_configuration
I'm packaging 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
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: