コード例 #1
0
class TestOperacoes(TestCase):

	def setUp(self):
		self.operacoes = Operacoes()
	
	def test_soma(self):
		self.assertEqual(self.operacoes.soma([1, 2]), 2, 'Deveria ser par')
コード例 #2
0
class TestOperacoes(TestCase):

	def setUp(self):
		self.operacoes = Operacoes()
		
	def test_soma(self):
		self.assertEqual(self.operacoes.soma([1,5]), 6, "Should be 6")
コード例 #3
0
class TestOperacoes(TestCase):
    # Operacoes().soma([1, 3])

    def setUp(self):
        self.operacoes = Operacoes()

    def test_soma(self):
        self.assertEqual(self.operacoes.soma([1, 3]), 5, 'Deveria ser 4')
コード例 #4
0
def test_soma():
    operacoes = Operacoes()
    assert operacoes.soma([1, 5]) == 6, "Should be 6"