def testEmpty2(self): t = type2Line("", self.chint) self.assertEqual(t, [])
def testFourOk2(self): t = type2Line("3 33 111 222", self.chint) self.assertEqual(t.ints(), [[111]])
def testThreeNg2(self): t = type2Line("123 456 789", self.chint) self.assertEqual(t, [])
def testBrokenCruftOk2(self): t = type2Line("This is a pen 3 33 11 1 2 22 garble", self.chint) self.assertEqual(t.ints(), [[111]])
def testMoreBrokenCruftOk2(self): t = type2Line(",3 , 33 1 1 1 2 22", self.chint) self.assertEqual(t.ints(), [[111]])
def testMultipleValidSums(self): t = type2Line("333 111 222 blah 555 222 333", self.chint) self.assertEqual(t.ints(), [[222]])
def testNonTotal(self): t = type2Line("333 111 222 222 333", self.chint) self.assertEqual(t.ints(), [])
def testComplexLine(self): t = type2Line("Ordinary members 1,000 x 50 members 40,000 50,000 △10,000".decode("utf8"), self.chint) self.assertEqual(t.ints(), [[50000]])
def testMaxOnly(self): t = type2Line("", self.chint) t.extend([self.ac333, self.ac222, self.ac111]) t.max_only() self.assertEqual(t.ints(), [[333]])
def testMaxOnlyWithTwoMaxVals(self): t = type2Line("", self.chint) t.extend([self.ac444, self.ac222, self.ac444, self.ac111]) t.max_only() self.assertEqual(t.ints(), [[444]])