def _subcommands(self): result = [] if self.direction: result.append(DI(*self.direction)) else: result.append(DI()) result.append(SI(width=self.charwidth, height=self.charheight)) result.append(ES(charspace=self.charspace, linespace=self.linespace)) result.append(LO(origin=self.origin)) result.append(SL(tan=self.slant)) result.append(DV(vertical=self.vertical)) result.append(LB(self.text)) return result
def test_DI_03(): '''run can be 0.''' t = DI(0, 25.3) assert t.run == 0 assert t.rise == 25.3 assert t.format == 'DI0.00,25.30;'
def test_DI_02(): '''both run and rise (or none) must be set for formatting.''' t = DI(23) assert t.run == 23 assert t.rise == None assert raises(Warning, 't.format')
def test_DI_03(): """run can be 0.""" t = DI(0, 25.3) assert t.run == 0 assert t.rise == 25.3 assert t.format == b"DI0.00,25.30;"
def test_DI_02(): """both run and rise (or none) must be set for formatting.""" t = DI(23) assert t.run == 23 assert t.rise == None with raises(Warning): t.format
def test_DI_01(): t = DI() assert t.run == t.rise == None assert t.format == 'DI;'