Skip to content

Commit

Permalink
Merge b3c4ecc into 6359e75
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed authored Jun 22, 2016
2 parents 6359e75 + b3c4ecc commit ad92d28
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions _pytest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,20 +655,17 @@ def _set_opt_strings(self, opts):
self._long_opts.append(opt)

def __repr__(self):
retval = 'Argument('
args = []
if self._short_opts:
retval += '_short_opts: ' + repr(self._short_opts) + ', '
args += ['_short_opts: ' + repr(self._short_opts) + ', ']
if self._long_opts:
retval += '_long_opts: ' + repr(self._long_opts) + ', '
retval += 'dest: ' + repr(self.dest) + ', '
args += ['_long_opts: ' + repr(self._long_opts) + ', ']
args += ['dest: ' + repr(self.dest) + ', ']
if hasattr(self, 'type'):
retval += 'type: ' + repr(self.type) + ', '
args += ['type: ' + repr(self.type) + ', ']
if hasattr(self, 'default'):
retval += 'default: ' + repr(self.default) + ', '
if retval[-2:] == ', ': # always long enough to test ("Argument(" )
retval = retval[:-2]
retval += ')'
return retval
args += ['default: ' + repr(self.default) + ', ']
return 'Argument({0})'.format(', '.join(args))


class OptionGroup:
Expand Down

0 comments on commit ad92d28

Please sign in to comment.