MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / assert_query_fails

Method assert_query_fails

graphlite/tests/testutils/test_fixture.rs:230–240  ·  view source on GitHub ↗

Execute query and assert failure

(&self, query: &str, expected_error: &str)

Source from the content-addressed store, hash-verified

228
229 /// Execute query and assert failure
230 pub fn assert_query_fails(&self, query: &str, expected_error: &str) {
231 match self.query(query) {
232 Ok(_) => panic!("Query should have failed: {}", query),
233 Err(e) => assert!(
234 e.contains(expected_error),
235 "Expected error containing '{}', got: {}",
236 expected_error,
237 e
238 ),
239 }
240 }
241
242 /// Assert first value
243 pub fn assert_first_value(&self, query: &str, column: &str, expected: Value) {

Callers

nothing calls this directly

Calls 1

queryMethod · 0.45

Tested by

no test coverage detected