def test_support1_01(self): lines = ['SUPORT1, 1, 126'] card = bdf.process_card(lines) card = BDFCard(card) size = 8 card = SUPORT1(card) card.write_bdf(size, 'dummy') card.rawFields()
def test_suport1_01(self): card = ['SUPORT1', '1'] card = BDFCard(card) with self.assertRaises(AssertionError): # too short SUPORT1(card) card = ['SUPORT1', '1', '2'] card = BDFCard(card) con = SUPORT1(card) # default self.assertEqual(con.IDs[0], 2) self.assertEqual(con.Cs[0], '0') card = ['SUPORT1', '1', '2', '432'] card = BDFCard(card) con = SUPORT1(card) # default self.assertEqual(con.IDs[0], 2) self.assertEqual(con.Cs[0], '234') card = ['SUPORT1', '1', '2', '432', 3] card = BDFCard(card) con = SUPORT1(card) # default self.assertEqual(con.IDs[1], 3) card = ['SUPORT1', '1', '2', None, 3] card = BDFCard(card) con = SUPORT1(card) # default self.assertEqual(con.IDs[0], 2) self.assertEqual(con.IDs[1], 3) self.assertEqual(con.Cs[0], '0') self.assertEqual(con.Cs[1], '0') card = ['SUPORT1', '1', '2', '432', 3, '1325'] card = BDFCard(card) con = SUPORT1(card) # default self.assertEqual(con.IDs[1], 3) self.assertEqual(con.Cs[1], '1235')