def test_mmc_existe_menor_que_o_menor_parametro(self): mmc = Mmc() self.assertEqual(2, mmc.calcula(4, 8))
def test_nao_possui_mmc_maior_primeiro(self): mmc = Mmc() self.assertEqual(21, mmc.calcula(7, 3))
def test_mmc_sempre_um(self): mmc = Mmc() self.assertEqual(1, mmc.calcula(1, 5687))
def test_possui_mmc_menor_primeiro(self): mmc = Mmc() self.assertEqual( 5, mmc.calcula(5, 15))
def test_possui_mmc_maior_primeiro(self): mmc = Mmc() self.assertEqual(3, mmc.calcula(6, 3))
def test_nao_possui_mmc_menor_primeiro(self): mmc = Mmc() self.assertEqual(42, mmc.calcula(6, 7))
# To profile: # python -m cProfile main.py # import sys from Mmc import Mmc mmc = Mmc() for line in sys.stdin: a, b = line.strip().split(" ") mmc.calcula(int(a), int(b))