예제 #1
0
def test_list1_me():
    list = ['itmoi', 'is', 'thet', 'capital', 'of', 'Great', 'Britain']

    print()
    print()
    print('#############################################')
    print('============ TESTING "list1.me" ============')
    print('=============================================')
    print('In: [' + ', '.join(list) + '] -> Out: ' + str(list1.me(list)))
예제 #2
0
 def test_me_empty(self):
     input_list = []
     expected = 0
     self.assertEqual(expected, me(input_list))
예제 #3
0
 def test_me_match(self):
     input_list = ["abba", "pep"]
     expected = 2
     self.assertEqual(expected, me(input_list))
예제 #4
0
 def test_me_no_match_by_symbol_equality(self):
     input_list = ["abc", "cbd", "epp"]
     expected = 0
     self.assertEqual(expected, me(input_list))
예제 #5
0
 def test_me_no_match_by_length(self):
     input_list = ["1", "", "a", "ab"]
     expected = 0
     self.assertEqual(expected, me(input_list))