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

Remove pytest tests from clients package #4478

Closed
kratsg opened this issue Mar 23, 2021 · 3 comments · Fixed by #4483
Closed

Remove pytest tests from clients package #4478

kratsg opened this issue Mar 23, 2021 · 3 comments · Fixed by #4483

Comments

@kratsg
Copy link

kratsg commented Mar 23, 2021

$ python3 -m pip install rucio-clients -qqq
$ rucio whoami
Traceback (most recent call last):
  File "/usr/local/bin/rucio", line 75, in <module>
    from rucio.tests.test_rucio_server import TestRucioClient
  File "/usr/local/lib/python3.6/site-packages/rucio/tests/test_rucio_server.py", line 28, in <module>
    import pytest
ModuleNotFoundError: No module named 'pytest'

It seems to be that the latest release is forcing a call to test_rucio_server which is causing this error to occur. Can this be triaged quickly and probably get the latest release yanked from pypi?

(Internal ATLAS reference to failed pipeline: https://gitlab.cern.ch/atlas-phys-susy-wg/Combinations/supersamples/-/jobs/12819064 )

@bari12
Copy link
Member

bari12 commented Mar 23, 2021

Thanks Giordon for reporting this.
The issue is due to us switching to pytest for testing (And the test files are included in the client package) this issue comes up if you do not have pytest in your environment.
We have to see how we fix this, probably we will remove the test files from the client package entirely.

For ATLAS workflows though it is recommended to use the rucio versions used in the ATLAS Local Root Base, since these are confirmed to work with ATLAS workflows and are tested more intensively in this context.

I have yanked the release in the meanwhile.

bziemons added a commit to bziemons/rucio that referenced this issue Mar 23, 2021
And use without pytest. Also remove rucio.tests from client package.
@kratsg
Copy link
Author

kratsg commented Mar 23, 2021

The issue is due to us switching to pytest for testing (And the test files are included in the client package) this issue comes up if you do not have pytest in your environment.

yes, of course, but I would expect that rucio would declare pytest as a dependency if so (but I don't usually see pytest as a required user dependency, only more a developer dependency and additionally not shipping any testing in the python package.

@bziemons
Copy link
Member

The issue was not introduced when switching to pytest, but here:

@pytest.mark.noparallel(reason='uses pre-defined RSE')
in fcf1f05

It was just overlooked by me that this file is used in the clients. I have prepared a fix by moving the test code in #4483

bziemons added a commit to bziemons/rucio that referenced this issue Mar 23, 2021
And use without pytest. Also remove rucio.tests from client package.
bziemons added a commit to bziemons/rucio that referenced this issue Mar 23, 2021
And use without pytest. Also remove rucio.tests from client package.
bari12 added a commit that referenced this issue Mar 23, 2021
…_client

Clients: Move server test to common; Fix #4478
bari12 pushed a commit that referenced this issue Mar 23, 2021
And use without pytest. Also remove rucio.tests from client package.
@bari12 bari12 added this to the 1.25.1.post1 milestone Mar 23, 2021
@bari12 bari12 changed the title Latest release is broken Remove pytest tests from clients package Mar 23, 2021
dynamic-entropy pushed a commit to dynamic-entropy/rucio that referenced this issue Mar 25, 2021
And use without pytest. Also remove rucio.tests from client package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants