##// END OF EJS Templates
fix count when testing composite error output
MinRK -
Show More
@@ -615,12 +615,15 b' class TestView(ClusterTestCase, ParametricTestCase):'
615 ar = view.execute("1/0")
615 ar = view.execute("1/0")
616 ip = get_ipython()
616 ip = get_ipython()
617 ip.user_ns['ar'] = ar
617 ip.user_ns['ar'] = ar
618
618 with capture_output() as io:
619 with capture_output() as io:
619 ip.run_cell("ar.get(2)")
620 ip.run_cell("ar.get(2)")
620
621
621 self.assertEqual(io.stdout.count('ZeroDivisionError'), len(view) * 2, io.stdout)
622 count = min(error.CompositeError.tb_limit, len(view))
622 self.assertEqual(io.stdout.count('by zero'), len(view), io.stdout)
623
623 self.assertEqual(io.stdout.count(':execute'), len(view), io.stdout)
624 self.assertEqual(io.stdout.count('ZeroDivisionError'), count * 2, io.stdout)
625 self.assertEqual(io.stdout.count('by zero'), count, io.stdout)
626 self.assertEqual(io.stdout.count(':execute'), count, io.stdout)
624
627
625 def test_compositeerror_truncate(self):
628 def test_compositeerror_truncate(self):
626 """Truncate CompositeErrors with many exceptions"""
629 """Truncate CompositeErrors with many exceptions"""
General Comments 0
You need to be logged in to leave comments. Login now