def test_1(self): """SEND + MORE = MONEY""" a, b, c = solve('SEND', 'MORE', 'MONEY') print a, b, c
def test_4(self): """When s3 is too long!""" res = solve('SEND', 'MORE', 'CMONEY') self.assertEquals(res, None)
def test_1(self): """SEND + MORE = MONEY""" res = solve('SEND', 'MORE', 'MONEY') self.assertEquals(res, (9567, 1085, 10652))
def test_2(self): """When s3 is shorter!! invalid""" res = solve('SEND', 'MORE', 'CAT') self.assertEquals(res, None)
def test_3(self): """Unsat solution""" res = solve('AAAA', 'BBBB', 'ABCDE') self.assertEquals(res, None)
def test_4 (self): """CRACK + HACK = ERROR""" res = solve ('CRACK', 'HACK', 'ERROR') self.assertEquals (res, [42641, 9641, 52282])
def test_0(self): """BASE CASE""" res = solve('SEND', '', 'SEND') self.assertEquals(res, (9210, 0, 9210))
def test_3 (self): """PLAYS + WELL = BETTER""" res = solve ('PLAYS', 'WELL', 'BETTER') self.assertEquals (res, [97426, 8077, 105503])
def test_2 (self): """SEND + ORRE = MONEY""" res = solve ('SEND', 'ORRE', 'MONEY') self.assertEquals (res, None)
def test_4(self): """NO ANSWER""" res = solve('HATE', 'YOUR', 'MONKEY') self.assertEquals(res, None)
def test_3(self): """NEED + YOUR = MONEY""" res = solve('NEED', 'YOUR', 'MONEY') self.assertEquals(res, (7668, 3095, 10763))
def test_2(self): """LIKE + YOUR = MONEY""" # self.tearDown() res = solve('LIKE', 'YOUR', 'MONEY') self.assertEquals(res, (2693, 8045, 10738))