Created
May 31, 2012 21:05
-
-
Save msabramo/2846267 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= test session starts ============================== | |
platform darwin -- Python 2.7.3 -- pytest-2.2.3 | |
collecting ... collected 7 items | |
testing/test_collection.py FFFFFFF | |
=================================== FAILURES =================================== | |
____________________ Test_collection.test_check_collect_foo ____________________ | |
self = <test_collection.Test_collection instance at 0x1013407a0> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo')> | |
def test_check_collect_foo(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", "-f", "foo", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:23: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo')> | |
args = ('-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')) | |
plugins = [<_pytest.pytester.Collect instance at 0x10135b518>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x10135b5a8>, <_pytest.pytester.ResetCapturing instance at 0x10135b638>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x10135b5a8>, <_pytest.pytester.ResetCapturing instance at 0x10135b638>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_col...st_check_collect_foo/test_check_collect_foo.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x101353590>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_foo/test_check_collect_foo.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x101353590>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_foo/test_check_collect_foo.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x101353590>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_foo/test_check_collect_foo.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x101353590>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x101353590> | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x101353850> | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x10135db00> | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x10135db00> | |
args = ['-s', '-f', 'foo', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py')] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365998> | |
args = ['-s', '-f', 'foo', '/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo0/test_check_collect_foo/test_check_collect_foo.py'] | |
values = <Values at 0x101365d40: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365998> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365998>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
____________________ Test_collection.test_check_collect_bar ____________________ | |
self = <test_collection.Test_collection instance at 0x1013c7440> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar')> | |
def test_check_collect_bar(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", "-f", "bar", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:47: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar')> | |
args = ('-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')) | |
plugins = [<_pytest.pytester.Collect instance at 0x1013c7c68>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x1013c7cf8>, <_pytest.pytester.ResetCapturing instance at 0x1013c7d88>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x1013c7cf8>, <_pytest.pytester.ResetCapturing instance at 0x1013c7d88>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_col...st_check_collect_bar/test_check_collect_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013b0310>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_bar/test_check_collect_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013b0310>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_bar/test_check_collect_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013b0310>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/...t_check_collect_bar/test_check_collect_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013b0310>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013b0310> | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x1013b0290> | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013c99e0> | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013c99e0> | |
args = ['-s', '-f', 'bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py')] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c6830> | |
args = ['-s', '-f', 'bar', '/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_bar0/test_check_collect_bar/test_check_collect_bar.py'] | |
values = <Values at 0x1013c6488: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c6830> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c6830>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
________________ Test_collection.test_check_collect_foo_and_bar ________________ | |
self = <test_collection.Test_collection instance at 0x101514050> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_and_bar0/test_check_collect_foo_and_bar')> | |
def test_check_collect_foo_and_bar(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", '-f', "foo bar", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:71: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_and_bar0/test_check_collect_foo_and_bar')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_and_bar0/test_check_collect_foo_and_bar')> | |
args = ('-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')) | |
plugins = [<_pytest.pytester.Collect instance at 0x101514878>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_and_bar0/test_check_collect_foo_and_bar')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101514950>, <_pytest.pytester.ResetCapturing instance at 0x101514998>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101514950>, <_pytest.pytester.ResetCapturing instance at 0x101514998>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_..._foo_and_bar/test_check_collect_foo_and_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3190>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-Ga...foo_and_bar/test_check_collect_foo_and_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3190>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-Ga...foo_and_bar/test_check_collect_foo_and_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3190>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-Ga...foo_and_bar/test_check_collect_foo_and_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3190>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013c3190> | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x1013c30d0> | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013b4488> | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013b4488> | |
args = ['-s', '-f', 'foo bar', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py')] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101503f80> | |
args = ['-s', '-f', 'foo bar', '/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_and_bar0/test_check_collect_foo_and_bar/test_check_collect_foo_and_bar.py'] | |
values = <Values at 0x101513368: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101503f80> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101503f80>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
________________ Test_collection.test_check_collect_foo_or_bar _________________ | |
self = <test_collection.Test_collection instance at 0x101526ab8> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_or_bar0/test_check_collect_foo_or_bar')> | |
def test_check_collect_foo_or_bar(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", '-f', "foo", "-f", "bar", "-p", "no:mark", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:93: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_or_bar0/test_check_collect_foo_or_bar')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_or_bar0/test_check_collect_foo_or_bar')> | |
args = ('-s', '-f', 'foo', '-f', 'bar', '-p', ...) | |
plugins = [<_pytest.pytester.Collect instance at 0x101523290>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_or_bar0/test_check_collect_foo_or_bar')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
plugins = [<_pytest.pytester.Collect instance at 0x101523368>, <_pytest.pytester.ResetCapturing instance at 0x1015233b0>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
plugins = [<_pytest.pytester.Collect instance at 0x101523368>, <_pytest.pytester.ResetCapturing instance at 0x1015233b0>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'foo', '-f', 'bar', '-p', ...], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3f10>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', 'bar', '-p', 'no:mark', local('/var/folders/Z...t_foo_or_bar/test_check_collect_foo_or_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3f10>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', 'bar', '-p', 'no:mark', local('/var/folders/Z...t_foo_or_bar/test_check_collect_foo_or_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3f10>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', 'bar', '-p', 'no:mark', local('/var/folders/Z...t_foo_or_bar/test_check_collect_foo_or_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3f10>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013c3f10> | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x1013c3750> | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x101519e60> | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x101519e60> | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x10150f098> | |
args = ['-s', '-f', 'foo', '-f', 'bar', '-p', ...] | |
values = <Values at 0x101512ef0: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x10150f098> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x10150f098>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
______________ Test_collection.test_check_collect_foo_but_not_bar ______________ | |
self = <test_collection.Test_collection instance at 0x10151ecf8> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar0/test_check_collect_foo_but_not_bar')> | |
def test_check_collect_foo_but_not_bar(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", '-f', "foo -bar", "-p", "no:mark", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:117: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar0/test_check_collect_foo_but_not_bar')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar0/test_check_collect_foo_but_not_bar')> | |
args = ('-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')) | |
plugins = [<_pytest.pytester.Collect instance at 0x10151eb00>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar0/test_check_collect_foo_but_not_bar')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101511710>, <_pytest.pytester.ResetCapturing instance at 0x1015113b0>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101511710>, <_pytest.pytester.ResetCapturing instance at 0x1015113b0>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/..._not_bar/test_check_collect_foo_but_not_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013be690>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKj...not_bar/test_check_collect_foo_but_not_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013be690>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKj...not_bar/test_check_collect_foo_but_not_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013be690>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKj...not_bar/test_check_collect_foo_but_not_bar.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013be690>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013be690> | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x1013bef90> | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1015267e8> | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1015267e8> | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py')] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101514e18> | |
args = ['-s', '-f', 'foo -bar', '-p', 'no:mark', '/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar0/test_check_collect_foo_but_not_bar/test_check_collect_foo_but_not_bar.py'] | |
values = <Values at 0x101503680: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101514e18> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101514e18>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
___________ Test_collection.test_check_collect_foo_but_not_bar_as_or ___________ | |
self = <test_collection.Test_collection instance at 0x1013c6e18> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar_as_or0/test_check_collect_foo_but_not_bar_as_or')> | |
def test_check_collect_foo_but_not_bar_as_or(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.bar | |
def test_foo(): | |
pass | |
@pytest.mark.foo | |
def test_bar(): | |
pass | |
@pytest.mark.foo | |
@pytest.mark.bar | |
def test_baz(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", '-f', "foo", "-f", "-bar", "-p", "no:mark", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:139: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar_as_or0/test_check_collect_foo_but_not_bar_as_or')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar_as_or0/test_check_collect_foo_but_not_bar_as_or')> | |
args = ('-s', '-f', 'foo', '-f', '-bar', '-p', ...) | |
plugins = [<_pytest.pytester.Collect instance at 0x1013cb2d8>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_foo_but_not_bar_as_or0/test_check_collect_foo_but_not_bar_as_or')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
plugins = [<_pytest.pytester.Collect instance at 0x1013cb1b8>, <_pytest.pytester.ResetCapturing instance at 0x1013cb098>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
plugins = [<_pytest.pytester.Collect instance at 0x1013cb1b8>, <_pytest.pytester.ResetCapturing instance at 0x1013cb098>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'foo', '-f', '-bar', '-p', ...], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c0a10>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', '-bar', '-p', 'no:mark', local('/var/folders/...r/test_check_collect_foo_but_not_bar_as_or.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c0a10>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', '-bar', '-p', 'no:mark', local('/var/folders/...r/test_check_collect_foo_but_not_bar_as_or.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c0a10>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'foo', '-f', '-bar', '-p', 'no:mark', local('/var/folders/...r/test_check_collect_foo_but_not_bar_as_or.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c0a10>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013c0a10> | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x1013672d0> | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013625a8> | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x1013625a8> | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365c20> | |
args = ['-s', '-f', 'foo', '-f', '-bar', '-p', ...] | |
values = <Values at 0x10135fb00: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365c20> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x101365c20>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
_________ Test_collection.test_check_collect_video_but_not_videosearch _________ | |
self = <test_collection.Test_collection instance at 0x101527bd8> | |
testdir = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_video_but_not_videosearch0/test_check_collect_video_but_not_videosearch')> | |
def test_check_collect_video_but_not_videosearch(self, testdir): | |
p = testdir.makepyfile(""" | |
import pytest | |
@pytest.mark.video | |
def test_foo(): | |
pass | |
@pytest.mark.videosearch | |
def test_bar(): | |
pass | |
""") | |
> reprec = testdir.inline_run("-s", '-f', "video", p) | |
/Users/marca/dev/git-repos/pytest-markfiltration/testing/test_collection.py:156: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_video_but_not_videosearch0/test_check_collect_video_but_not_videosearch')> | |
def inline_run(self, *args): | |
> items, rec = self.inprocess_run(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:344: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_video_but_not_videosearch0/test_check_collect_video_but_not_videosearch')> | |
args = ('-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')) | |
plugins = [<_pytest.pytester.Collect instance at 0x1015085f0>] | |
def inprocess_run(self, args, plugins=None): | |
rec = [] | |
items = [] | |
class Collect: | |
def pytest_configure(x, config): | |
rec.append(self.getreportrecorder(config)) | |
def pytest_itemcollected(self, item): | |
items.append(item) | |
if not plugins: | |
plugins = [] | |
plugins.append(Collect()) | |
> ret = self.pytestmain(list(args), plugins=[Collect()]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:358: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <TmpTestdir local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_video_but_not_videosearch0/test_check_collect_video_but_not_videosearch')> | |
def pytestmain(self, *args, **kwargs): | |
class ResetCapturing: | |
@pytest.mark.trylast | |
def pytest_unconfigure(self, config): | |
capman = config.pluginmanager.getplugin("capturemanager") | |
capman.reset_capturings() | |
plugins = kwargs.setdefault("plugins", []) | |
rc = ResetCapturing() | |
plugins.append(rc) | |
> return pytest.main(*args, **kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/pytester.py:431: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101508680>, <_pytest.pytester.ResetCapturing instance at 0x101508710>] | |
def main(args=None, plugins=None): | |
""" returned exit code integer, after an in-process testing run | |
with the given command line arguments, preloading an optional list | |
of passed in plugin objects. """ | |
try: | |
> config = _prepareconfig(args, plugins) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:467: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
plugins = [<_pytest.pytester.Collect instance at 0x101508680>, <_pytest.pytester.ResetCapturing instance at 0x101508710>] | |
def _prepareconfig(args=None, plugins=None): | |
if args is None: | |
args = sys.argv[1:] | |
elif isinstance(args, py.path.local): | |
args = [str(args)] | |
elif not isinstance(args, (tuple, list)): | |
if not isinstance(args, str): | |
raise ValueError("not a string or argument list: %r" % (args,)) | |
args = py.std.shlex.split(args) | |
if _preinit: | |
_pluginmanager = _preinit.pop(0) | |
else: # subsequent calls to main will create a fresh instance | |
_pluginmanager = PluginManager(load=True) | |
hook = _pluginmanager.hook | |
if plugins: | |
for plugin in plugins: | |
_pluginmanager.register(plugin) | |
return hook.pytest_cmdline_parse( | |
> pluginmanager=_pluginmanager, args=args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:460: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
def __call__(self, **kwargs): | |
methods = self.hookrelay._pm.listattr(self.name) | |
> return self._docall(methods, kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:419: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <HookCaller 'pytest_cmdline_parse'> | |
methods = [<function pytest_cmdline_parse at 0x100639b90>, <function pytest_cmdline_parse at 0x10112ca28>, <function pytest_cmdline_parse at 0x101115ed8>] | |
kwargs = {'args': ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_vi...est_check_collect_video_but_not_videosearch.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3ad0>} | |
def _docall(self, methods, kwargs): | |
self.trace(self.name, kwargs) | |
self.trace.root.indent += 1 | |
mc = MultiCall(methods, kwargs, firstresult=self.firstresult) | |
try: | |
> res = mc.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:430: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZ...st_check_collect_video_but_not_videosearch.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3ad0>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
__multicall__ = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZ...st_check_collect_video_but_not_videosearch.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3ad0>}> | |
def pytest_cmdline_parse(__multicall__): | |
> config = __multicall__.execute() | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/helpconfig.py:25: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <MultiCall 0 results, 0 meths, kwargs={'args': ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZ...st_check_collect_video_but_not_videosearch.py')], 'pluginmanager': <_pytest.core.PluginManager object at 0x1013c3ad0>}> | |
def execute(self): | |
while self.methods: | |
method = self.methods.pop() | |
kwargs = self.getkwargs(method) | |
> res = method(**kwargs) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/core.py:348: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
pluginmanager = <_pytest.core.PluginManager object at 0x1013c3ad0> | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
def pytest_cmdline_parse(pluginmanager, args): | |
config = Config(pluginmanager) | |
> config.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:10: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Config object at 0x101367690> | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
def parse(self, args): | |
# parse given cmdline arguments into this config object. | |
# Note that this can only be called once per testing process. | |
assert not hasattr(self, 'args'), ( | |
"can only parse cmdline args at most once per Config object") | |
self._origargs = args | |
self._preparse(args) | |
self._parser.hints.extend(self.pluginmanager._hints) | |
> args = self._parser.parse_setoption(args, self.option) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x101522248> | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
option = <CmdOptions {'noassert': False, 'verbose': 0, 'plugins': [], 'pyargs': ('NO', ...FAULT'), 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_setoption(self, args, option): | |
> parsedoption, args = self.parse(args) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:75: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.Parser instance at 0x101522248> | |
args = ['-s', '-f', 'video', local('/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/tes...ect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py')] | |
def parse(self, args): | |
self.optparser = optparser = MyOptionParser(self) | |
groups = self._groups + [self._anonymous] | |
for group in groups: | |
if group.options: | |
desc = group.description or group.name | |
optgroup = py.std.optparse.OptionGroup(optparser, desc) | |
optgroup.add_options(group.options) | |
optparser.add_option_group(optgroup) | |
> return self.optparser.parse_args([str(x) for x in args]) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_pytest/config.py:72: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c9050> | |
args = ['-s', '-f', 'video', '/var/folders/Z8/Z8PqKjxVE9yN98-ty2Nin-GaxZc/-Tmp-/pytest-24/testdir/test_check_collect_video_but_not_videosearch0/test_check_collect_video_but_not_videosearch/test_check_collect_video_but_not_videosearch.py'] | |
values = <Values at 0x1015353f8: {'noassert': False, 'verbose': 0, 'collectonly': None, 'pyargs': None, 'pastebin': None, 'gens..., 'runxfail': False, 'quiet': 0, 'ignore': None, 'xmlpath': None, 'tbstyle': 'long', 'debug': False, 'nomagic': False}> | |
def parse_args(self, args=None, values=None): | |
""" | |
parse_args(args : [string] = sys.argv[1:], | |
values : Values = None) | |
-> (values : Values, args : [string]) | |
Parse the command-line options found in 'args' (default: | |
sys.argv[1:]). Any errors result in a call to 'error()', which | |
by default prints the usage message to stderr and calls | |
sys.exit() with an error message. On success returns a pair | |
(values, args) where 'values' is an Values instance (with all | |
your option values) and 'args' is the list of arguments left | |
over after parsing options. | |
""" | |
rargs = self._get_args(args) | |
if values is None: | |
values = self.get_default_values() | |
# Store the halves of the argument list as attributes for the | |
# convenience of callbacks: | |
# rargs | |
# the rest of the command-line (the "r" stands for | |
# "remaining" or "right-hand") | |
# largs | |
# the leftover arguments -- ie. what's left after removing | |
# options and their arguments (the "l" stands for "leftover" | |
# or "left-hand") | |
self.rargs = rargs | |
self.largs = largs = [] | |
self.values = values | |
try: | |
stop = self._process_args(largs, rargs, values) | |
except (BadOptionError, OptionValueError), err: | |
> self.error(str(err)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1401: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c9050> | |
msg = 'no such option: -f' | |
def error(self, msg): | |
"""error(msg : string) | |
Print a usage message incorporating 'msg' to stderr and exit. | |
If you override this in a subclass, it should not return -- it | |
should either exit or raise an exception. | |
""" | |
self.print_usage(sys.stderr) | |
> self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg)) | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1583: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <_pytest.config.MyOptionParser instance at 0x1013c9050>, status = 2 | |
msg = 'py.test: error: no such option: -f\n' | |
def exit(self, status=0, msg=None): | |
if msg: | |
sys.stderr.write(msg) | |
> sys.exit(status) | |
E SystemExit: 2 | |
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/optparse.py:1573: SystemExit | |
------------------------------- Captured stderr -------------------------------- | |
Usage: py.test [options] [file_or_dir] [file_or_dir] [...] | |
py.test: error: no such option: -f | |
=========================== 7 failed in 0.38 seconds =========================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment