2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/8aa6fa3dd62d/ Changeset: 8aa6fa3dd62d Branch: opt-drop-non-hyphened-long-options User: Anthon van der Neut Date: 2013-08-01 16:49:26 Summary: changes to addoption() for hyphenated long-options Affected #: 7 files
diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/assertion/__init__.py --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -19,8 +19,8 @@ to provide assert expression information. """) group.addoption('--no-assert', action="store_true", default=False, dest="noassert", help="DEPRECATED equivalent to --assert=plain") - group.addoption('--nomagic', action="store_true", default=False, - dest="nomagic", help="DEPRECATED equivalent to --assert=plain") + group.addoption('--nomagic', '--no-magic', action="store_true", + default=False, help="DEPRECATED equivalent to --assert=plain") class AssertionState: """State for the assertion plugin.""" diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/helpconfig.py --- a/_pytest/helpconfig.py +++ b/_pytest/helpconfig.py @@ -13,8 +13,8 @@ group._addoption('-p', action="append", dest="plugins", default = [], metavar="name", help="early-load given plugin (multi-allowed).") - group.addoption('--traceconfig', - action="store_true", dest="traceconfig", default=False, + group.addoption('--traceconfig', '--trace-config', + action="store_true", default=False, help="trace considerations of conftest.py files."), group.addoption('--debug', action="store_true", dest="debug", default=False, diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -62,10 +62,10 @@ def pytest_addoption(parser): group = parser.getgroup("terminal reporting") - group.addoption('--junitxml', action="store", dest="xmlpath", - metavar="path", default=None, + group.addoption('--junitxml', '--junit-xml', action="store", + dest="xmlpath", metavar="path", default=None, help="create junit-xml style report file at given path.") - group.addoption('--junitprefix', action="store", dest="junitprefix", + group.addoption('--junitprefix', '--junit-prefix', action="store", metavar="str", default=None, help="prepend prefix to classnames in junit-xml output") diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -41,13 +41,14 @@ help="run pytest in strict mode, warnings become errors.") group = parser.getgroup("collect", "collection") - group.addoption('--collectonly', - action="store_true", dest="collectonly", + group.addoption('--collectonly', '--collect-only', action="store_true", help="only collect tests, don't execute them."), group.addoption('--pyargs', action="store_true", help="try to interpret all arguments as python packages.") group.addoption("--ignore", action="append", metavar="path", help="ignore path during collection (multi-allowed).") + # when changing this to --conf-cut-dir, config.py Conftest.setinitial + # needs upgrading as well group.addoption('--confcutdir', dest="confcutdir", default=None, metavar="dir", help="only load conftest.py's relative to specified dir.") diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/resultlog.py --- a/_pytest/resultlog.py +++ b/_pytest/resultlog.py @@ -6,7 +6,7 @@ def pytest_addoption(parser): group = parser.getgroup("terminal reporting", "resultlog plugin options") - group.addoption('--resultlog', action="store", dest="resultlog", + group.addoption('--resultlog', '--result-log', action="store", metavar="path", default=None, help="path for machine-readable result log.") diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -27,8 +27,8 @@ action="store", dest="tbstyle", default='long', choices=['long', 'short', 'no', 'line', 'native'], help="traceback print mode (long/short/line/native/no).") - group._addoption('--fulltrace', - action="store_true", dest="fulltrace", default=False, + group._addoption('--fulltrace', '--full-trace', + action="store_true", default=False, help="don't cut any tracebacks (default is to cut).") def pytest_configure(config): diff -r 09aa99de1dec81cbab70a4e2648a941a5fb02b18 -r 8aa6fa3dd62d7584484f1820bd58c1a8a8965f6e testing/test_parseopt.py --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -267,7 +267,6 @@ # argcomplete not found pytest.skip("argcomplete not available") else: - #print 'type ---------------', result.stdout, result.stdout.lines if py.std.sys.version_info < (2,7): result.stdout.lines = result.stdout.lines[0].split('\x0b') result.stdout.fnmatch_lines(["--funcargs", "--fulltrace"]) https://bitbucket.org/hpk42/pytest/commits/e12f3f5b03ce/ Changeset: e12f3f5b03ce User: hpk42 Date: 2013-08-01 17:04:18 Summary: Merged in anthon_van_der_neut/pytest/opt-drop-non-hyphened-long-options (pull request #57) changes to addoption() for hyphenated long-options Affected #: 7 files diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/assertion/__init__.py --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -19,8 +19,8 @@ to provide assert expression information. """) group.addoption('--no-assert', action="store_true", default=False, dest="noassert", help="DEPRECATED equivalent to --assert=plain") - group.addoption('--nomagic', action="store_true", default=False, - dest="nomagic", help="DEPRECATED equivalent to --assert=plain") + group.addoption('--nomagic', '--no-magic', action="store_true", + default=False, help="DEPRECATED equivalent to --assert=plain") class AssertionState: """State for the assertion plugin.""" diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/helpconfig.py --- a/_pytest/helpconfig.py +++ b/_pytest/helpconfig.py @@ -13,8 +13,8 @@ group._addoption('-p', action="append", dest="plugins", default = [], metavar="name", help="early-load given plugin (multi-allowed).") - group.addoption('--traceconfig', - action="store_true", dest="traceconfig", default=False, + group.addoption('--traceconfig', '--trace-config', + action="store_true", default=False, help="trace considerations of conftest.py files."), group.addoption('--debug', action="store_true", dest="debug", default=False, diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -62,10 +62,10 @@ def pytest_addoption(parser): group = parser.getgroup("terminal reporting") - group.addoption('--junitxml', action="store", dest="xmlpath", - metavar="path", default=None, + group.addoption('--junitxml', '--junit-xml', action="store", + dest="xmlpath", metavar="path", default=None, help="create junit-xml style report file at given path.") - group.addoption('--junitprefix', action="store", dest="junitprefix", + group.addoption('--junitprefix', '--junit-prefix', action="store", metavar="str", default=None, help="prepend prefix to classnames in junit-xml output") diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -41,13 +41,14 @@ help="run pytest in strict mode, warnings become errors.") group = parser.getgroup("collect", "collection") - group.addoption('--collectonly', - action="store_true", dest="collectonly", + group.addoption('--collectonly', '--collect-only', action="store_true", help="only collect tests, don't execute them."), group.addoption('--pyargs', action="store_true", help="try to interpret all arguments as python packages.") group.addoption("--ignore", action="append", metavar="path", help="ignore path during collection (multi-allowed).") + # when changing this to --conf-cut-dir, config.py Conftest.setinitial + # needs upgrading as well group.addoption('--confcutdir', dest="confcutdir", default=None, metavar="dir", help="only load conftest.py's relative to specified dir.") diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/resultlog.py --- a/_pytest/resultlog.py +++ b/_pytest/resultlog.py @@ -6,7 +6,7 @@ def pytest_addoption(parser): group = parser.getgroup("terminal reporting", "resultlog plugin options") - group.addoption('--resultlog', action="store", dest="resultlog", + group.addoption('--resultlog', '--result-log', action="store", metavar="path", default=None, help="path for machine-readable result log.") diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -27,8 +27,8 @@ action="store", dest="tbstyle", default='long', choices=['long', 'short', 'no', 'line', 'native'], help="traceback print mode (long/short/line/native/no).") - group._addoption('--fulltrace', - action="store_true", dest="fulltrace", default=False, + group._addoption('--fulltrace', '--full-trace', + action="store_true", default=False, help="don't cut any tracebacks (default is to cut).") def pytest_configure(config): diff -r f904134a2cf7b54738b82b2193ae03063fc5943a -r e12f3f5b03ce7a92a06b9e4837a0c3bfa15294e1 testing/test_parseopt.py --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -267,7 +267,6 @@ # argcomplete not found pytest.skip("argcomplete not available") else: - #print 'type ---------------', result.stdout, result.stdout.lines if py.std.sys.version_info < (2,7): result.stdout.lines = result.stdout.lines[0].split('\x0b') result.stdout.fnmatch_lines(["--funcargs", "--fulltrace"]) Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit