~ubuntu-branches/ubuntu/wily/pytest/wily

« back to all changes in this revision

Viewing changes to _pytest/genscript.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2014-04-28 18:10:47 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140428181047-oei772n8qdvn1nd2
Tags: 2.5.2-1
* Team upload.
* New upstream release.
* d/patches/remove_google_js: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
""" generate a single-file self-contained version of py.test """
 
1
""" generate a single-file self-contained version of pytest """
2
2
import py
3
3
import sys
4
4
 
55
55
    group = parser.getgroup("debugconfig")
56
56
    group.addoption("--genscript", action="store", default=None,
57
57
        dest="genscript", metavar="path",
58
 
        help="create standalone py.test script at given target path.")
 
58
        help="create standalone pytest script at given target path.")
59
59
 
60
60
def pytest_cmdline_main(config):
61
61
    genscript = config.getvalue("genscript")
70
70
                    "or below due to 'argparse' dependency. Use python2.6 "
71
71
                    "to generate a python2.5/6 compatible script", red=True)
72
72
        script = generate_script(
73
 
            'import py; raise SystemExit(py.test.cmdline.main())',
 
73
            'import pytest; raise SystemExit(pytest.cmdline.main())',
74
74
            deps,
75
75
        )
76
76
        genscript = py.path.local(genscript)