summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-07-23 16:14:45 (GMT)
committerJesus Cea <jcea@jcea.es>2012-07-23 16:14:45 (GMT)
commitfde7890f489659050ba2f1520be16409cd64e102 (patch)
tree35c76cafbb08e9b59e4758973c81ddb9a0dab96e /Lib/test/test_struct.py
parent87c5b94c3980aa6f234b962acf047a3a5524986a (diff)
downloadcpython-fde7890f489659050ba2f1520be16409cd64e102.zip
cpython-fde7890f489659050ba2f1520be16409cd64e102.tar.gz
cpython-fde7890f489659050ba2f1520be16409cd64e102.tar.bz2
Better test for Issue #15402: Add a __sizeof__ method to struct.Struct
Diffstat (limited to 'Lib/test/test_struct.py')
-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 caada9c..f810ffe 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -547,12 +547,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)