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 Module.name from full path without drive letter #7643

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

nicoddemus
Copy link
Member

Fix #7628

src/_pytest/nodes.py Outdated Show resolved Hide resolved
@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Aug 14, 2020
@nicoddemus
Copy link
Member Author

Decided to refactor _parsearg into a free function and add more unittests. 👍

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Left some comments, and CI seems to be failing, but +1 from on the fix and the split to standalone functions.

src/_pytest/main.py Outdated Show resolved Hide resolved
src/_pytest/main.py Outdated Show resolved Hide resolved
def resolve_path_argument(
invocation_dir: py.path.local, arg: str, *, as_pypath=False
) -> Tuple[py.path.local, List[str]]:
"""Parse path arguments optionally containing selection parts and return (fspath, names).
Copy link
Member

Choose a reason for hiding this comment

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

Great comment

src/_pytest/main.py Outdated Show resolved Hide resolved
@nicoddemus nicoddemus merged commit afa4760 into pytest-dev:master Aug 17, 2020
@nicoddemus nicoddemus deleted the issue-7628 branch August 17, 2020 19:58
@nicoddemus
Copy link
Member Author

Hmmm I was hoping to backport this, but this would also need the pathlib improvements we have on master right now (notably absolutepath). Guess this fix can wait for 6.1 then.

@nicoddemus nicoddemus removed the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Aug 17, 2020
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.

pytest-6.0.1 does not find custom fixtures, test filename incorrect (just ..\..\)
2 participants