diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-19 03:55:37 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2010-11-19 03:55:37 +0000 |
commit | 19ead4a5cb0dcefadb604c872e9f2b93430747f6 (patch) | |
tree | 36d2cb98f1fcf5dfa018aae577dd7060c887990d /tests/test_quote.py | |
parent | 94348bfb78cc2576d586b5f1e6fde3e10c14b178 (diff) | |
download | psycopg2-19ead4a5cb0dcefadb604c872e9f2b93430747f6.tar.gz |
Test cleanup.
Tests pass or fail gracefully on older PostgreSQL versions.
If unittest2 is available, skip tests instead of printing warnings.
Diffstat (limited to 'tests/test_quote.py')
-rwxr-xr-x | tests/test_quote.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_quote.py b/tests/test_quote.py index 6da10fa..95c5d7a 100755 --- a/tests/test_quote.py +++ b/tests/test_quote.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import unittest -import warnings +from testutils import unittest import psycopg2 import psycopg2.extensions @@ -61,9 +60,9 @@ class QuotingTestCase(unittest.TestCase): curs.execute("SHOW server_encoding") server_encoding = curs.fetchone()[0] if server_encoding != "UTF8": - warnings.warn("Unicode test skipped since server encoding is %s" - % server_encoding) - return + return self.skipTest( + "Unicode test skipped since server encoding is %s" + % server_encoding) data = u"""some data with \t chars to escape into, 'quotes', \u20ac euro sign and \\ a backslash too. |