Skip to content

Remove dangerous sys.path manipulations in test_pluginmanager #3873

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

Merged
merged 2 commits into from
Aug 26, 2018

Conversation

nicoddemus
Copy link
Member

Noticed these while working in something else

Noticed these while working in something else
Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

yikes! 😬

@coveralls
Copy link

coveralls commented Aug 25, 2018

Coverage Status

Coverage increased (+0.05%) to 92.639% when pulling b0541e9 on nicoddemus:sys-path-fix into be4b359 on pytest-dev:master.

The code in test_pytester has been refactored into a class right
above the dead code, and the code has been left there by mistake
apparently.
@nicoddemus
Copy link
Member Author

Found another one in test_monkeypatch, and some dead code in test_pytester.py

@@ -215,57 +215,6 @@ def test_foo():
assert imported.data == 42


def test_inline_run_clean_sys_paths(testdir):
Copy link
Member Author

Choose a reason for hiding this comment

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

The tests inside this test (!) have been refactored into a test class above this code, but this function (with 3 local functions which are never called) was left by mistake apparently.

Copy link
Member

Choose a reason for hiding this comment

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

I opened #3875 to try and surface these things better :)

@nicoddemus nicoddemus merged commit 2577a6c into pytest-dev:master Aug 26, 2018
@nicoddemus nicoddemus deleted the sys-path-fix branch August 26, 2018 11:54
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