-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Multiple calls to parametrize result in empty value lists not skipping the test #510
Labels
topic: parametrize
related to @pytest.mark.parametrize
type: bug
problem that needs to be addressed
type: regression
indicates a problem that was introduced in a release which was working previously
Comments
RonnyPfannschmidt
added a commit
to RonnyPfannschmidt/pytest
that referenced
this issue
Apr 21, 2016
RonnyPfannschmidt
added
the
type: regression
indicates a problem that was introduced in a release which was working previously
label
Apr 24, 2016
i just found a skip thats in place for this, but not being triggered |
found the skip reason callspec copying does not copy the trigger |
nicoddemus
added a commit
that referenced
this issue
May 30, 2016
fix #510 by adding a describing skip marker on empty parameterize
This was referenced May 31, 2016
Merged
jsonn
pushed a commit
to jsonn/pkgsrc
that referenced
this issue
Jun 6, 2016
2.9.2 ===== **Bug Fixes** * fix `#510`_: skip tests where one parameterize dimension was empty thanks Alex Stapleton for the Report and `@RonnyPfannschmidt`_ for the PR * Fix Xfail does not work with condition keyword argument. Thanks `@astraw38`_ for reporting the issue (`#1496`_) and `@tomviner`_ for PR the (`#1524`_). * Fix win32 path issue when puttinging custom config file with absolute path in ``pytest.main("-c your_absolute_path")``. * Fix maximum recursion depth detection when raised error class is not aware of unicode/encoded bytes. Thanks `@prusse-martin`_ for the PR (`#1506`_). * Fix ``pytest.mark.skip`` mark when used in strict mode. Thanks `@pquentin`_ for the PR and `@RonnyPfannschmidt`_ for showing how to fix the bug. * Minor improvements and fixes to the documentation. Thanks `@omarkohl`_ for the PR. * Fix ``--fixtures`` to show all fixture definitions as opposed to just one per fixture name. Thanks to `@hackebrot`_ for the PR. .. _#510: pytest-dev/pytest#510 .. _#1506: pytest-dev/pytest#1506 .. _#1496: https://github.com/pytest-dev/pytest/issue/1496 .. _#1524: https://github.com/pytest-dev/pytest/issue/1524 .. _@prusse-martin: https://github.com/prusse-martin .. _@astraw38: https://github.com/astraw38
This was referenced Jul 26, 2016
This was referenced Aug 13, 2016
This was referenced Aug 23, 2016
Merged
This was referenced Sep 23, 2016
This was referenced Oct 4, 2017
This was referenced Oct 16, 2017
This was referenced Oct 29, 2017
This was referenced Nov 11, 2017
Merged
This was referenced Nov 20, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic: parametrize
related to @pytest.mark.parametrize
type: bug
problem that needs to be addressed
type: regression
indicates a problem that was introduced in a release which was working previously
Originally reported by: Alex Stapleton (BitBucket: private, GitHub: private)
If you call parametrize on a test more than once for different arguments of the test it doesn't seem to combine the parameters correctly if some of them are empty. This results in tests that would normally get skipped because their parametisation is missing values receiving the internal
_notset
sentinel object for that fixture.Examples here https://gist.github.com/public/e671a53b70fbb6fb6129
The last example is the simplest reproduction of the problem.
This does not get skipped and
fixP
is_notset
.but if you swap the order of the calls to parametrize...
it skips as you would expect from reading the documentation.
I've reproduced this on 2.5.2 and on the current master 2.6 branch.
The text was updated successfully, but these errors were encountered: