def __init__(self): self.linetypes = create_table('LTYPE') self.layers = create_table('LAYER') self.styles = create_table('STYLE') self.views = create_table('VIEW') self.viewports = create_table('VPORT') self.appids = create_table('APPID') self.ucs = create_table('UCS')
def test_empty_ucs_table(self): table = create_table('UCS') dxf = dxfstr(table) self.assertEqual(dxf, " 0\nTABLE\n 2\nUCS\n 70\n0\n 0\nENDTAB\n")
def test_empty_viewports_table(self): table = create_table('VPORT') dxf = dxfstr(table) self.assertEqual(dxf, " 0\nTABLE\n 2\nVPORT\n 70\n0\n 0\nENDTAB\n")
def test_empty_styles_table(self): table = create_table('STYLE') dxf = dxfstr(table) self.assertEqual(dxf, " 0\nTABLE\n 2\nSTYLE\n 70\n0\n 0\nENDTAB\n")
def test_get_layer(self): table = create_table('LAYER') table.add( {'name': 'TEST'} ) self.assertEqual(table['TEST']['name'], 'TEST')
def test_contains_layer(self): table = create_table('LAYER') table.add( {'name': 'TEST'} ) self.assertTrue('TEST' in table)
def test_empty_layers_table(self): table = create_table('LAYER') dxf = dxfstr(table) self.assertEqual(dxf, " 0\nTABLE\n 2\nLAYER\n 70\n0\n 0\nENDTAB\n")
def test_empty_linetypes_table(self): table = create_table('LTYPE') dxf = dxfstr(table) self.assertEqual(dxf, " 0\nTABLE\n 2\nLTYPE\n 70\n0\n 0\nENDTAB\n")
def test_get_layer(self): table = create_table('LAYER') table.add({'name': 'TEST'}) self.assertEqual(table['TEST']['name'], 'TEST')
def test_contains_layer(self): table = create_table('LAYER') table.add({'name': 'TEST'}) self.assertTrue('TEST' in table)