Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(457)

Side by Side Diff: Lib/test/test_sys.py

Issue 29259: Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects
Patch Set: Created 3 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 import unittest, test.support 1 import unittest, test.support
2 from test.support.script_helper import assert_python_ok, assert_python_failure 2 from test.support.script_helper import assert_python_ok, assert_python_failure
3 import sys, io, os 3 import sys, io, os
4 import struct 4 import struct
5 import subprocess 5 import subprocess
6 import textwrap 6 import textwrap
7 import warnings 7 import warnings
8 import operator 8 import operator
9 import codecs 9 import codecs
10 import gc 10 import gc
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 check(iter(set()), size('P3n')) 1085 check(iter(set()), size('P3n'))
1086 # slice 1086 # slice
1087 check(slice(0), size('3P')) 1087 check(slice(0), size('3P'))
1088 # super 1088 # super
1089 check(super(int), size('3P')) 1089 check(super(int), size('3P'))
1090 # tuple 1090 # tuple
1091 check((), vsize('')) 1091 check((), vsize(''))
1092 check((1,2,3), vsize('') + 3*self.P) 1092 check((1,2,3), vsize('') + 3*self.P)
1093 # type 1093 # type
1094 # static type: PyTypeObject 1094 # static type: PyTypeObject
1095 fmt = 'P2n15Pl4Pn9Pn11PIP' 1095 fmt = 'P2n15Pl4Pn9Pn11PIPP'
1096 if hasattr(sys, 'getcounts'): 1096 if hasattr(sys, 'getcounts'):
1097 fmt += '3n2P' 1097 fmt += '3n2P'
1098 s = vsize(fmt) 1098 s = vsize(fmt)
1099 check(int, s) 1099 check(int, s)
1100 s = vsize(fmt + # PyTypeObject 1100 s = vsize(fmt + # PyTypeObject
1101 '3P' # PyAsyncMethods 1101 '3P' # PyAsyncMethods
1102 '36P' # PyNumberMethods 1102 '36P' # PyNumberMethods
1103 '3P' # PyMappingMethods 1103 '3P' # PyMappingMethods
1104 '10P' # PySequenceMethods 1104 '10P' # PySequenceMethods
1105 '2P' # PyBufferProcs 1105 '2P' # PyBufferProcs
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 cur = sys.get_asyncgen_hooks() 1224 cur = sys.get_asyncgen_hooks()
1225 self.assertIsNone(cur.firstiter) 1225 self.assertIsNone(cur.firstiter)
1226 self.assertIsNone(cur.finalizer) 1226 self.assertIsNone(cur.finalizer)
1227 1227
1228 1228
1229 def test_main(): 1229 def test_main():
1230 test.support.run_unittest(SysModuleTest, SizeofTest) 1230 test.support.run_unittest(SysModuleTest, SizeofTest)
1231 1231
1232 if __name__ == "__main__": 1232 if __name__ == "__main__":
1233 test_main() 1233 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_gdb.py ('k') | Modules/_operator.c » ('j') | Objects/descrobject.c » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+