Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
 def test_raise_type_error_for_unsupported_types(self):
     with pytest.raises(TypeError):
         is_text_vertical_stacked(DXFEntity())
Ejemplo n.º 3
0
 def test_stacked_text_entity(self, doc):
     text = doc.modelspace().add_text('Test',
                                      dxfattribs={'style': 'Stacked'})
     assert is_text_vertical_stacked(text) is True
Ejemplo n.º 4
0
 def test_standard_text_entity(self, doc):
     text = doc.modelspace().add_text('Test')
     assert is_text_vertical_stacked(text) is False
Ejemplo n.º 5
0
 def test_virtual_text_entity(self):
     assert is_text_vertical_stacked(Text()) is False
Ejemplo n.º 6
0
 def test_stacked_text_entity(self, doc):
     text = doc.modelspace().add_text(
         "Test", dxfattribs={"style": "Stacked"}
     )
     assert is_text_vertical_stacked(text) is True