summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2007-11-11 03:58:45 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2007-11-11 03:58:45 +0000
commita6ea092acc13da27856fc796b00db6d450c6122b (patch)
treea255db19e725cac7cf6b134d35195c61882b689f
parent70e555585ec54ce6f2d6628c8d89784bd200e5f8 (diff)
downloadpsycopg2-a6ea092acc13da27856fc796b00db6d450c6122b.tar.gz
- Tabs fixed.
-rw-r--r--tests/types_basic.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/types_basic.py b/tests/types_basic.py
index 446ad15..7fb7756 100644
--- a/tests/types_basic.py
+++ b/tests/types_basic.py
@@ -31,7 +31,7 @@ class TypesBasicTests(TestCase):
curs = self.conn.cursor()
curs.execute(*args)
return curs.fetchone()[0]
-
+
def testQuoting(self):
s = "Quote'this\\! ''ok?''"
self.failUnless(self.execute("SELECT %s AS foo", (s,)) == s,
@@ -60,20 +60,20 @@ class TypesBasicTests(TestCase):
def testBinary(self):
s = ''.join([chr(x) for x in range(256)])
b = psycopg2.Binary(s)
- r = str(self.execute("SELECT %s::bytea AS foo", (b,)))
+ r = str(self.execute("SELECT %s::bytea AS foo", (b,)))
self.failUnless(r == s, "wrong binary quoting")
# test to make sure an empty Binary is converted to an empty string
b = psycopg2.Binary('')
self.assertEqual(str(b), "''")
def testArray(self):
- s = self.execute("SELECT %s AS foo", ([[1,2],[3,4]],))
- self.failUnless(s == [[1,2],[3,4]], "wrong array quoting " + str(s))
- s = self.execute("SELECT %s AS foo", (['one', 'two', 'three'],))
- self.failUnless(s == ['one', 'two', 'three'],
- "wrong array quoting " + str(s))
-
-
+ s = self.execute("SELECT %s AS foo", ([[1,2],[3,4]],))
+ self.failUnless(s == [[1,2],[3,4]], "wrong array quoting " + str(s))
+ s = self.execute("SELECT %s AS foo", (['one', 'two', 'three'],))
+ self.failUnless(s == ['one', 'two', 'three'],
+ "wrong array quoting " + str(s))
+
+
class TypesBasicSuite(TestSuite):
"""Build a suite of all tests."""