Пример #1
0
 def test_fullpartdoubleresult(self):
     s1 = "de"
     s2 = "abcdedef"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de', (
         (0, 3),
         (0, 5),
     )), )))
Пример #2
0
 def test_partfulldoubleresult(self):
     s1 = "fdeg"
     s2 = "dede"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de', (
         (1, 0),
         (1, 2),
     )), )))
Пример #3
0
 def test_readingframe2(self):
     s1 = "cdefgi"
     s2 = "abcdefgh"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=2)
     self.assertEqual(ss, ((('cdef', ((0, 1),)),)))
Пример #4
0
 def test_partfulldoubleresult(self):
     s1 = "fdeg"
     s2 = "dede"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de', ((1, 0), (1, 2),)),)))
Пример #5
0
 def test_fullpartsingleresult(self):
     s1 = "bc"
     s2 = "abcde"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('bc'),((0, 1),)),))
Пример #6
0
 def test_fullpartdoubleresult(self):
     s1 = "de"
     s2 = "abcdedef"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de', ((0, 3), (0, 5),)),)))
Пример #7
0
 def test_partfullsingleresultend(self):
     s1 = "fgde"
     s2 = "de"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de'), ((2, 0),)),))
Пример #8
0
 def test_partfullsingleresultstart(self):
     s1 = "abgf"
     s2 = "ab"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('ab'), ((0, 0),)),))
Пример #9
0
 def test_partfullsingleresult(self):
     s1 = "fbcg"
     s2 = "bc"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('bc'), ((1, 0),)),))
Пример #10
0
 def test_partpartsingleresultend(self):
     s1 = "fdeg"
     s2 = "abcde"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de'), ((1, 3),)),))
Пример #11
0
 def test_readingframe2(self):
     s1 = "cdefgi"
     s2 = "abcdefgh"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=2)
     self.assertEqual(ss, ((('cdef', ((0, 1), )), )))
Пример #12
0
 def test_fullpartsingleresult(self):
     s1 = "bc"
     s2 = "abcde"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('bc'), ((0, 1), )), ))
Пример #13
0
 def test_partfullsingleresultend(self):
     s1 = "fgde"
     s2 = "de"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de'), ((2, 0), )), ))
Пример #14
0
 def test_partfullsingleresultstart(self):
     s1 = "abgf"
     s2 = "ab"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('ab'), ((0, 0), )), ))
Пример #15
0
 def test_partfullsingleresult(self):
     s1 = "fbcg"
     s2 = "bc"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('bc'), ((1, 0), )), ))
Пример #16
0
 def test_partpartsingleresultend(self):
     s1 = "fdeg"
     s2 = "abcde"
     ss = sharedlengthnsubstrings(s1=s1, s2=s2, n=2, readingframe=1)
     self.assertEqual(ss, ((('de'), ((1, 3), )), ))