-
Notifications
You must be signed in to change notification settings - Fork 42
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
generate fixture for PostGenerationMethodCall declaration #103
Conversation
@youtux I will be very grateful if you find some time to review this PR because such a change will make working with the |
tests/test_postgen_dependencies.py
Outdated
assert foo._create is True | ||
|
||
|
||
@pytest.mark.parametrize("foo__set2", [123]) | ||
def test_postgeneration_fixture(foo): | ||
"""Test fixture for ``PosGeneration`` declaration.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo PostGeneration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for a review ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok to me
hi 👋 could you prepare a new release with this feature included? |
@youtux could you please review this PR? |
@pytest.mark.parametrize( | ||
("foo__secret", "foo__number"), | ||
[ | ||
("test secret", 456), | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make 2 different calls to parametrize. It should look more neat
Sorry it took so long, I didn't have it under my radar |
@youtux sorry for the delay from my side, but if you want I can add another PR with changes suggested by you |
No worries, I already applied the suggestion and merged the pr. also release a new version with this fix on pypi |
Closes #87
This PR adds fixtures generation for all subclasses (except
RelatedFactory
) ofPostGenerationDeclaration
.The fixture is generated from
attr_fixture
and it's simply passed as acontext.value
to declaration'scall()
method call, so it will be available for:PostGeneration
infunction
asextracted
PostGenerationMethodCall
as first argument of called methodThis change is