[pypy-dev] [pypy-commit] pypy win32-cleanup2: fix test, catching raised exception with 'raises' fails on win32
Armin Rigo
arigo at tunes.org
Sun Apr 8 16:01:14 CEST 2012
Hi Matti,
On Sun, Apr 8, 2012 at 14:53, Antonio Cuni <anto.cuni at gmail.com> wrote:
>> - raises(timeout, cli.sendall, 'foobar' * 70)
>> + try:
>> + cli.sendall('foobar'*70)
>> + except:
>> + pass
>
> isn't it better to use a more precise "except"? The way it's written now the
> test would pass even if there is a typo.
Why did you have to change it? It seems to me that the old way is
precisely equivalent to "except timeout:", and I doubt it's some
win32-specific issue. There must be another deeper issue.
A bientôt,
Armin.
More information about the pypy-dev
mailing list