Skip to content

Commit

Permalink
Melhorando a test suite de python
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernardo Fontes committed May 23, 2010
1 parent b8cbce8 commit faad144
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions 2010-05-20 romanos/romanos.py
@@ -0,0 +1,2 @@
def romanos(numero):
return 1
Binary file added 2010-05-20 romanos/romanos.pyc
Binary file not shown.
10 changes: 10 additions & 0 deletions 2010-05-20 romanos/test_romanos.py
@@ -0,0 +1,10 @@
from romanos import romanos
import unittest

class testRomanos(unittest.TestCase):

def test_entra_3_retornar_fizz(self):
self.assertEquals(romanos('I'), 1)

if __name__ == '__main__':
unittest.main()
13 changes: 7 additions & 6 deletions _test_suites/python/exemplo_python_unittest.py
Expand Up @@ -2,12 +2,13 @@
import unittest

class testProblem(unittest.TestCase):

def test_function_loading(self):
self.assertEqual(soma(1,1), 2)

def test_assertion_fail(self):
self.assertEqual(soma(1,1), 3)

def test_function_loading(self):
self.assertEqual(soma(1,1), 2)

unittest.main()
def test_assertion_fail(self):
self.assertEqual(soma(1,1), 3)


unittest.main()
2 changes: 1 addition & 1 deletion _test_suites/python/problem.py
@@ -1,2 +1,2 @@
def soma(x, y):
return x + y
return x + y

0 comments on commit faad144

Please sign in to comment.