[py-dev] Re: [py-svn] r24998 - py/dist/py/test

Brian Dorsey brian at dorseys.org
Sun Mar 26 20:42:13 CEST 2006

On 26/03/06, Carl Friedrich Bolz <cfbolz at gmx.de> wrote:
> Huh? But a list or args works too, no?
> def main(args=None):
>      warn_about_missing_assertion()
>      if args is None:
>          args = py.std.sys.argv[1:]
>      elif isinstance(args, basestring):
>          args = args.split(" ")
>      config, args = py.test.Config.parse(args)
>      ...
> If args is a list it is passed unchanched to parse. I agree that
> splitting a string is maybe too magical.

Thank you Carl. While reading it, I completely missed the fact that if
args is a list, it passes through the if/elif unchanged. Apologies for
missing that!

Back to lurking mode for me...

Take care,

More information about the Pytest-dev mailing list