[Biopython-dev] [Bug 2759] Unit test for Bio.PDB.HSExposure
Giovanni Marco Dall'Olio
dalloliogm at gmail.com
Sat Mar 21 12:14:45 EDT 2009
On Sat, Mar 21, 2009 at 4:23 PM, Eric Talevich <eric.talevich at gmail.com> wrote:
> On Sat, Mar 21, 2009 at 10:32 AM, <bugzilla-daemon at portal.open-bio.org>wrote:
>
>> http://bugzilla.open-bio.org/show_bug.cgi?id=2759
>>
>>
>> ------- Comment #9 from dalloliogm at gmail.com 2009-03-21 10:32 EST -------
>> (In reply to comment #8)
>> > Marco & Peter, have either of you applied these patches to a git branch
>> yet? My
>> > branch for Bug 2754 and related changes also converts test_PDB.py to
>> unittest.
>> > (I silence the warnings by calling warnings.simplefilter('ignore') in the
>> setUp
>> > method.) I'd like to try cherry-picking this commit if it's available on
>> > github.
>>
>> ok... Is your branch this one:
>> -
>>
>> http://github.com/etal/biopython/commit/65f5cf9fa8d6d63976b0942e00bd9aecef7e4197
>> ?
>>
>>
>> This was my proposal:
>> -
>>
>> http://github.com/dalloliogm/biopython/blob/alternative-pdb-exposure-test/Tests/test_PDBexposure.py
>>
>>
>> I have structured the unittest in a different way, so every test case
>> represents a pdb file with some known values for PDB exposure etc..: but
>> the
>> result should be the same.
>>
>>
>
> Oh, I see now that these are meant to be separate files. Yes, that's my
> branch. Perhaps test_PDB.py should be renamed to test_PDBParser.py, and the
> NeighborSearch test moved elsewhere. In that case, there's no merging
> problem here, and the only change needed in test_PDBexposure.py is to
> silence the warnings... right?
well, it depends also on what Peter think.
Mine was only a proof of concept to see if the unittest could be
refactored in that way.
In principle, it should be equivalent to the the original one and
execute the same tests.
If you want to use it, the problem is that it make use of a decorator
function (@classmethod) which is not supported by earlier versions of
python.
This can be resolved by moving all the instructions in setUpAll into
setUp, like here:
- http://github.com/dalloliogm/biopython/commit/83864b8a1269aaf52ac193d7bf9ed9ca5edc5a30
(however, this way the setUp instructions - like opening and parsing
the PPDB file - will be repeated for every test).
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>
--
My blog on bioinformatics (now in English): http://bioinfoblog.it
More information about the Biopython-dev
mailing list