diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-19 12:01:48 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-02-19 12:01:48 -0500 |
| commit | 140e8254a23c03f14d3f973e2ad3b197723007f8 (patch) | |
| tree | 1a97071caf3e99c1fcd9a1b6674771348126eb3a /test/sql/test_text.py | |
| parent | 145db3bed7464e920cf2bb714cdf7672a1693eb3 (diff) | |
| download | sqlalchemy-140e8254a23c03f14d3f973e2ad3b197723007f8.tar.gz | |
- expect_warnings was not expecting and neither was assert_warnings
asserting.
Diffstat (limited to 'test/sql/test_text.py')
| -rw-r--r-- | test/sql/test_text.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sql/test_text.py b/test/sql/test_text.py index 60d90196e..4302dde48 100644 --- a/test/sql/test_text.py +++ b/test/sql/test_text.py @@ -496,6 +496,10 @@ class TextWarningsTest(fixtures.TestBase, AssertsCompiledSQL): __dialect__ = 'default' def _test(self, fn, arg, offending_clause, expected): + with expect_warnings("Textual "): + stmt = fn(arg) + self.assert_compile(stmt, expected) + assert_raises_message( exc.SAWarning, r"Textual (?:SQL|column|SQL FROM) expression %(stmt)r should be " @@ -505,10 +509,6 @@ class TextWarningsTest(fixtures.TestBase, AssertsCompiledSQL): fn, arg ) - with expect_warnings("Textual "): - stmt = fn(arg) - self.assert_compile(stmt, expected) - def test_where(self): self._test( select([table1.c.myid]).where, "myid == 5", "myid == 5", |
