Beispiel #1
0
 def test_different_kinds_of_tab_stops(self):
     # tab stops without prefix or numbers are left adjusted
     # tab stops, e.g 2 or '2'
     # prefix 'c' defines a center adjusted tab stop e.g. 'c3.5'
     # prefix 'r' defines a right adjusted tab stop e.g. 'r2.7'
     p = ParagraphProperties(tab_stops=(1, "c2", "r3.7"))
     assert p.tostring() == "\\pxt1,c2,r3.7;"
Beispiel #2
0
 def test_justified_alignment_and_multiple_tab_stops(self):
     p = ParagraphProperties(align=MTextParagraphAlignment.JUSTIFIED,
                             tab_stops=(1, 2, 3))
     assert p.tostring() == "\\pxqj,t1,2,3;"
Beispiel #3
0
 def test_indention_and_multiple_tab_stops(self):
     p = ParagraphProperties(indent=1, tab_stops=(1, 2, 3))
     # always a "," after indentations
     assert p.tostring() == "\\pxi1,t1,2,3;"
Beispiel #4
0
 def test_multiple_tab_stops(self):
     p = ParagraphProperties(tab_stops=(1, 2, 3))
     assert p.tostring() == "\\pxt1,2,3;"
Beispiel #5
0
 def test_one_tab_stop(self):
     p = ParagraphProperties(tab_stops=(1, ))
     assert p.tostring() == "\\pxt1;"