(self)
| 210 | ) |
| 211 | |
| 212 | def test_no_stack(self): |
| 213 | def visit_foobar(self, element, **kw): |
| 214 | self.current_executable.table |
| 215 | |
| 216 | class Foobar(ClauseElement): |
| 217 | __visit_name__ = "foobar" |
| 218 | |
| 219 | with mock.patch.object( |
| 220 | testing.db.dialect.statement_compiler, |
| 221 | "visit_foobar", |
| 222 | visit_foobar, |
| 223 | create=True, |
| 224 | ): |
| 225 | compiler = testing.db.dialect.statement_compiler( |
| 226 | testing.db.dialect, None |
| 227 | ) |
| 228 | assert_raises_message( |
| 229 | IndexError, |
| 230 | "Compiler does not have a stack entry", |
| 231 | compiler.process, |
| 232 | Foobar(), |
| 233 | ) |
| 234 | |
| 235 | |
| 236 | class SelectTest(fixtures.TestBase, AssertsCompiledSQL): |
nothing calls this directly
no test coverage detected