Skip to content

Support executing tests with python -m robot #2223

Closed

Description

@pekkaklarck

We already support python -m robot.run (where instead of python you can have any other interpreter like jython or ipy) and it would be easy to add support also for python -m robot. Because robot is a package, the latter won't be compatible with Python 2.6 but that's not a big issue.

The main reason to add this is to make it a bit easier to execute tests with different installed interpreters regardless what start-up script is created and which start-up script is first in PATH. For example, on Windows you could use the py launcher like py -2 -m robot or py -3 -m robot to use Python 2 or Python 3, respectively.

Activity

  1. self-assigned this
    on Nov 18, 2015
  2. added this to the 3.0 milestone on Nov 18, 2015
  3. changed the title [-]Support executing with `python -m robot`[/-] [+]Support executing tests with `python -m robot`[/+] on Nov 18, 2015
  4. pekkaklarck commented on Nov 18, 2015

    @pekkaklarck
    MemberAuthor

    This ought to be done otherwise than updating installation instructions that is tracked by #2222. Could you @jussimalinen do a review?

  5. jussimalinen commented on Nov 19, 2015

    @jussimalinen
    Member

    Awesor!

  6. blueenergy commented on Nov 20, 2015

    @blueenergy

    Can we run test case with python -m pdb -m robot.run ... So we could enable pdb functionality with pybot easily?

  7. pekkaklarck commented on Nov 20, 2015

    @pekkaklarck
    MemberAuthor

    I don't know. Is that generally supported by pdb? If yes, it ought to work.

  8. pekkaklarck commented on Dec 30, 2015

    @pekkaklarck
    MemberAuthor

    The added __main__.py file also made it possible to run tests like python path/to/robot/ in addition to python path/to/robot/run.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions