Skip to content

Prove that PluginManger.register() ignores non-routines#97

Merged
goodboy merged 1 commit into
pytest-dev:masterfrom
goodboy:test_reject_non_routine_hookimpls
Nov 14, 2017
Merged

Prove that PluginManger.register() ignores non-routines#97
goodboy merged 1 commit into
pytest-dev:masterfrom
goodboy:test_reject_non_routine_hookimpls

Conversation

@goodboy

@goodboy goodboy commented Nov 12, 2017

Copy link
Copy Markdown
Contributor

This proves that #91 is a problem in pytest and not pluggy.
Thanks to @RonnyPfannschmidt for the fix about a year ago ;)

@goodboy goodboy force-pushed the test_reject_non_routine_hookimpls branch from 3fadbbf to 5f52422 Compare November 12, 2017 18:34
when registering a module which imports it.
"""
pm._implprefix = 'example'
conftest = types.ModuleType("conftest")

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.

For completeness, I would add an example_ function to one of the modules and ensure that it is collected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Heh, and found a bug from the _Multicall refactor.. shocker we've got no tests for the undecorated hook collection stuff.

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

Great work!

@goodboy goodboy force-pushed the test_reject_non_routine_hookimpls branch from 5f52422 to 3fa0ab4 Compare November 13, 2017 19:36
@goodboy

goodboy commented Nov 13, 2017

Copy link
Copy Markdown
Contributor Author

Hopefully the use of exec() doesn't fail on 2.6...

@goodboy goodboy force-pushed the test_reject_non_routine_hookimpls branch from 3fa0ab4 to 196229b Compare November 13, 2017 20:06
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`.
Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
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.

2 participants