Example #1
0
    def test_get_alphabet_default(self):
        """Should return default alphabet if none defined for position"""

        #SearchPathHelper.alphabets has only a default entry
        test = SearchPath(SearchPathHelper.alphabets)
        real_alph = test._get_alphabet(0)
        correct_alph = SearchPathHelper.alphabets[SearchPath.DEFAULT_KEY]
        self.assertEquals(str(real_alph), str(correct_alph))
Example #2
0
 def test_get_alphabet_default(self):
     """Should return default alphabet if none defined for position"""
     
     #SearchPathHelper.alphabets has only a default entry
     test = SearchPath(SearchPathHelper.alphabets) 
     real_alph = test._get_alphabet(0)
     correct_alph = SearchPathHelper.alphabets[SearchPath.DEFAULT_KEY]
     self.assertEquals(str(real_alph), str(correct_alph))
Example #3
0
    def test_get_alphabet_exists(self):
        """Should return alphabet for position when one exists"""

        alph1 = "G"
        alph2 = "ACGT"
        test_alphs = {0: alph1, 2: alph1, SearchPath.DEFAULT_KEY: alph2}
        test = SearchPath(test_alphs)

        real_alph = test._get_alphabet(2)
        self.assertEquals(str(real_alph), alph1)
Example #4
0
 def test_get_alphabet_exists(self):
     """Should return alphabet for position when one exists"""
     
     alph1 = "G"
     alph2 = "ACGT"
     test_alphs = {0:alph1, 2:alph1, SearchPath.DEFAULT_KEY:alph2}
     test = SearchPath(test_alphs)        
     
     real_alph = test._get_alphabet(2)
     self.assertEquals(str(real_alph), alph1)