This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] test: ensure certain types exposed to python are not instancable
- From: Tom Tromey <tromey at redhat dot com>
- To: Sanimir Agovic <sanimir dot agovic at intel dot com>
- Cc: gdb-patches at sourceware dot org, pmuldoon at redhat dot com
- Date: Thu, 10 Oct 2013 13:14:08 -0600
- Subject: Re: [PATCH 2/2] test: ensure certain types exposed to python are not instancable
- Authentication-results: sourceware.org; auth=none
- References: <1377873604-15519-1-git-send-email-sanimir dot agovic at intel dot com> <1377873604-15519-3-git-send-email-sanimir dot agovic at intel dot com>
>>>>> "Sanimir" == Sanimir Agovic <sanimir.agovic@intel.com> writes:
Sanimir> The proc gdb_py_test_exception executes a piece of python code and
Sanimir> expects an exception of type EXCEPTION to be raised by the code with
Sanimir> an optional MESSAGE for fine grained filtering.
FWIW I generally put the test cases in the same patch as the
modification; same with the docs. That's because they are a conceptual
unit.
It looks good, however --
Sanimir> + gdb_py_test_multiple "$stmt throws $exception" \
Sanimir> + "python" "" \
Sanimir> + "try:" "" \
Sanimir> + " $stmt" "" \
Sanimir> + "except $exception as e:" "" \
... there's one version of Python we support that doesn't have this
syntax. I forget which one, I know Phil remembers though.
Tom