% pydoc -w Collatz1 """ # ------- # imports # ------- import sys from Collatz3 import collatz_solve # ---- # main # ---- collatz_solve(sys.stdin, sys.stdout) """ % coverage3 run --branch RunCollatz3.py < RunCollatz.in > RunCollatz3.out % coverage3 report -m Name Stmts Miss Branch BrMiss Cover Missing --------------------------------------------------------- Collatz3 9 0 8 0 100% RunCollatz3 5 0 0 0 100% --------------------------------------------------------- TOTAL 14 0 8 0 100% """
def test_solve(self): r = StringIO("1 10\n100 200\n201 210\n900 1000\n") w = StringIO() collatz_solve(r, w) self.assertEqual(w.getvalue(), "1 10 20\n100 200 125\n201 210 89\n900 1000 174\n")
def test_solve (self) : r = StringIO("1 10\n100 200\n201 210\n900 1000\n") w = StringIO() collatz_solve(r, w) self.assertEqual(w.getvalue(), "1 10 20\n100 200 125\n201 210 89\n900 1000 174\n")