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
It would be quite handy to be able to test the behaviour of the code with different results from the query: what if the table is empty? What if the table has more (or less) rows than the pagination limit?
I would expect to be able to provide a name to the asset, so that the same query can be registered with different outcomes. This would probably indirectly solve #159 as well.
I think this is actually quite close to being a reality. start_db_capturing() already takes a path that it will save to, so that should be good. We could then add the case argument1 to with_mock_db() that then uses with_mock_path() internally when it is called.
Might you be interested in sending a PR that does that?
Footnotes
At the risk of bikeshedding: I totally see where case comes from, but I wonder if it might be better to call this path to match that use elsewhere in the package? ↩
It would be quite handy to be able to test the behaviour of the code with different results from the query: what if the table is empty? What if the table has more (or less) rows than the pagination limit?
I would expect to be able to provide a name to the asset, so that the same query can be registered with different outcomes. This would probably indirectly solve #159 as well.
Example code:
And test:
This would allow to use
dittodb
to run integration tests as well, instead of being able to test only the DB-to-R portion of the code.In theory this could be achieved using
with_mock_path
, but it does feel clunkierThe text was updated successfully, but these errors were encountered: