Skip to content
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

5.1.0: pytest fails in 4 units #106

Open
kloczek opened this issue Mar 12, 2024 · 3 comments
Open

5.1.0: pytest fails in 4 units #106

kloczek opened this issue Mar 12, 2024 · 3 comments

Comments

@kloczek
Copy link

kloczek commented Mar 12, 2024

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
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using installer module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-vine-5.1.0-4.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-vine-5.1.0-4.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/vine-5.1.0
configfile: setup.cfg
testpaths: t/unit/
collected 42 items

t/unit/test_abstract.py ..                                               [  4%]
t/unit/test_funtools.py .........                                        [ 26%]
t/unit/test_promises.py ...........................                      [ 90%]
t/unit/test_synchronization.py FFFF                                      [100%]

=================================== FAILURES ===================================
__________________________ test_barrier.test_evaluate __________________________

self = <t.unit.test_synchronization.test_barrier object at 0x7f5a978c32b0>

    def test_evaluate(self):
>       x = barrier(self.ps)
E       AttributeError: 'test_barrier' object has no attribute 'ps'

t/unit/test_synchronization.py:16: AttributeError
__________________________ test_barrier.test_reverse ___________________________

self = <t.unit.test_synchronization.test_barrier object at 0x7f5a978c3fd0>

    def test_reverse(self):
        callback = Mock()
>       x = barrier(self.ps, callback=promise(callback))
E       AttributeError: 'test_barrier' object has no attribute 'ps'

t/unit/test_synchronization.py:34: AttributeError
___________________________ test_barrier.test_cancel ___________________________

self = <t.unit.test_synchronization.test_barrier object at 0x7f5a978c3b20>

    def test_cancel(self):
>       x = barrier(self.ps)
E       AttributeError: 'test_barrier' object has no attribute 'ps'

t/unit/test_synchronization.py:41: AttributeError
___________________________ test_barrier.test_throw ____________________________

self = <t.unit.test_synchronization.test_barrier object at 0x7f5a978c39d0>

    def test_throw(self):
>       x = barrier(self.ps)
E       AttributeError: 'test_barrier' object has no attribute 'ps'

t/unit/test_synchronization.py:50: AttributeError
=========================== short test summary info ============================
FAILED t/unit/test_synchronization.py::test_barrier::test_evaluate - Attribut...
FAILED t/unit/test_synchronization.py::test_barrier::test_reverse - Attribute...
FAILED t/unit/test_synchronization.py::test_barrier::test_cancel - AttributeE...
FAILED t/unit/test_synchronization.py::test_barrier::test_throw - AttributeEr...
========================= 4 failed, 38 passed in 0.16s =========================
List of installed modules in build env:
Package            Version
------------------ -----------
build              1.1.1
distro             1.9.0
exceptiongroup     1.1.3
importlib_metadata 7.0.1
iniconfig          2.0.0
installer          0.7.0
packaging          24.0
pluggy             1.4.0
pyproject_hooks    1.0.0
pytest             8.1.1
python-dateutil    2.9.0.post0
setuptools         69.1.1
tokenize_rt        5.2.0
tomli              2.0.1
wheel              0.43.0
zipp               3.17.0

Please let me know if you need more details or want me to perform some diagnostics.

@Nusnus
Copy link
Member

Nusnus commented Mar 13, 2024

Hey there, thank you for reporting this issue.
May I ask for a contribution to fix this?

I’d happily review a PR to help get this done quickly.

Thank you.

@kloczek
Copy link
Author

kloczek commented Mar 13, 2024

As long as looks like it is only test suite issue and kind of busy (look on my status) currently have no time 😞

@mgorny
Copy link
Contributor

mgorny commented Apr 5, 2024

This is already fixed in cf9b397.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants