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

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

Issue 29259: Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects
Patch Set: Created 3 years, 2 months 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 # Verify that gdb can pretty-print the various PyObject* types 1 # Verify that gdb can pretty-print the various PyObject* types
2 # 2 #
3 # The code for testing gdb was adapted from similar work in Unladen Swallow's 3 # The code for testing gdb was adapted from similar work in Unladen Swallow's
4 # Lib/test/test_jit_gdb.py 4 # Lib/test/test_jit_gdb.py
5 5
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import sysconfig 10 import sysconfig
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 breakpoint='time_gmtime', 838 breakpoint='time_gmtime',
839 cmds_after_breakpoint=['bt', 'py-bt'], 839 cmds_after_breakpoint=['bt', 'py-bt'],
840 ) 840 )
841 self.assertIn('<built-in method gmtime', gdb_output) 841 self.assertIn('<built-in method gmtime', gdb_output)
842 842
843 # Verify with "py-bt-full": 843 # Verify with "py-bt-full":
844 gdb_output = self.get_stack_trace(cmd, 844 gdb_output = self.get_stack_trace(cmd,
845 breakpoint='time_gmtime', 845 breakpoint='time_gmtime',
846 cmds_after_breakpoint=['py-bt-full'], 846 cmds_after_breakpoint=['py-bt-full'],
847 ) 847 )
848 self.assertIn('#1 <built-in method gmtime', gdb_output) 848 self.assertIn('#2 <built-in method gmtime', gdb_output)
849 849
850 850
851 class PyPrintTests(DebuggerTests): 851 class PyPrintTests(DebuggerTests):
852 @unittest.skipIf(python_is_optimized(), 852 @unittest.skipIf(python_is_optimized(),
853 "Python was compiled with optimizations") 853 "Python was compiled with optimizations")
854 def test_basic_command(self): 854 def test_basic_command(self):
855 'Verify that the "py-print" command works' 855 'Verify that the "py-print" command works'
856 bt = self.get_stack_trace(script=self.get_sample_script(), 856 bt = self.get_stack_trace(script=self.get_sample_script(),
857 cmds_after_breakpoint=['py-up', 'py-print args ']) 857 cmds_after_breakpoint=['py-up', 'py-print args '])
858 self.assertMultilineMatches(bt, 858 self.assertMultilineMatches(bt,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 run_unittest(PrettyPrintTests, 909 run_unittest(PrettyPrintTests,
910 PyListTests, 910 PyListTests,
911 StackNavigationTests, 911 StackNavigationTests,
912 PyBtTests, 912 PyBtTests,
913 PyPrintTests, 913 PyPrintTests,
914 PyLocalsTests 914 PyLocalsTests
915 ) 915 )
916 916
917 if __name__ == "__main__": 917 if __name__ == "__main__":
918 test_main() 918 test_main()
OLDNEW
« no previous file with comments | « Include/object.h ('k') | Lib/test/test_sys.py » ('j') | Objects/abstract.c » ('J')

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