From 8a2902a2a240108e16561679e01f52b362097b3a Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 8 Dec 2008 12:34:38 -0700 Subject: Re-enable Python2.4 tests and fixed some small things broken under Python2.4 --- make-test | 3 +-- tests/data.py | 1 - tests/test_ipalib/test_rpc.py | 3 ++- tests/test_ipalib/test_util.py | 3 ++- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/make-test b/make-test index f916cc3f..485447a6 100755 --- a/make-test +++ b/make-test @@ -3,7 +3,6 @@ # Script to run nosetests under multiple versions of Python versions="python2.4 python2.5 python2.6" -versions="python2.5 python2.6" for name in $versions do @@ -11,7 +10,7 @@ do if [[ -f $executable ]]; then echo "[ $name: Starting tests... ]" ((runs += 1)) - if $executable /usr/bin/nosetests -v --with-doctest --stop + if $executable /usr/bin/nosetests --with-doctest --stop then echo "[ $name: Tests OK ]" else diff --git a/tests/data.py b/tests/data.py index 92df4aa3..cf646ea9 100644 --- a/tests/data.py +++ b/tests/data.py @@ -36,4 +36,3 @@ utf8_bytes = '\xd0\x9f\xd0\xb0\xd0\xb2\xd0\xb5\xd0\xbb' unicode_str = u'\u041f\u0430\u0432\u0435\u043b' assert utf8_bytes.decode('UTF-8') == unicode_str assert unicode_str.encode('UTF-8') == utf8_bytes -assert utf8_bytes != unicode_str diff --git a/tests/test_ipalib/test_rpc.py b/tests/test_ipalib/test_rpc.py index e8d73931..7af8c220 100644 --- a/tests/test_ipalib/test_rpc.py +++ b/tests/test_ipalib/test_rpc.py @@ -26,6 +26,7 @@ import struct from tests.util import raises from ipalib import rpc +# FIXME: These constants should be imported from tests.data # A string that should have bytes 'x\00' through '\xff': BINARY_BYTES = ''.join(struct.pack('B', d) for d in xrange(256)) @@ -39,7 +40,7 @@ UTF8_BYTES = '\xd0\x9f\xd0\xb0\xd0\xb2\xd0\xb5\xd0\xbb' UNICODE_CHARS = u'\u041f\u0430\u0432\u0435\u043b' assert UTF8_BYTES.decode('UTF-8') == UNICODE_CHARS assert UNICODE_CHARS.encode('UTF-8') == UTF8_BYTES -assert UTF8_BYTES != UNICODE_CHARS + def dump_n_load(value): diff --git a/tests/test_ipalib/test_util.py b/tests/test_ipalib/test_util.py index 8069d89b..ef562735 100644 --- a/tests/test_ipalib/test_util.py +++ b/tests/test_ipalib/test_util.py @@ -21,6 +21,8 @@ Test the `ipalib.util` module. """ +# FIXME: Most of these tests are depreciated and have moved to test_rpc.py + from xmlrpclib import Binary, dumps, loads import struct from tests.util import raises @@ -39,7 +41,6 @@ UTF8_BYTES = '\xd0\x9f\xd0\xb0\xd0\xb2\xd0\xb5\xd0\xbb' UNICODE_CHARS = u'\u041f\u0430\u0432\u0435\u043b' assert UTF8_BYTES.decode('UTF-8') == UNICODE_CHARS assert UNICODE_CHARS.encode('UTF-8') == UTF8_BYTES -assert UTF8_BYTES != UNICODE_CHARS def dump_n_load(value): -- cgit