Directly insert a row with a bare source to test the checker.
(self, store, db_path)
| 47 | assert db_check(db_path) == [] |
| 48 | |
| 49 | def test_malformed_source(self, store, db_path): |
| 50 | """Directly insert a row with a bare source to test the checker.""" |
| 51 | store._conn.execute("PRAGMA foreign_keys = OFF") |
| 52 | store._conn.execute( |
| 53 | "INSERT INTO parsed_manpages(source, name, options, aliases) VALUES (?, ?, '[]', '[]')", |
| 54 | ("tar.1.gz", "tar"), |
| 55 | ) |
| 56 | store._conn.commit() |
| 57 | store._conn.execute("PRAGMA foreign_keys = ON") |
| 58 | issues = db_check(db_path) |
| 59 | errors_list = [msg for sev, msg in issues if sev == "error"] |
| 60 | assert any("malformed source path" in msg for msg in errors_list) |
| 61 | |
| 62 | def test_orphaned_mapping(self, store, db_path): |
| 63 | """Insert a mapping pointing to a non-existent manpage.""" |
nothing calls this directly
no outgoing calls
no test coverage detected