tests failing locally
areski opened this issue · 3 comments
areski commented
The tests are failing locally, here the error:
MIX_ENV=dev mix test
A new Hex version is available (0.13.0), please update with `mix local.hex`
.................................
Finished in 0.2 seconds
33 tests, 0 failures
Randomized with seed 988060
➜ sqlitex git:(fix-datetime-empty) ✗ MIX_ENV=dev mix test
A new Hex version is available (0.13.0), please update with `mix local.hex`
1) test moduledoc at Sqlitex.Statement (1) (StatementTest)
test/statement_test.exs:3
Doctest failed
code: {:ok, db} = Sqlitex.open(":memory:")
Sqlitex.query(db, "CREATE TABLE data (id, name);") === []
lhs: {:ok, []}
stacktrace:
lib/sqlitex/statement.ex:15: Sqlitex.Statement (module)
..................................
Finished in 0.2 seconds
35 tests, 1 failure
Randomized with seed 233801
mmmries commented
That same test breaks for me locally. It looks like I forgot to update the test (and somehow I got around CI checks?!?). We changed the query function to return an {:ok, results} or {:error, reason} tuple a little while ago so I'm pretty sure that test just needs to be updated.
@obmarg do you remember anything else about that test? Just want to sanity-check that fixing the test is the right move.
obmarg commented
Yeah, that doctest definitely looks wrong. Should either expect {:ok, []} or use Sqlitex.query!. Bit worrying that it doesn't seem to be running/failing on CI though...
mmmries commented
Locally I see 35 tests and on CI I see 34. Looks like travis isn't running the doc tests...