def test_stacked_mtext_entity(self, doc): """ MTEXT supports the 'style' attribute, but does not really support the vertical stacked text feature. """ mtext = doc.modelspace().add_mtext('Test', dxfattribs={'style': 'Stacked'}) assert is_text_vertical_stacked(mtext) is True
def test_raise_type_error_for_unsupported_types(self): with pytest.raises(TypeError): is_text_vertical_stacked(DXFEntity())
def test_stacked_text_entity(self, doc): text = doc.modelspace().add_text('Test', dxfattribs={'style': 'Stacked'}) assert is_text_vertical_stacked(text) is True
def test_standard_text_entity(self, doc): text = doc.modelspace().add_text('Test') assert is_text_vertical_stacked(text) is False
def test_virtual_text_entity(self): assert is_text_vertical_stacked(Text()) is False
def test_stacked_text_entity(self, doc): text = doc.modelspace().add_text( "Test", dxfattribs={"style": "Stacked"} ) assert is_text_vertical_stacked(text) is True