diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-05-23 15:15:30 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-05-23 15:15:30 (GMT) |
commit | 8ac1495a6a1d18111a626cec0c7f2eb67df3edb3 (patch) | |
tree | 2d91993770d3a5b3f3668857983d9bf75276b14f /Lib/test | |
parent | f655328483b2e237cc2f71c1c308eceb2f30f6fd (diff) | |
download | cpython-8ac1495a6a1d18111a626cec0c7f2eb67df3edb3.zip cpython-8ac1495a6a1d18111a626cec0c7f2eb67df3edb3.tar.gz cpython-8ac1495a6a1d18111a626cec0c7f2eb67df3edb3.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/string_tests.py | 6 | ||||
-rw-r--r-- | Lib/test/test_base64.py | 31 | ||||
-rwxr-xr-x | Lib/test/test_binascii.py | 2 | ||||
-rw-r--r-- | Lib/test/test_isinstance.py | 10 | ||||
-rw-r--r-- | Lib/test/test_math.py | 2 | ||||
-rw-r--r-- | Lib/test/test_string.py | 2 | ||||
-rw-r--r-- | Lib/test/test_unicode.py | 2 |
7 files changed, 27 insertions, 28 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py index 334a6b9..075e1c9 100644 --- a/Lib/test/string_tests.py +++ b/Lib/test/string_tests.py @@ -177,13 +177,13 @@ def run_method_tests(test): # strip/lstrip/rstrip with unicode arg if have_unicode: - test('strip', 'xyzzyhelloxyzzy', + test('strip', 'xyzzyhelloxyzzy', unicode('hello', 'ascii'), unicode('xyz', 'ascii')) - test('lstrip', 'xyzzyhelloxyzzy', + test('lstrip', 'xyzzyhelloxyzzy', unicode('helloxyzzy', 'ascii'), unicode('xyz', 'ascii')) test('rstrip', 'xyzzyhelloxyzzy', unicode('xyzzyhello', 'ascii'), unicode('xyz', 'ascii')) - test('strip', 'hello', + test('strip', 'hello', unicode('hello', 'ascii'), unicode('xyz', 'ascii')) test('swapcase', 'HeLLo cOmpUteRs', 'hEllO CoMPuTErS') diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 8ee4d2e..02cbd49 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -6,20 +6,20 @@ from binascii import Error as binascii_error class Base64TestCase(unittest.TestCase): def test_encode_string(self): """Testing encode string""" - test_support.verify(base64.encodestring("www.python.org") == - "d3d3LnB5dGhvbi5vcmc=\n", + test_support.verify(base64.encodestring("www.python.org") == + "d3d3LnB5dGhvbi5vcmc=\n", reason="www.python.org encodestring failed") - test_support.verify(base64.encodestring("a") == - "YQ==\n", + test_support.verify(base64.encodestring("a") == + "YQ==\n", reason="a encodestring failed") - test_support.verify(base64.encodestring("ab") == - "YWI=\n", + test_support.verify(base64.encodestring("ab") == + "YWI=\n", reason="ab encodestring failed") - test_support.verify(base64.encodestring("abc") == - "YWJj\n", + test_support.verify(base64.encodestring("abc") == + "YWJj\n", reason="abc encodestring failed") - test_support.verify(base64.encodestring("") == - "", + test_support.verify(base64.encodestring("") == + "", reason="null encodestring failed") test_support.verify(base64.encodestring( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#0^&*();:<>,. []{}") == @@ -29,16 +29,16 @@ class Base64TestCase(unittest.TestCase): def test_decode_string(self): """Testing decode string""" test_support.verify(base64.decodestring("d3d3LnB5dGhvbi5vcmc=\n") == - "www.python.org", + "www.python.org", reason="www.python.org decodestring failed") test_support.verify(base64.decodestring("YQ==\n") == - "a", + "a", reason="a decodestring failed") test_support.verify(base64.decodestring("YWI=\n") == - "ab", + "ab", reason="ab decodestring failed") test_support.verify(base64.decodestring("YWJj\n") == - "abc", + "abc", reason="abc decodestring failed") test_support.verify(base64.decodestring( "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0\nNTY3ODkhQCMwXiYqKCk7Ojw+LC4gW117fQ==\n") == @@ -50,10 +50,9 @@ class Base64TestCase(unittest.TestCase): pass else: self.fail("expected a binascii.Error on null decode request") - + def test_main(): test_support.run_unittest(Base64TestCase) if __name__ == "__main__": test_main() - diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py index d4a905a..2c59160 100755 --- a/Lib/test/test_binascii.py +++ b/Lib/test/test_binascii.py @@ -113,7 +113,7 @@ else: # Verify the treatment of Unicode strings if have_unicode: - verify(binascii.hexlify(unicode('a', 'ascii')) == '61', + verify(binascii.hexlify(unicode('a', 'ascii')) == '61', "hexlify failed for Unicode") # A test for SF bug 534347 (segfaults without the proper fix) diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py index e5eb6ed..ebdcbb4 100644 --- a/Lib/test/test_isinstance.py +++ b/Lib/test/test_isinstance.py @@ -104,7 +104,7 @@ class TestIsSubclassExceptions(unittest.TestCase): __bases__ = property(getbases) class S(C): pass - + self.assertRaises(TypeError, issubclass, C(), S()) # Like above, but test the second branch, where the __bases__ of the @@ -176,7 +176,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase): # combinations. def test_isinstance_normal(self): - # normal instances + # normal instances self.assertEqual(True, isinstance(Super(), Super)) self.assertEqual(False, isinstance(Super(), Child)) self.assertEqual(False, isinstance(Super(), AbstractSuper)) @@ -186,7 +186,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase): self.assertEqual(False, isinstance(Child(), AbstractSuper)) def test_isinstance_abstract(self): - # abstract instances + # abstract instances self.assertEqual(True, isinstance(AbstractSuper(), AbstractSuper)) self.assertEqual(False, isinstance(AbstractSuper(), AbstractChild)) self.assertEqual(False, isinstance(AbstractSuper(), Super)) @@ -196,7 +196,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase): self.assertEqual(True, isinstance(AbstractChild(), AbstractSuper)) self.assertEqual(False, isinstance(AbstractChild(), Super)) self.assertEqual(False, isinstance(AbstractChild(), Child)) - + def test_subclass_normal(self): # normal classes self.assertEqual(True, issubclass(Super, Super)) @@ -217,7 +217,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase): self.assertEqual(True, issubclass(AbstractChild, AbstractSuper)) self.assertEqual(False, issubclass(AbstractChild, Super)) self.assertEqual(False, issubclass(AbstractChild, Child)) - + diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index cb2b86c..d64024f 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -137,7 +137,7 @@ testit('pow(2,-1)', math.pow(2,-1), 0.5) print 'radians' testit('radians(180)', math.radians(180), math.pi) testit('radians(90)', math.radians(90), math.pi/2) -testit('radians(-45)', math.radians(-45), -math.pi/4) +testit('radians(-45)', math.radians(-45), -math.pi/4) print 'sin' testit('sin(0)', math.sin(0), 0) diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py index 8f0ea47..cc61512 100644 --- a/Lib/test/test_string.py +++ b/Lib/test/test_string.py @@ -38,7 +38,7 @@ def test(name, input, output, *args): value = apply(f, (input,) + args) if value is input: if verbose: - print 'no' + print 'no' print '*',f, `input`, `output`, `value` return if value != output: diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 5d73939..5465051 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -68,7 +68,7 @@ def test(method, input, output, *args): exc = sys.exc_info()[:2] if value is input: if verbose: - print 'no' + print 'no' print '*',f, `input`, `output`, `value` return if value != output or type(value) is not type(output): |