def max_length(self): """ The max length of the feature, description and child blocks """ return max( 0, strings.get_terminal_width(self.represented(table=False, multiline=False)), *[strings.get_terminal_width(line) for line in self.represent_table().splitlines()] )
def max_length(self): """ The max horizontal length of the feature, description and child blocks. """ return max( 0, strings.get_terminal_width(self.represented()), *([step.max_length for step in self.steps] + [ strings.get_terminal_width(line) for line in self.represent_outlines().splitlines() ]))
def max_length(self): """ The max horizontal length of the feature, description and child blocks. """ return max( 0, strings.get_terminal_width(self.represented()), *([step.max_length for step in self.steps] + [strings.get_terminal_width(line) for line in self.represent_outlines().splitlines()]) )
def max_length(self): """ The max length of the feature, description and child blocks """ return max( 0, strings.get_terminal_width( self.represented(table=False, multiline=False)), *[ strings.get_terminal_width(line) for line in self.represent_table().splitlines() ])
def test_column_width_w_number_and_char(): """strings.column_width_w_number_and_char""" assert_equal( strings.get_terminal_width(u"%s%c" % (u"4209", 0x4209)), 6 )
def test_column_width(): """strings.column_width""" assert_equal( strings.get_terminal_width(u"あいうえお"), 10 )
def max_length(self): """ The maximum length of all description lines. """ try: return max(strings.get_terminal_width(self.represent_line(n)) for n, _ in enumerate(self.lines)) except ValueError: return 0
def max_length(self): """ The maximum length of all description lines. """ try: return max( strings.get_terminal_width(self.represent_line(n)) for n, _ in enumerate(self.lines)) except ValueError: return 0
def max_length(self): """ The max horizontal length of the feature, description and child blocks. This is used for aligning rendered output. """ return max( 0, strings.get_terminal_width(self.represented(description=False)), self.description_node.max_length, *[scenario.max_length for scenario in self.scenarios])
def max_length(self): """ The max horizontal length of the feature, description and child blocks. This is used for aligning rendered output. """ return max( 0, strings.get_terminal_width(self.represented(description=False)), self.description_node.max_length, *[scenario.max_length for scenario in self.scenarios] )