def testFixed(self): align_style = 'FIXED' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 4, 8) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 4, 8) self.assertEqual(pad, '\t' * 2) pad = format_token._TabbedContinuationAlignPadding(5, align_style, 4, 8) self.assertEqual(pad, '\t' * 2)
def testSpace(self): align_style = 'SPACE' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 2, 4) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 2, 4) self.assertEqual(pad, ' ' * 2) pad = format_token._TabbedContinuationAlignPadding(5, align_style, 2, 4) self.assertEqual(pad, ' ' * 5)
def testFixed(self): align_style = 'FIXED' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 4, 8) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 4, 8) self.assertEqual(pad, '\t' * 2) pad = format_token._TabbedContinuationAlignPadding(5, align_style, 4, 8) self.assertEqual(pad, '\t' * 2)
def testSpace(self): align_style = 'SPACE' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 2, 4) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 2, 4) self.assertEqual(pad, ' ' * 2) pad = format_token._TabbedContinuationAlignPadding(5, align_style, 2, 4) self.assertEqual(pad, ' ' * 5)
def testVAlignRight(self): align_style = 'VALIGN-RIGHT' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 4, 8) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 4, 8) self.assertEqual(pad, '\t') pad = format_token._TabbedContinuationAlignPadding(4, align_style, 4, 8) self.assertEqual(pad, '\t') pad = format_token._TabbedContinuationAlignPadding(5, align_style, 4, 8) self.assertEqual(pad, '\t' * 2)
def testVAlignRight(self): align_style = 'VALIGN-RIGHT' pad = format_token._TabbedContinuationAlignPadding(0, align_style, 4, 8) self.assertEqual(pad, '') pad = format_token._TabbedContinuationAlignPadding(2, align_style, 4, 8) self.assertEqual(pad, '\t') pad = format_token._TabbedContinuationAlignPadding(4, align_style, 4, 8) self.assertEqual(pad, '\t') pad = format_token._TabbedContinuationAlignPadding(5, align_style, 4, 8) self.assertEqual(pad, '\t' * 2)