[Python-Dev] Does trace modules have a unit test?
Nick Coghlan
ncoghlan at gmail.com
Sun Jul 25 05:18:24 CEST 2010
On Sun, Jul 25, 2010 at 2:20 AM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> I would like to use this opportunity to merge settrace and setprofile
> tests. Here is the proposal:
>
> Step 1: Rename test_trace to test_sys_settrace and test_profilehooks
> to test_sys_setprofile.
> Step 2: Create tracetester helper file with abstract test cases made
> from the union of test_sys_settrace and test_sys_setprofile test
> cases and replace the concrete test cases in test_sys_set* with
> subclasses that define setmethod, getmethod and expected_output.
>
> An alternative proposal is to put all tests for both trace and profile
> into a single test_sys_tracing file.
>
> What do you think?
>
> (Another option is to leave test_profilehooks and use rename
> test_trace to test_tracehooks in the step 1 above.)
A tracetester helper module + the two test module renames sounds like
a fine idea to me (your proposed new names should be clearer than the
existing *hooks naming, given the existence of "profile" and "trace"
modules).
You may want to do a grep for references to the existing test files in
comments in the rest of the test suite though.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list