Read-only commands fail cleanly when DB file doesn't exist.
(self)
| 2180 | self.assertIn("No database path", result.output) |
| 2181 | |
| 2182 | def test_nonexistent_db(self): |
| 2183 | """Read-only commands fail cleanly when DB file doesn't exist.""" |
| 2184 | |
| 2185 | runner = CliRunner() |
| 2186 | result = runner.invoke( |
| 2187 | cli, ["--db", "/tmp/does-not-exist-12345.db", "show", "stats"] |
| 2188 | ) |
| 2189 | |
| 2190 | self.assertNotEqual(result.exit_code, 0) |
| 2191 | self.assertIn("Database not found", result.output) |
| 2192 | |
| 2193 | |
| 2194 | # --------------------------------------------------------------------------- |
nothing calls this directly
no outgoing calls
no test coverage detected