[Python-checkins] buildbot warnings in g4 osx.4 trunk

Collin Winter collinw at gmail.com
Fri Mar 9 23:53:24 CET 2007


On 3/9/07, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> Collin Winter schrieb:
> > Any objections to applying something like the following to address the
> > recent spate of failures in test_posixpath:test_islink?
>
> In principle, this kind of stuff belongs into setUp/tearDown
> (i.e. tearDown should make sure no files are left over; setUp
>   may do the same just to be safe).

Right. I initially put the os.remove() call in the test method itself
because only three tests use 'test_support.TESTFN + "2"' as filenames.
I've consolidated the boilerplate teardown code from several other
test methods into a single tearDown method.

The attached patch also moves pass_os_error(), safe_remove() and
safe_rmdir() out from under an "if hasattr(os, "symlink"):", since
they don't depend on symlink. test_samefile() also now runs; it was
previously over-indented and so wasn't executed.

What do you think?

Collin Winter


More information about the Python-checkins mailing list