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

pytest 2.6 remove some strings in pathname #544

Closed
pytestbot opened this issue Jul 23, 2014 · 7 comments
Closed

pytest 2.6 remove some strings in pathname #544

pytestbot opened this issue Jul 23, 2014 · 7 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: BitBucket: mapi, GitHub: mapi


in pytest 2.6

If pathname include '@[0-9]' , these strings would removed.

here is some sample.

#!shell

% ls
> mycode@2  mycode@abc

% py.test mycode@2/test
> ============================= test session starts ==============================
> platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0
> ERROR: file not found: mycode/test
>
> ===============================  in 0.00 seconds ===============================

% py.test mycode@abc/test
> ============================= test session starts ==============================
> platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0
> collected 0 items
>
> ===============================  in 0.00 seconds ===============================

mycode@abc/test is works, but mycode@2/test replaced mycode/test


@pytestbot
Copy link
Contributor Author

Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub):


Uh, I consider this rather bad. I think it's caused by https://bitbucket.org/hpk42/pytest/commits/6fa216bce897473c4abc86e18aaf502e65d39130 which we should either fix or revert for 2.6.1 I guess...

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Hum, completely reverting the linked changeset sounds a bit big to me. What about restricting to only strip out "@" if it comes next to a ".py" file?

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


fix issue544 by only removing "@num" at the end of a part (parts are
separated by "::") and if the part has an .py extension.

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


This is actually not fully resolved until pull request #186 is merged.

@pytestbot
Copy link
Contributor Author

Original comment by Anatoly Bubenkov (BitBucket: bubenkoff, GitHub: bubenkoff):


Merged in fix_initial_parsing (pull request #186)

Fix issue544 and fix another issue with parsing ::

@pytestbot
Copy link
Contributor Author

Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub):


I would propose to change the output of --verbose to be the actual node ID itself, i.e. losing the line number alltogether. The line number and filename are still retrievable from the traceback info anyway.

Also I think for the original issue would it not make sense to have the full node ID in the header of the failure report?

If dropping the line numbers from -v is not acceptable I'd suggest reverting the -v output change and only showing the node ID in the report header.

@pytestbot
Copy link
Contributor Author

Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub):


Oh, never mind my last comment. If everyone is happy with the merged solution I'll be fine with it. I was working offline at the airport and didn't know updates had already happened...

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant