Better test for Issue #15402: Add a __sizeof__ method to struct.Struct
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index bd89950..be32d88 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -559,12 +559,12 @@
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.assertGreaterEqual(sys.getsizeof(struct.Struct('123xB')),
- sys.getsizeof(struct.Struct('B')))
+ self.assertGreater(sys.getsizeof(struct.Struct('1234B')),
+ sys.getsizeof(struct.Struct('123B')))
def test_main():
run_unittest(StructTest)