Skip to content

Commit 29c01c5

Browse files
committed
Add (failing) test for feature
1 parent 00915ba commit 29c01c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_factory_fixtures.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,12 @@ def test_override_subfactory_with_lazy_fixture(self, another_book: Book):
213213
214214
"""
215215
assert another_book.author.name == "Another Author"
216+
217+
218+
class TestDeferredEvaluation:
219+
@pytest.mark.parametrize("book__name", ["bar"])
220+
def test_book_initialise_later(self, book_factory, book):
221+
assert book.name == "bar"
222+
223+
book_f = book_factory()
224+
assert book_f.name == "bar"

0 commit comments

Comments
 (0)