Updates:
        Labels: Priority-Medium

Comment #2 on issue 1618 by pekka.klarck: ArgumentParser enhancements to improve programmatic RF execution
http://code.google.com/p/robotframework/issues/detail?id=1618

After looking at this a bit more thoroughly, we noticed that everything needed can already now be accomplished by using RobotFramework()._parse_arguments(). For example, this works already now:

    import sys
    from robot.run import RobotFramework

    rf = RobotFramework()
    opts, args = rf._parse_arguments(sys.argv[1:])
    rf.main(args, **opts)      # possible exceptions need to be handled
rf.execute(*args, **opts) # exceptions are reported on console and applicable rc returned


Things to do:

1) Expose argument parsing functionality as parse_arguments.

2) Decided what to do with _parse_arguments calling sys.exit() on error and if --help or --version is used. Should the public method raise exceptions instead?

3) Possibly add docstrings to Application and RobotFramework classes to make this kind of usage more obvious/easier for others.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to