Exemple #1
0
 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')
Exemple #2
0
 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')
Exemple #3
0
 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")
Exemple #4
0
 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")
Exemple #5
0
 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")
Exemple #6
0
 def test_get_layer(self):
     table = create_table('LAYER')
     table.add( {'name': 'TEST'} )
     self.assertEqual(table['TEST']['name'], 'TEST')
Exemple #7
0
 def test_contains_layer(self):
     table = create_table('LAYER')
     table.add( {'name': 'TEST'} )
     self.assertTrue('TEST' in table)
Exemple #8
0
 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")
Exemple #9
0
 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")
Exemple #10
0
 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")
Exemple #11
0
 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")
Exemple #12
0
 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")
Exemple #13
0
 def test_get_layer(self):
     table = create_table('LAYER')
     table.add({'name': 'TEST'})
     self.assertEqual(table['TEST']['name'], 'TEST')
Exemple #14
0
 def test_contains_layer(self):
     table = create_table('LAYER')
     table.add({'name': 'TEST'})
     self.assertTrue('TEST' in table)
Exemple #15
0
 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")
Exemple #16
0
 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")