def test_rbe3_01(self): lines = [ 'rbe3,6, ,3,123456,1.0,123456,41,4,+rbe3', '+rbe3,alpha,2.0e-4', ] card = bdf._process_card(lines) card = BDFCard(card) rbe = RBE3.add_card(card) fields = rbe.raw_fields() msg = print_card_8(fields).rstrip() lines_expected = [ 'RBE3 6 3 123456 1. 123456 41 4', ' ALPHA .0002' ] lines_actual = msg.rstrip().split('\n') msg = '\n%s\n\n%s\n' % ('\n'.join(lines_expected), msg) msg += 'nlines_actual=%i nlines_expected=%i' % (len(lines_actual), len(lines_expected)) self.assertEqual(len(lines_actual), len(lines_expected), msg) for actual, expected in zip(lines_actual, lines_expected): self.assertEqual(actual, expected, msg) dependent_nid_to_components = check_rbe(rbe) #print('dependent_nid_to_components = ', dependent_nid_to_components) assert dependent_nid_to_components == { 3: '123456' }, dependent_nid_to_components
def test_rbe3_01(self): lines = [ 'rbe3,6, ,3,123456,1.0,123456,41,4,+rbe3', '+rbe3,alpha,2.0e-4', ] card = bdf.process_card(lines) card = BDFCard(card) rbe = RBE3.add_card(card) fields = rbe.raw_fields() msg = print_card_8(fields).rstrip() lines_expected = [ 'RBE3 6 3 123456 1. 123456 41 4', ' ALPHA .0002' ] lines_actual = msg.rstrip().split('\n') msg = '\n%s\n\n%s\n' % ('\n'.join(lines_expected), msg) msg += 'nlines_actual=%i nlines_expected=%i' % (len(lines_actual), len(lines_expected)) self.assertEqual(len(lines_actual), len(lines_expected), msg) for actual, expected in zip(lines_actual, lines_expected): self.assertEqual(actual, expected, msg)
def test_rbe3_01(self): lines = [ 'rbe3,6, ,3,123456,1.0,123456,41,4,+rbe3', '+rbe3,alpha,2.0e-4', ] card = bdf.process_card(lines) card = BDFCard(card) #print(card) card2 = RBE3(card) fields = card2.raw_fields() msg = print_card(fields).rstrip() #print(msg) lines_expected = [ 'RBE3 6 3 123456 1. 123456 41 4', ' ALPHA .0002' ] lines_actual = msg.rstrip().split('\n') msg = '\n%s\n\n%s\n' % ('\n'.join(lines_expected), msg) msg += 'nlines_actual=%i nlines_expected=%i' % (len(lines_actual), len(lines_expected)) self.assertEqual(len(lines_actual), len(lines_expected), msg) for actual, expected in zip(lines_actual, lines_expected): self.assertEqual(actual, expected, msg)