Skip to content

Add option to disable plugin auto-loading#3787

Merged
nicoddemus merged 1 commit into
featuresfrom
unknown repository
Aug 9, 2018
Merged

Add option to disable plugin auto-loading#3787
nicoddemus merged 1 commit into
featuresfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Aug 6, 2018

Copy link
Copy Markdown

If PYTEST_DISABLE_PLUGIN_AUTOLOAD is set, disable auto-loading of
plugins through setuptools entrypoints. Only plugins that have been
explicitly specified are loaded.

ref #3784.

@coveralls

coveralls commented Aug 6, 2018

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.05%) to 92.519% when pulling 126896f on hsoft:no-plugin-autoload into a76cc8f on pytest-dev:features.

@RonnyPfannschmidt RonnyPfannschmidt changed the base branch from master to features August 7, 2018 05:05

@RonnyPfannschmidt RonnyPfannschmidt 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.

good initial iteration

@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.

just a minor thing, don't block on my review / approval 👍

Comment thread src/_pytest/config/__init__.py Outdated

self.pluginmanager.rewrite_hook = hook

if os.environ.get("PYTEST_DISABLE_PLUGIN_AUTOLOAD", ""):

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.

the default value can be left out here since get() returns None by default

If `PYTEST_DISABLE_PLUGIN_AUTOLOAD` is set, disable auto-loading of
plugins through setuptools entrypoints. Only plugins that have been
explicitly specified are loaded.

ref #3784.

@nicoddemus nicoddemus 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.

Well done @hsoft, thanks!

@nicoddemus nicoddemus merged commit 5f97711 into pytest-dev:features Aug 9, 2018
@nicoddemus

Copy link
Copy Markdown
Member

Invited @hsoft to join pytest-dev. 🎉

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