-
Vermaat authored
git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@433 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
Vermaat authoredgit-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@433 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
test_parsers_genbank.py 1.01 KiB
"""
Tests for the mutalyzer.parsers.genbank module.
"""
#import logging; logging.basicConfig()
from nose.tools import *
from mutalyzer.parsers import genbank
class TestMutator():
"""
Test the mutator module.
"""
def setUp(self):
"""
Initialize test mutator module.
"""
self.gb_parser = genbank.GBparser()
def test_product_lists_mismatch(self):
"""
Test finding mismatches in some product lists.
"""
tests = [(['a b c d e', 'a b C D e', 'a b c d e'], (2, 1)),
(['a b c d e', 'a b C d e', 'a B c d e'], (1, 2)),
(['a c d a', 'a b a', 'a a', 'a'], (1, 1)),
([''], (-1, -1)),
(['', ''], (-1, -1)),
(['a', 'a'], (-1, -1)),
(['a', 'b'], (0, 0)),
(['a b c', 'a b c'], (-1, -1)),
(['a b c d a b', 'a b'], (2, 2))]
for test in tests:
assert_equal(self.gb_parser._find_mismatch(test[0]), test[1])