Closed kloczek closed 2 years ago
Forgot to add that I'm using aioredis 2.0.1.
Hi @kloczek!
It is up to you, but it is IMHO quite unusual for packaging tests to include asgilook
, E2E or similar. From what I've seen in Falcon's packaging for Debian, Fedora/RedHat, Gentoo, etc, people just exercise the main test suite (i.e. the tests/
directory).
That being said, it is not possible to resolve your issue for 3.0.1 without releasing a new minor or micro version, because aioredis
was released after 3.0.1, so we had no clue they would change the interface so radically. The issue (https://github.com/falconry/falcon/issues/1938) is resolved in our master
branch via https://github.com/falconry/falcon/pull/1987. As such, we simply can not do anything meaningful here; closing this as duplicate.
(We are hoping to get 3.1.0 out the door some time in February.)
Just back to falcon
trying to finish package 3.1.0.
Looks like I need asgilook
and there is no that module on pypi.
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-falcon-3.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-falcon-3.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --import-mode=importlib
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/falcon-3.1.0, configfile: setup.cfg
collected 0 items / 1 error
================================================================================== ERRORS ==================================================================================
______________________________________________________________________ ERROR collecting test session _______________________________________________________________________
examples/asgilook/tests/conftest.py:12: in <module>
from asgilook.app import create_app
E ModuleNotFoundError: No module named 'asgilook'
========================================================================= short test summary info ==========================================================================
ERROR - ModuleNotFoundError: No module named 'asgilook'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.50s =============================================================================
Any hints?
It is up to you, but it is IMHO quite unusual for packaging tests to include
asgilook
, E2E or similar. From what I've seen in Falcon's packaging for Debian, Fedora/RedHat, Gentoo, etc, people just exercise the main test suite (i.e. thetests/
directory).
If only tests/ should be used this patch should be added as testpaths
in pytest.ini or pyporoject.toml.
This issue has been resolved in Falcon 3.1.0 regardless of what should be included in the test suite. We are not bugfixing SemVer minor versions, please upgrade to 3.1.0.
This issue has been resolved in Falcon 3.1.0 regardless of what should be included in the test suite.
3.1.0 still has missing testpaths
setings.
Thanks, but it sounds like an orthogonal suggestion. asgilook
tests are now expected to succeed should you decide to include them.
I wpould like to not stamp on sometbing wgich is still not working like I've reported that in https://github.com/falconry/falcon/issues/2006#issuecomment-1167098538 (which is about last 3.1.0). Just please make a decision about ise more than tests/ at the time when it will be ready.
I'll file testpaths
as a separate suggestion, thanks.
Re the current test (in fact, these are supplement material to one of our tutorials) at hand, I beg to differ on whether this is an issue. We do not necessarily support all our tests being able to run in isolation, we use tox
.
Please invoke as tox -e asgilook
.
Please invoke as
tox -e asgilook
.
"Nobody expects the Spanish Inquisition" ..
If that part of examples why not just use examples.asgilook
in import lines? 🤔
Because the tutorial is written from the reader's perspective building a new project using Falcon, outside of Falcon's source tree.
I'm still not convinced why pytest
should work without parameters. Is that defined somewhere in our setup configuration that this is the way how to test the Falcon package?
Why use tox
for testing, not pytest
. If you invoke pytest
in a different way, you're on your own.
I think adding testpaths
to the pytest setup.cfg file will solve most problems wrt pytest
invocation without parameters
Yes, I'll file that as a separate suggestion.
@CaselIT it is unclear whether that would help, because I saw in another issue by the same reporter that setup.cfg
was not used at all.
Unless that's removed by hand that seems very strange that pytest is not picking it up. Regardless adding that should not make things any worse
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
build
with--no-isolation
I'm using during all processes only locally installed modulesLookks like something is wrong in use of
aioredis
Here is pytest output: