Skip to content
Browse files

Melhorando a test suite de python

  • Loading branch information...
1 parent b8cbce8 commit faad14487c93eaa8dc14e0ad783a6a2a89d220ad Bernardo Fontes committed May 22, 2010
View
2 2010-05-20 romanos/romanos.py
@@ -0,0 +1,2 @@
+def romanos(numero):
+ return 1
View
BIN 2010-05-20 romanos/romanos.pyc
Binary file not shown.
View
10 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()
View
13 _test_suites/python/exemplo_python_unittest.py
@@ -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()
View
2 _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.
Something went wrong with that request. Please try again.