Example #1
0
 def test_002(self):
     u = ""
     v = "aaaaaaaaaa"
     w1 = [x for x in silo("ab", 4, v, u)]
     self.assertEqual(w1, [])
     w2 = [x for x in silo("ab", 4, u, u)]
     self.assertEqual(w2, [])
     w3 = [x for x in silo("ab", 2, "a", "bb")]
     self.assertEqual(w3, ["a", "b"])
     w4 = [x for x in silo("ab", 1, u, v)]
     self.assertEqual(w4, [""])
 def test_002(self):
     u = ""
     v = "aaaaaaaaaa"
     w1 = list(silo("ab", 4, v, u))
     self.assertEqual(w1, [])
     w2 = list(silo("ab", 4, u, u))
     self.assertEqual(w2, [])
     w3 = list(silo("ab", 2, "a", "bb"))
     self.assertEqual(w3, ["a", "b"])
     w4 = list(silo("ab", 1, u, v))
     self.assertEqual(w4, [""])
Example #3
0
 def test_003(self):
     w = [x for x in silo("ab", 4, "a", "bbbbb")]
     self.assertEqual(len(w), 14)
     self.assertEqual(
         w,
         [
             "a",
             "aa",
             "aaa",
             "aab",
             "ab",
             "aba",
             "abb",
             "b",
             "ba",
             "baa",
             "bab",
             "bb",
             "bba",
             "bbb",
         ],
     )
     w = [x for x in silo("ba", 4, "b", "aaaaa")]
     self.assertEqual(
         w,
         [
             "b",
             "bb",
             "bbb",
             "bba",
             "ba",
             "bab",
             "baa",
             "a",
             "ab",
             "abb",
             "aba",
             "aa",
             "aab",
             "aaa",
         ],
     )
 def test_001(self):
     v = "aaaaaaaaaa"
     w = list(silo("a", 10, "", "aaaaaaaaaa"))
     self.assertEqual(len(w), 10)
     self.assertEqual(
         w,
         [
             "",
             "a",
             "aa",
             "aaa",
             "aaaa",
             "aaaaa",
             "aaaaaa",
             "aaaaaaa",
             "aaaaaaaa",
             "aaaaaaaaa",
         ],
     )
     w = list(silo("", 10, "", "aaaaaaaaaa"))
     self.assertEqual(len(w), 1)
     w = list(silo("a", 4, "aa", v))
     self.assertEqual(w, ["aa", "aaa"])
Example #5
0
 def test_001(self):
     u = ""
     v = "aaaaaaaaaa"
     w = [x for x in silo("a", 10, "", "aaaaaaaaaa")]
     self.assertEqual(len(w), 10)
     self.assertEqual(
         w,
         [
             "",
             "a",
             "aa",
             "aaa",
             "aaaa",
             "aaaaa",
             "aaaaaa",
             "aaaaaaa",
             "aaaaaaaa",
             "aaaaaaaaa",
         ],
     )
     w = [x for x in silo("", 10, "", "aaaaaaaaaa")]
     self.assertEqual(len(w), 1)
     w = [x for x in silo("a", 4, "aa", v)]
     self.assertEqual(w, ["aa", "aaa"])
Example #6
0
 def test_004(self):
     w = [x for x in silo("abc", 13, "", "ccccccccccccc")]
     self.assertEqual(len(w), 797161)
     self.assertEqual(len(w), number_of_words(3, 0, 13))