diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-09-28 17:55:54 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:18 -0300 |
commit | b9ab302dd7aff3ecbbbc7ffe1ef2ef0bf4956a5a (patch) | |
tree | b2c62e3ae790b7c5a70f7308282ec2975aa168a2 /tests/samplebinding/bug_704_test.py | |
parent | 6b21c2fa5eeb6a7c7b6533f1c966a47d8ef07e69 (diff) |
Fixed tests to work with python3.x and python2.x
Diffstat (limited to 'tests/samplebinding/bug_704_test.py')
-rw-r--r-- | tests/samplebinding/bug_704_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/samplebinding/bug_704_test.py b/tests/samplebinding/bug_704_test.py index f2b978c52..214c0dda5 100644 --- a/tests/samplebinding/bug_704_test.py +++ b/tests/samplebinding/bug_704_test.py @@ -24,8 +24,8 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA -import sys import unittest +from py3kcompat import IS_PY3K from sample import ObjectType @@ -53,7 +53,9 @@ class ObjectTypeTest(unittest.TestCase): defineNewStyle() def testObjectTypeOldStype(self): - self.assertRaises(TypeError, defineOldStyle) + # Py 3k doesn't have old style classes + if not IS_PY3K: + self.assertRaises(TypeError, defineOldStyle) if __name__ == '__main__': |