MCPcopy Create free account
hub / github.com/idank/explainshell / test_nonexistent_db

Method test_nonexistent_db

tests/test_manager.py:2182–2191  ·  view source on GitHub ↗

Read-only commands fail cleanly when DB file doesn't exist.

(self)

Source from the content-addressed store, hash-verified

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# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected