Skip to content
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

Proposal: Parametrize with fixtures #1660

Merged
merged 10 commits into from
Jun 25, 2016

Conversation

hackebrot
Copy link
Member

Please see the Problem section of the added document.

@hpk42 and myself worked on this proposal in the course of the pytest-dev sprint.

@hackebrot hackebrot added type: enhancement new feature or API change, should be merged into features branch type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature labels Jun 25, 2016
@coveralls
Copy link

coveralls commented Jun 25, 2016

Coverage Status

Coverage remained the same at 92.389% when pulling 5860c60 on hackebrot:parametrize-with-fixtures into f2bb3df on pytest-dev:features.

@The-Compiler
Copy link
Member

I think stuff like that should be in a separate subfolder, like proposals or so?

@hackebrot
Copy link
Member Author

@The-Compiler done. 👍

* This is very inconvenient if you wish to extend an existing test suite by
certain parameters for fixtures that are already used by tests

pytest version 3.0 and higher reports an error if you try to run above code::
Copy link
Contributor

@hpk42 hpk42 Jun 25, 2016

Choose a reason for hiding this comment

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

just talk about pytest-3.0, not "higher"

@hackebrot
Copy link
Member Author

I've added a new entry to the changelog. If you could please thumb this? @hpk42 @The-Compiler 🙇

@coveralls
Copy link

coveralls commented Jun 25, 2016

Coverage Status

Coverage remained the same at 92.389% when pulling 1b6bc4d on hackebrot:parametrize-with-fixtures into f2bb3df on pytest-dev:features.

@The-Compiler The-Compiler merged commit 35cd12e into pytest-dev:features Jun 25, 2016
Alternative approach
--------------------

A new helper function named ``fixture_request`` tells pytest to yield all
Copy link
Member

Choose a reason for hiding this comment

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

@hackebrot after discussing in person with @hpk42, he convinced me the first approach beats this one. 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

@nicoddemus can you please comment here, what made you change your mind? 😄 (I am aware it's been a while already 😁 )

Copy link
Member

Choose a reason for hiding this comment

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

I will try to remember then, but as you said it has been sometime already. 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, let me help you remember. Next beer is on me. 🍻

@hackebrot hackebrot deleted the parametrize-with-fixtures branch July 4, 2016 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch type: proposal proposal for a new feature, often to gather opinions or design the API around the new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants