def test_export_dxf(): classes = ClassesSection() classes.add_class("SUN") collector = TagCollector(dxfversion=ezdxf.DXF2004) classes.export_dxf(collector) tags = collector.tags assert tags[0] == (0, "SECTION") assert tags[1] == (2, "CLASSES") assert tags[2] == (0, "CLASS") # writing classes is tested in 'test_113_dxfclass.py' assert tags[-1] == (0, "ENDSEC")
def test_export_dxf(): classes = ClassesSection() classes.add_class('SUN') collector = TagCollector(dxfversion=ezdxf.DXF2004) classes.export_dxf(collector) tags = collector.tags assert tags[0] == (0, 'SECTION') assert tags[1] == (2, 'CLASSES') assert tags[2] == (0, 'CLASS') # writing classes is tested in 'test_113_dxfclass.py' assert tags[-1] == (0, 'ENDSEC')
def test_add_known_class(): classes = ClassesSection() classes.add_class("SUN") assert len(classes.classes) == 1