Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
189fdf18
Commit
189fdf18
authored
Jul 23, 2012
by
Jesus Cea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better test for Issue #15402: Add a __sizeof__ method to struct.Struct
parent
b14d8c9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Doc/ACKS.txt
Doc/ACKS.txt
+1
-0
Lib/test/test_struct.py
Lib/test/test_struct.py
+4
-4
No files found.
Doc/ACKS.txt
View file @
189fdf18
...
...
@@ -204,6 +204,7 @@ docs@python.org), and we'll be glad to correct the problem.
* Anthony Starks
* Greg Stein
* Peter Stoehr
* Serhiy Storchaka
* Mark Summerfield
* Reuben Sumner
* Kalle Svensson
...
...
Lib/test/test_struct.py
View file @
189fdf18
...
...
@@ -559,12 +559,12 @@ class StructTest(unittest.TestCase):
def
test_sizeof
(
self
):
self
.
assertGreater
(
sys
.
getsizeof
(
struct
.
Struct
(
'BHILfdspP'
)),
sys
.
getsizeof
(
struct
.
Struct
(
'B'
)))
self
.
assertGreater
Equal
(
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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment