Esempio n. 1
0
 def __init__(self, options=None, commands=None, positionals=None,
              application_name=sys.argv[0], usage=None, stdin=sys.stdin,
              stdout=sys.stdout, stderr=sys.stderr, exit=sys.exit,
              width=None):
     Command.__init__(
         self, options=options, commands=commands, positionals=positionals
     )
     self.application_name = application_name
     self.usage = usage
     self.stdin = stdin
     self.stdout = stdout
     self.stderr = stderr
     self.exit = exit
     self.width = width if width is not None else get_terminal_width()
Esempio n. 2
0
 def test_get_terminal_width(self):
     # check that it doesn't raise an exception and returns an integer
     self.assert_is_instance(get_terminal_width(), int)