def setUp(self): tags = Tags.fromtext(DXF13LAYERS) self.layers = LayerTable(tags, DrawingProxy("AC1024"))
def test_init_with_tags(self): tags = Tags.fromtext(XTAGS1) xtags = ClassifiedTags(tags) self.assertEqual(3, len(xtags.subclasses)) self.assertEqual(1, len(xtags.xdata))
def setUp(self): tags = Tags.fromtext(POLYLINE_DXF13) self.entities = EntitySection(tags, DrawingProxy('AC1024'))
def setUp(self): tags = Tags.fromtext(POLYFACE_DXF12) self.entities = EntitySection(tags, DrawingProxy('AC1009'))
def test_gethandle_105(self): tags = Tags.fromtext(TESTHANDLE105) self.assertEqual('F105', tags.gethandle())
def test_tagindex(self): tags = Tags.fromtext(TESTFINDALL) index = tags.tagindex(0) self.assertEqual(0, index) index = tags.tagindex(0, index + 1) self.assertEqual(1, index)
def setUp(self): self.tags = Tags.fromtext(TEST_TAGREADER)
def setUp(self): tags = Tags.fromtext(TESTHEADER) self.header = HeaderSection(tags)
def setUp(self): tags = Tags.fromtext(BLOCKS_WITH_ATTRIB_DXF13) self.blocks = BlocksSection(tags, DrawingProxy('AC1024'))
def setUp(self): tags = Tags.fromtext(BLOCKS_DXF12) self.blocks = BlocksSection(tags, DrawingProxy('AC1009'))
def test_findall(self): tags = Tags.fromtext(TESTFINDALL) self.assertEqual(3, len(tags.findall(0)))
def test_tagindex(self): tags = Tags.fromtext(TESTFINDALL) index = tags.tagindex(0) self.assertEqual(0, index) index = tags.tagindex(0, index+1) self.assertEqual(1, index)
def test_findfirst_value_error(self): tags = Tags.fromtext(TESTFINDALL) with self.assertRaises(ValueError): tags.tagindex(1)