Skip to content

Remove dangerous sys.path manipulations in test_pluginmanager#3873

Merged
nicoddemus merged 2 commits into
pytest-dev:masterfrom
nicoddemus:sys-path-fix
Aug 26, 2018
Merged

Remove dangerous sys.path manipulations in test_pluginmanager#3873
nicoddemus merged 2 commits into
pytest-dev:masterfrom
nicoddemus:sys-path-fix

Conversation

@nicoddemus

Copy link
Copy Markdown
Member

Noticed these while working in something else

Noticed these while working in something else

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yikes! 😬

@coveralls

coveralls commented Aug 25, 2018

Copy link
Copy Markdown

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
Copy Markdown
Member Author

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

Comment thread testing/test_pytester.py
assert imported.data == 42


def test_inline_run_clean_sys_paths(testdir):

Copy link
Copy Markdown
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
Copy Markdown
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