[Biopython-dev] [Bug 2820] Convert test_PDB.py to unittest
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Sat May 9 12:31:55 UTC 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2820
------- Comment #12 from biopython-bugzilla at maubp.freeserve.co.uk 2009-05-09 08:31 EST -------
(In reply to comment #8)
> I have something that works on both Py2.5 and Py2.6 now:
> http://github.com/etal/biopython/tree/pdbtidy
Would it be easy for you to test your code on Python 2.4? I can probably do
that but not right now...
I would prefer to avoid the extra file by writing this test as part of
test_PDB_unit.py - but the "with" statement isn't valid syntax on Python 2.4,
although it can be used on Python 2.5 via:
from __future__ import with_statement
Could you re-write this to avoid the with statement?
> Also, apparently tests are run in alphabetical order, ...
Yes, that is expected.
> ... and Exposure was jumping ahead of PDBExceptionTest. I renamed
> PDBExceptionTest to ExceptionTest to restore the natural order of
> things and stop setting off the warnings prematurely. Maybe test
> suites with multiple TestCase classes should be arranged alphabetically
> in the code to avoid confusion in the future.
Ideally the unit tests should work in any order - and this is generally a
reasonable assumption, as they should be independent. Having some carefully
named unit tests will only hide the ordering problem (which is due to the
global state information in the warnings module). At the very least, we should
probably have comments in the code about this (to avoid issues in the future)
and maybe use an eye-catching name like AAAAA which should always come first.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list