From 31265e3439ab22aebf66f882a94c71b7c46f94ef Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 20 Mar 2013 17:13:33 +0000 Subject: [PATCH] Fixed broken test decorator preventing 3 tests to run --- tests/test_lobject.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_lobject.py b/tests/test_lobject.py index 9c1c44f2..fb281639 100755 --- a/tests/test_lobject.py +++ b/tests/test_lobject.py @@ -395,10 +395,12 @@ def skip_if_no_truncate(f): return f(self) + return skip_if_no_truncate_ + class LargeObjectTruncateTests(LargeObjectMixin, unittest.TestCase): def test_truncate(self): lo = self.conn.lobject() - lo.write(b("some data")) + lo.write("some data") lo.close() lo = self.conn.lobject(lo.oid, "w") @@ -407,17 +409,17 @@ class LargeObjectTruncateTests(LargeObjectMixin, unittest.TestCase): # seek position unchanged self.assertEqual(lo.tell(), 0) # data truncated - self.assertEqual(lo.read(), b("some")) + self.assertEqual(lo.read(), "some") lo.truncate(6) lo.seek(0) # large object extended with zeroes - self.assertEqual(lo.read(), b("some\x00\x00")) + self.assertEqual(lo.read(), "some\x00\x00") lo.truncate() lo.seek(0) # large object empty - self.assertEqual(lo.read(), b("")) + self.assertEqual(lo.read(), "") def test_truncate_after_close(self): lo = self.conn.lobject()