def test_default_new(): entity = Helix.new( handle="ABBA", owner="0", dxfattribs={ "color": 7, "axis_base_point": (1, 2, 3), "start_point": (4, 5, 6), "axis_vector": (7, 7, 7), "radius": 20, "turns": 5, "handedness": 0, "constrain": 2, }, ) assert entity.dxf.layer == "0" assert entity.dxf.color == 7 assert entity.dxf.major_release_number == 29 assert entity.dxf.maintenance_release_number == 63 assert entity.dxf.axis_base_point == (1, 2, 3) assert entity.dxf.start_point == (4, 5, 6) assert entity.dxf.axis_vector == (7, 7, 7) assert entity.dxf.radius == 20 assert entity.dxf.turns == 5 assert entity.dxf.handedness == 0 assert entity.dxf.constrain == 2
def test_default_new(): entity = Helix.new(handle='ABBA', owner='0', dxfattribs={ 'color': 7, 'axis_base_point': (1, 2, 3), 'start_point': (4, 5, 6), 'axis_vector': (7, 7, 7), 'radius': 20, 'turns': 5, 'handedness': 0, 'constrain': 2, }) assert entity.dxf.layer == '0' assert entity.dxf.color == 7 assert entity.dxf.major_release_number == 29 assert entity.dxf.maintenance_release_number == 63 assert entity.dxf.axis_base_point == (1, 2, 3) assert entity.dxf.start_point == (4, 5, 6) assert entity.dxf.axis_vector == (7, 7, 7) assert entity.dxf.radius == 20 assert entity.dxf.turns == 5 assert entity.dxf.handedness == 0 assert entity.dxf.constrain == 2
def test_default_init(): entity = Helix() assert entity.dxftype() == "HELIX" assert entity.dxf.handle is None assert entity.dxf.owner is None
def entity(): return Helix.from_text(HELIX)
def test_write_dxf(): entity = Helix.from_text(HELIX) result = TagCollector.dxftags(entity) expected = basic_tags_from_text(HELIX) assert result == expected