You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a fixture needs to do some teardown, at the moment it ends up looking a bit like this:
deffixture db do
db = setup_db
teardown fn ->
close_db(db)
end
db
end
It might be nice to provide a better mechanism for teardown code. py.test has it's yield fixtures which are pretty nice, but (failing anything nicer) we could maybe provide a macro named yield/return/something that provides a bit of sugar around the above:
deffixture db do
db = setup_db
yield db, teardown: fn ->
close_db(db)
end
end
The text was updated successfully, but these errors were encountered:
If a fixture needs to do some teardown, at the moment it ends up looking a bit like this:
It might be nice to provide a better mechanism for teardown code. py.test has it's yield fixtures which are pretty nice, but (failing anything nicer) we could maybe provide a macro named yield/return/something that provides a bit of sugar around the above:
The text was updated successfully, but these errors were encountered: