Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Fix uncollect when no data pass through to it (pytest 2.7.0 bug) #3037

Merged
merged 1 commit into from
May 31, 2016
Merged

Fix uncollect when no data pass through to it (pytest 2.7.0 bug) #3037

merged 1 commit into from
May 31, 2016

Conversation

jkrocil
Copy link
Contributor

@jkrocil jkrocil commented May 30, 2016

Fix uncollect when no data pass through to it (pytest 2.7.0 bug, issue #510)
Parametrize using testgen to utilize param check everywhere
Rename skip funcs to uncollect so their names match their purpose

@jkrocil jkrocil changed the title Fix uncollect when no data pass through to it (pytest 2.7.0 bug, issu… Fix uncollect when no data pass through to it (pytest 2.7.0 bug) May 30, 2016
@dajoRH dajoRH added the lint-ok label May 30, 2016
@jkrocil
Copy link
Contributor Author

jkrocil commented May 30, 2016

This might fix some issues but introduce new failures; it could uncover new problems.

@RonnyPfannschmidt
Copy link
Contributor

for references pytest-dev/pytest#510 and the fix merged by pytest-dev/pytest#1530

pytest release pending, it should be easier to fix after merging #2661

@jkrocil
Copy link
Contributor Author

jkrocil commented May 31, 2016

@RonnyPfannschmidt this PR will ensure that when we pass argnames but no argvalues to parametrize, it will not err but it will also not create a skipping test. It will uncollect it completely. This is done a) through testgen.parametrize which utilizes testgen.param_check which checks arvalues for data and marks the test with mark.uncollect if no data were found or b) even if test is not passed through testgen.parametrize but just metafunc.parametrize without the param_check, we do the check for argvalues inside the pytest_collection_modifyitems hook.

So once the PR is merged and we run pytest 2.9.0, we will still want to have this change in place if I understand correctly because pytest will never completely uncollect a test, there will always be at least a single skipping item. Right?

@RonnyPfannschmidt
Copy link
Contributor

correct, we might want to ensure thats documented then

…#510)

Parametrize using testgen to utilize param check everywhere
Rename skip funcs to uncollect so their names match their purpose
@dajoRH
Copy link
Contributor

dajoRH commented May 31, 2016

Lint report for commit f8423ce:

Everything seems all right 😄 .
CFME QE Bot

@mfalesni mfalesni merged commit f8423ce into ManageIQ:master May 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants