示例#1
0
def test_write(section):
    stream = StringIO()
    section.export_dxf(TagWriter(stream))
    result = stream.getvalue()
    stream.close()
    t1 = list(internal_tag_compiler(TESTCLASSES))
    t2 = list(internal_tag_compiler(result))
    assert t1 == t2
示例#2
0
def groups():
    return list(group_tags(internal_tag_compiler(TESTTAGS)))
示例#3
0
def test_add_to_entity_space(space):
    for group in group_tags(internal_tag_compiler(TESTENTITIES)):
        space.store_tags(group)
    assert 4 == len(space)
示例#4
0
 def test_add(self):
     for group in group_tags(internal_tag_compiler(TESTENTITIES)):
         self.space.store_tags(group)
     self.assertEqual(4, len(self.space))
示例#5
0
def section():
    entities = group_tags(internal_tag_compiler(ACDSSECTION))
    return AcDsDataSection(None, entities)