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

Fix the "setup.py test" command for updated src/ layout #3540

Closed
wants to merge 1 commit into from

Conversation

felixonmars
Copy link
Contributor

@felixonmars felixonmars commented Jun 5, 2018

Addresses #3536

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 92.752% when pulling 343a588 on felixonmars:patch-1 into 56b3a9e on pytest-dev:master.

@nicoddemus
Copy link
Member

Thanks @felixonmars,

I did try your branch in fresh virtual environment, but it doesn't seem to work:

λ python setup.py  test
C:\Users\Bruno\AppData\Local\Programs\Python\Python36\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'project_urls'
  warnings.warn(msg)
running test
Traceback (most recent call last):
  File "src/pytest.py", line 9, in <module>
    from _pytest.config import main, UsageError, cmdline, hookspec, hookimpl
  File "c:\pytest\src\_pytest\config.py", line 9, in <module>
    import six
ModuleNotFoundError: No module named 'six'

Is the command supposed to install dependencies? If it is, then setup.py test has been broken for quite some time.

@felixonmars
Copy link
Contributor Author

I did not rely on the dependency resolver AFAIK, it was used in Arch Linux's packaging of pytest. I have switched to a manual call to pytest.py on 3.6.1 for now (see below), so if you have decided to discontinue support for the old style, I‘ll continue use that in the future.

PYTHONPATH="$PWD"/build/lib python src/pytest.py

@RonnyPfannschmidt
Copy link
Member

the test command su supposed to test the local package at least in terms of setuptools

testing the build folder is kind of wrong in any case

from the full context i beleive we should remove the command as its not applicable to pytest as is

@nicoddemus
Copy link
Member

Everything I asked in #3536 (comment) has been answered here, thanks @felixonmars and @RonnyPfannschmidt!

@nicoddemus
Copy link
Member

Thanks everyone for the discussion. Closing in favor of #3536.

@nicoddemus nicoddemus closed this Jun 6, 2018
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

Successfully merging this pull request may close these issues.

4 participants