コード例 #1
0
 def test_solve_2(self):
     r = StringIO.StringIO("10 1\n200 100\n210 201\n1000 900\n")
     w = StringIO.StringIO()
     _reset_cache()
     collatz_solve(r, w)
     self.assert_(
         w.getvalue() == "10 1 20\n200 100 125\n210 201 89\n1000 900 174\n")
コード例 #2
0
 def test_solve_4(self):
     r = StringIO.StringIO("")
     w = StringIO.StringIO()
     _reset_cache()
     collatz_solve(r, w)
     self.assert_(w.getvalue() == "")
コード例 #3
0
 def test_solve_4(self):
     r = StringIO.StringIO("")
     w = StringIO.StringIO()
     _reset_cache()
     collatz_solve(r, w)
     self.assert_(w.getvalue() == "")
コード例 #4
0
 def test_solve_2(self):
     r = StringIO.StringIO("10 1\n200 100\n210 201\n1000 900\n")
     w = StringIO.StringIO()
     _reset_cache()
     collatz_solve(r, w)
     self.assert_(w.getvalue() == "10 1 20\n200 100 125\n210 201 89\n1000 900 174\n")