dittodb
dittodb copied to clipboard
weird behavior with fixtures using count(*)
Using the vignette example with the nycflights data, if I change the query to a simple select count(*)
the saved fixture has a value of 0 instead of the actual output of the query. (It works fine with the original select statement).
I'm not sure though, I might be doing something wrong. But this is what my output looks like:
> start_db_capturing()
> fun_db()
count
1 133004
> stop_db_capturing()
> with_mock_db(
fun_db()
)
count
1 0
Sorry I didn't reply to this earlier. That does indeed seem wrong. Is it possible to re-run that with debugging on? YOu can enable that with something like set_dittodb_debug_level(3)
(or really any integer over 2..). That might point to where the bug is.
And of course if you're interested in submitting a PR, I would be happy to review + provide some pointers. If not, I can try and take a stab at it myself.