summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-07-23 16:16:18 (GMT)
committerJesus Cea <jcea@jcea.es>2012-07-23 16:16:18 (GMT)
commit653e4b30e3739ba4a6127e6d5c1144bc0a7892c9 (patch)
tree699e6c243b85eba58e44d7fed7a6aba241b2c63f /Lib
parent9f65899d193b3056a79f2a7ea8dc32820d1127cf (diff)
parent189fdf187b70053d57198c595e5b49ae93c98992 (diff)
downloadcpython-653e4b30e3739ba4a6127e6d5c1144bc0a7892c9.zip
cpython-653e4b30e3739ba4a6127e6d5c1144bc0a7892c9.tar.gz
cpython-653e4b30e3739ba4a6127e6d5c1144bc0a7892c9.tar.bz2
MERGE: Better test for Issue #15402: Add a __sizeof__ method to struct.Struct
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_struct.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index f70435b..53c0875 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -575,12 +575,12 @@ class StructTest(unittest.TestCase):
def test_sizeof(self):
self.assertGreater(sys.getsizeof(struct.Struct('BHILfdspP')),
sys.getsizeof(struct.Struct('B')))
- self.assertGreaterEqual(sys.getsizeof(struct.Struct('123B')),
+ self.assertGreater(sys.getsizeof(struct.Struct('123B')),
sys.getsizeof(struct.Struct('B')))
- self.assertGreaterEqual(sys.getsizeof(struct.Struct('B' * 123)),
+ self.assertGreater(sys.getsizeof(struct.Struct('B' * 1234)),
+ sys.getsizeof(struct.Struct('123B')))
+ self.assertGreater(sys.getsizeof(struct.Struct('1234B')),
sys.getsizeof(struct.Struct('123B')))
- self.assertGreaterEqual(sys.getsizeof(struct.Struct('123xB')),
- sys.getsizeof(struct.Struct('B')))
def test_main():
run_unittest(StructTest)