diff options
author | Georg Brandl <georg@python.org> | 2008-01-21 21:28:32 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-01-21 21:28:32 +0000 |
commit | c09b94e06381201c3988c1ea421bc18c07f55eca (patch) | |
tree | 8e4dcf208327ef6a54d65abc5548cd40b845a89e /Lib/test/test_structmembers.py | |
parent | 32a3fb5ec95c9417c43344a80d9e09c8042ac66d (diff) | |
download | cpython-git-c09b94e06381201c3988c1ea421bc18c07f55eca.tar.gz |
Reformat some ugly code.
Diffstat (limited to 'Lib/test/test_structmembers.py')
-rw-r--r-- | Lib/test/test_structmembers.py | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/Lib/test/test_structmembers.py b/Lib/test/test_structmembers.py index f9cff7fade..a59cfa952f 100644 --- a/Lib/test/test_structmembers.py +++ b/Lib/test/test_structmembers.py @@ -8,58 +8,59 @@ from _testcapi import test_structmembersType, \ import warnings, exceptions, unittest, sys from test import test_support -ts=test_structmembersType(False,1,2,3,4,5,6,7,8,9.99999,10.1010101010) +ts=test_structmembersType(False, 1, 2, 3, 4, 5, 6, 7, 8, + 9.99999, 10.1010101010) class ReadWriteTests(unittest.TestCase): def test_types(self): - ts.T_BOOL=True + ts.T_BOOL = True self.assertEquals(ts.T_BOOL, True) - ts.T_BOOL=False + ts.T_BOOL = False self.assertEquals(ts.T_BOOL, False) self.assertRaises(TypeError, setattr, ts, 'T_BOOL', 1) - ts.T_BYTE=CHAR_MAX + ts.T_BYTE = CHAR_MAX self.assertEquals(ts.T_BYTE, CHAR_MAX) - ts.T_BYTE=CHAR_MIN + ts.T_BYTE = CHAR_MIN self.assertEquals(ts.T_BYTE, CHAR_MIN) - ts.T_UBYTE=UCHAR_MAX + ts.T_UBYTE = UCHAR_MAX self.assertEquals(ts.T_UBYTE, UCHAR_MAX) - ts.T_SHORT=SHRT_MAX + ts.T_SHORT = SHRT_MAX self.assertEquals(ts.T_SHORT, SHRT_MAX) - ts.T_SHORT=SHRT_MIN + ts.T_SHORT = SHRT_MIN self.assertEquals(ts.T_SHORT, SHRT_MIN) - ts.T_USHORT=USHRT_MAX + ts.T_USHORT = USHRT_MAX self.assertEquals(ts.T_USHORT, USHRT_MAX) - ts.T_INT=INT_MAX + ts.T_INT = INT_MAX self.assertEquals(ts.T_INT, INT_MAX) - ts.T_INT=INT_MIN + ts.T_INT = INT_MIN self.assertEquals(ts.T_INT, INT_MIN) - ts.T_UINT=UINT_MAX + ts.T_UINT = UINT_MAX self.assertEquals(ts.T_UINT, UINT_MAX) - ts.T_LONG=LONG_MAX + ts.T_LONG = LONG_MAX self.assertEquals(ts.T_LONG, LONG_MAX) - ts.T_LONG=LONG_MIN + ts.T_LONG = LONG_MIN self.assertEquals(ts.T_LONG, LONG_MIN) - ts.T_ULONG=ULONG_MAX + ts.T_ULONG = ULONG_MAX self.assertEquals(ts.T_ULONG, ULONG_MAX) ## T_LONGLONG and T_ULONGLONG may not be present on some platforms if hasattr(ts, 'T_LONGLONG'): - ts.T_LONGLONG=LLONG_MAX + ts.T_LONGLONG = LLONG_MAX self.assertEquals(ts.T_LONGLONG, LLONG_MAX) - ts.T_LONGLONG=LLONG_MIN + ts.T_LONGLONG = LLONG_MIN self.assertEquals(ts.T_LONGLONG, LLONG_MIN) - ts.T_ULONGLONG=ULLONG_MAX + ts.T_ULONGLONG = ULLONG_MAX self.assertEquals(ts.T_ULONGLONG, ULLONG_MAX) ## make sure these will accept a plain int as well as a long - ts.T_LONGLONG=3 + ts.T_LONGLONG = 3 self.assertEquals(ts.T_LONGLONG, 3) - ts.T_ULONGLONG=4 + ts.T_ULONGLONG = 4 self.assertEquals(ts.T_ULONGLONG, 4) @@ -69,32 +70,32 @@ class TestWarnings(unittest.TestCase): def test_byte_max(self): with test_support.catch_warning() as w: - ts.T_BYTE=CHAR_MAX+1 + ts.T_BYTE = CHAR_MAX+1 self.has_warned(w) def test_byte_min(self): with test_support.catch_warning() as w: - ts.T_BYTE=CHAR_MIN-1 + ts.T_BYTE = CHAR_MIN-1 self.has_warned(w) def test_ubyte_max(self): with test_support.catch_warning() as w: - ts.T_UBYTE=UCHAR_MAX+1 + ts.T_UBYTE = UCHAR_MAX+1 self.has_warned(w) def test_short_max(self): with test_support.catch_warning() as w: - ts.T_SHORT=SHRT_MAX+1 + ts.T_SHORT = SHRT_MAX+1 self.has_warned(w) def test_short_min(self): with test_support.catch_warning() as w: - ts.T_SHORT=SHRT_MIN-1 + ts.T_SHORT = SHRT_MIN-1 self.has_warned(w) def test_ushort_max(self): with test_support.catch_warning() as w: - ts.T_USHORT=USHRT_MAX+1 + ts.T_USHORT = USHRT_MAX+1 self.has_warned(w) |