[Python-Dev] Re: test_support.py

Guido van Rossum guido@digicool.com
2001年1月19日 11:14:20 -0500


> if not condition:
> ! raise AssertionError(reason)

Wouldn't it be better if this raised TestFailed rather than
AssertionError? Or is there code that catches the AssertionError?
[...grep...]
Yes, there's code that catches AssertionError:
(1) in Marc-Andre's own test_unicode.py;
(2) in test_re, which catches AssertionError and raises TestFailed
 instead.
Proposal:
(1) change verify() to raise TestFailed;
(2) change test_unicode.py to catch TestFailed instead.
--Guido van Rossum (home page: http://www.python.org/~guido/)

AltStyle によって変換されたページ (->オリジナル) /