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