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

7119: data loss with mistyped --basetemp #7170

Merged
merged 17 commits into from
Jun 9, 2020
Merged

7119: data loss with mistyped --basetemp #7170

merged 17 commits into from
Jun 9, 2020

Conversation

primaprashant
Copy link
Contributor

Raise exception if basetemp argument is empty string or . or parent folder of current working directory.

Closes #7119

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.

Thanks @prashant616! I left some comments.

src/_pytest/main.py Outdated Show resolved Hide resolved
src/_pytest/main.py Outdated Show resolved Hide resolved
src/_pytest/main.py Outdated Show resolved Hide resolved
src/_pytest/main.py Outdated Show resolved Hide resolved
testing/test_main.py Outdated Show resolved Hide resolved
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @prashant616 for tackling this!

src/_pytest/main.py Outdated Show resolved Hide resolved
src/_pytest/main.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 May 6, 2020
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.

Great work @prashant616, LGTM with a minor suggestion to the changelog entry.

changelog/7119.bugfix.rst Outdated Show resolved Hide resolved
primaprashant and others added 2 commits May 11, 2020 00:06
Co-authored-by: Ran Benita <ran@unusedvar.com>
raise argparse.ArgumentTypeError(msg)

# check symlinks for ancestors
if is_ancestor(Path.cwd().resolve(), Path(path).resolve()):
Copy link
Member

Choose a reason for hiding this comment

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

a fair warning - this should probably be put in line with #5905 via #6523 due to windows aliasing behaviours

@RonnyPfannschmidt
Copy link
Member

@nicoddemus gentle ping, i believe this can go in with the caveat that the path check has to be crosschecked with the other pr

@nicoddemus
Copy link
Member

Thanks a lot @prashant616, and sorry about the delay here!

@nicoddemus nicoddemus merged commit e78207c into pytest-dev:master Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data loss with mistyped --basetemp
4 participants