Python 3.2.3 (default, Feb 20 2013, 14:44:27) [GCC 4.7.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> . ---------------------------------------------------------------------- Ran 1 test in 0.005s OK >>> ================================ RESTART ================================ >>> E ====================================================================== ERROR: test_factorial (__main__.TestMarch7) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 26, in test_factorial self.assertEqual(factorial(5), 120) NameError: global name 'factorial' is not defined ---------------------------------------------------------------------- Ran 1 test in 0.007s FAILED (errors=1) >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 20, in from march7 import * File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7.py", line 12 ^ IndentationError: expected an indented block >>> ================================ RESTART ================================ >>> F ====================================================================== FAIL: test_factorial (__main__.TestMarch7) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 26, in test_factorial self.assertEqual(factorial(5), 120) AssertionError: None != 120 ---------------------------------------------------------------------- Ran 1 test in 0.008s FAILED (failures=1) >>> 5! SyntaxError: invalid syntax >>> fac(5) Traceback (most recent call last): File "", line 1, in fac(5) NameError: name 'fac' is not defined >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 32, in unittest.main() File "/usr/lib/python3.2/unittest/main.py", line 124, in __init__ self.runTests() File "/usr/lib/python3.2/unittest/main.py", line 270, in runTests self.result = testRunner.run(self.test) File "/usr/lib/python3.2/unittest/runner.py", line 168, in run test(result) File "/usr/lib/python3.2/unittest/suite.py", line 67, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.2/unittest/suite.py", line 105, in run test(result) File "/usr/lib/python3.2/unittest/suite.py", line 67, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.2/unittest/suite.py", line 105, in run test(result) File "/usr/lib/python3.2/unittest/case.py", line 477, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.2/unittest/case.py", line 425, in run self._executeTestPart(testMethod, outcome, isTest=True) File "/usr/lib/python3.2/unittest/case.py", line 370, in _executeTestPart function() File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 26, in test_factorial self.assertEqual(factorial(5), 120) File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7.py", line 15, in factorial prod = num * prod KeyboardInterrupt >>> ================================ RESTART ================================ >>> . ---------------------------------------------------------------------- Ran 1 test in 0.007s OK >>> ================================ RESTART ================================ >>> . ---------------------------------------------------------------------- Ran 1 test in 0.007s OK >>> ================================ RESTART ================================ >>> .E ====================================================================== ERROR: testsum_even (__main__.TestMarch7) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 31, in testsum_even self.assertEqual(sum_even(10), 30) NameError: global name 'sum_even' is not defined ---------------------------------------------------------------------- Ran 2 tests in 0.012s FAILED (errors=1) >>> ================================ RESTART ================================ >>> .. ---------------------------------------------------------------------- Ran 2 tests in 0.012s OK >>> ================================ RESTART ================================ >>> .. ---------------------------------------------------------------------- Ran 2 tests in 0.011s OK >>> range(5) range(0, 5) >>> range(1, 5) range(1, 5) >>> range(1, 5, 2) range(1, 5, 2) >>> import march7 >>> march7.whats_this(5) Traceback (most recent call last): File "", line 1, in march7.whats_this(5) AttributeError: 'module' object has no attribute 'whats_this' >>> import march7 >>> march7.whats_this(5) Traceback (most recent call last): File "", line 1, in march7.whats_this(5) AttributeError: 'module' object has no attribute 'whats_this' >>> ================================ RESTART ================================ >>> import march7 >>> march7.whats_this(5) 1 3 >>> march7.whats_this(9) 1 3 5 7 >>> ================================ RESTART ================================ >>> .E ====================================================================== ERROR: test_sum_even (__main__.TestMarch7) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 33, in test_sum_even self.assertEqual(sum_even_for(10), 30) NameError: global name 'sum_even_for' is not defined ---------------------------------------------------------------------- Ran 2 tests in 0.012s FAILED (errors=1) >>> ================================ RESTART ================================ >>> .. ---------------------------------------------------------------------- Ran 2 tests in 0.011s OK >>> ================================ RESTART ================================ >>> E. ====================================================================== ERROR: test_factorial (__main__.TestMarch7) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sukaeto/good_stuff/documents/teaching/CISC106/spring-2013/examples/march7/march7_tests.py", line 29, in test_factorial self.assertEqual(factorial_for(5), 120) NameError: global name 'factorial_for' is not defined ---------------------------------------------------------------------- Ran 2 tests in 0.011s FAILED (errors=1) >>> ================================ RESTART ================================ >>> .. ---------------------------------------------------------------------- Ran 2 tests in 0.013s OK >>>