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

workaround for making tests pass #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

workaround for making tests pass #26

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 13, 2020

subj

except FileNotFoundError:
print("py.test-2.7 not found, trying generic name")
try:
subprocess.call(["py.test"] + list(args))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to use python 2 and 3 here to make sure its compatiable with both. From what I understand "py.test" could be either so it doesnt enforce python 2?

@ghost
Copy link
Author

ghost commented Apr 13, 2020

It absolutely doesn't enforce Python 2 and is supposed to stay backwards compatible (unless I did it wrong).

From what I understand "py.test" could be either

You are right. On a system with Python 3 only, I believe it's possible to have a py.test-3.x executable and a py.test symlink to it. As I said above, since my system has both versions of Python, py.test points to the Python 2 version of pytest, while py.test3 points to the Python 3 version.

All I've tried to do was to catch the exception I was getting on my system, since it doesn't have the hardcoded py.test-2.7 or py.test-3.3 executable, and try the more generic py.test and py.test3 names.

Edit: so far I'm not sure what changes am I supposed to make.

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.

1 participant