[Patches] [ python-Patches-542569 ] tp_print tp_repr tp_str in test_bool.py

noreply@sourceforge.net noreply@sourceforge.net
Sun, 14 Apr 2002 03:24:34 -0700


Patches item #542569, was opened at 2002-04-11 19:01
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=542569&group_id=5470

Category: Tests
Group: Python 2.3
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Hernan Martinez Foffani (hfoffani)
Assigned to: Nobody/Anonymous (nobody)
Summary: tp_print tp_repr tp_str in test_bool.py

Initial Comment:
Those slots are not being tested by test_bool.py if it
was run standalone.
bool_print() does not run during the complete
regression test suite.

I was using Neal's tools and choose boolobject.c
(because it's an easy module :-) to get in touch with
the internals.

I don't know if this patch would be useful to you
because  I didn't see similar checks done for other
types. Ie: the
eval(repr(x))==x property, or the tp_print slot (I
found only one for dicts.)

Hope it helps,
-Hernan





----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-04-14 12:24

Message:
Logged In: YES 
user_id=21627

As a principle, there should be a test for each line of
code, so yes, this patch is useful; I've applied it as
test_bool.py 1.4. Feel free to contribute more of those.

I'm not so sure tp_print is useful in the first place: the
fall-back would have worked just as fine for boo.

----------------------------------------------------------------------

Comment By: Hernan Martinez Foffani (hfoffani)
Date: 2002-04-12 19:14

Message:
Logged In: YES 
user_id=112690

The patch file "21067: test_bool.diff" is the good one.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=542569&group_id=5470