mercredi 24 mai 2017

Second set of unit tests failing - Python

I'm relatively new to Python and one thing has me going crazy.The last of the four below tests is not working. Even when in isolation if I print 'newList.recursive_binary_search(newString3)' I get True. Is this because I've done something wrong here that's obvious and I'm missing?

Thank you

class test_new_search(unittest.TestCase):
    def test_search(self):
        self.assertFalse(newString6.recursive_search('Z'))
        self.assertTrue(newString6.recursive_search('J'))

class test_binary_search(unittest.TestCase):
    def test_search_binary(self):
        self.assertFalse(newList.recursive_binary_search(newString7))
        self.assertTrue(newList.recursive_binary_search(newString3))

if __name__ == '__main__':
    unittest.main()

Is running two sets of unit tests interfering here?

Aucun commentaire:

Enregistrer un commentaire