From issues-reply at bitbucket.org Fri Aug 1 01:22:55 2014 From: issues-reply at bitbucket.org (Daniel Hahler) Date: Thu, 31 Jul 2014 23:22:55 -0000 Subject: [Pytest-commit] Issue #182: Option to limit number of concurrent processes (hpk42/tox) Message-ID: <20140731232255.975.76391@app06.ash-private.bitbucket.org> New issue 182: Option to limit number of concurrent processes https://bitbucket.org/hpk42/tox/issue/182/option-to-limit-number-of-concurrent Daniel Hahler: I could not find an option to limit the maximum number of processes, which seems to be useful, if you only want to use 3 cores on a machine with 4 cores. From issues-reply at bitbucket.org Fri Aug 1 03:35:19 2014 From: issues-reply at bitbucket.org (talljosh) Date: Fri, 01 Aug 2014 01:35:19 -0000 Subject: [Pytest-commit] Issue #553: Handle exceptions in inspect.getsourcelines() (hpk42/pytest) Message-ID: <20140801013519.28325.77193@app02.ash-private.bitbucket.org> New issue 553: Handle exceptions in inspect.getsourcelines() https://bitbucket.org/hpk42/pytest/issue/553/handle-exceptions-in-inspectgetsourcelines talljosh: FixtureLookupError uses inspect.getsourcelines() in its formatting, but inspect.getsourcelines() can raise an IOError, which is not handled. This results in the FixtureLookupError being masked by the IOError, which is confusing and unhelpful. The actual circumstance in which I saw this involved a function decorated with pytest.inlineCallbacks from the pytest-twisted plugin. The decorated function has a filename of "", which stops inspect from being able to find the source code. Although this may be considered to be an issue with the pytest-twisted plugin (or the decorator module which it uses), it would be nice for pytest to actually handle these kinds of exceptions neatly. I have attached a proposed patch. From commits-noreply at bitbucket.org Fri Aug 1 10:22:36 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 01 Aug 2014 08:22:36 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20140801082236.16456.86589@app12.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/fd3386d05394/ Changeset: fd3386d05394 User: nicoddemus Date: 2014-08-01 00:13:40 Summary: Removing py.std usage from _pytest Affected #: 16 files diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/assertion/oldinterpret.py --- a/_pytest/assertion/oldinterpret.py +++ b/_pytest/assertion/oldinterpret.py @@ -1,3 +1,5 @@ +import traceback +import types import py import sys, inspect from compiler import parse, ast, pycodegen @@ -477,7 +479,7 @@ def interpret(source, frame, should_fail=False): module = Interpretable(parse(source, 'exec').node) #print "got module", module - if isinstance(frame, py.std.types.FrameType): + if isinstance(frame, types.FrameType): frame = py.code.Frame(frame) try: module.run(frame) @@ -487,7 +489,6 @@ except passthroughex: raise except: - import traceback traceback.print_exc() if should_fail: return ("(assertion failed, but when it was re-run for " diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -1,4 +1,5 @@ """Utilities for assertion debugging""" +import pprint import py try: @@ -168,6 +169,7 @@ If the input are bytes they will be safely converted to text. """ + from difflib import ndiff explanation = [] if isinstance(left, py.builtin.bytes): left = u(repr(left)[1:-1]).replace(r'\n', '\n') @@ -195,8 +197,8 @@ left = left[:-i] right = right[:-i] explanation += [line.strip('\n') - for line in py.std.difflib.ndiff(left.splitlines(), - right.splitlines())] + for line in ndiff(left.splitlines(), + right.splitlines())] return explanation @@ -214,8 +216,8 @@ explanation += [ u('Right contains more items, first extra item: %s') % py.io.saferepr(right[len(left)],)] - return explanation # + _diff_text(py.std.pprint.pformat(left), - # py.std.pprint.pformat(right)) + return explanation # + _diff_text(pprint.pformat(left), + # pprint.pformat(right)) def _compare_eq_set(left, right, verbose=False): @@ -242,7 +244,7 @@ len(same)] elif same: explanation += [u('Common items:')] - explanation += py.std.pprint.pformat(same).splitlines() + explanation += pprint.pformat(same).splitlines() diff = set(k for k in common if left[k] != right[k]) if diff: explanation += [u('Differing items:')] @@ -252,12 +254,12 @@ extra_left = set(left) - set(right) if extra_left: explanation.append(u('Left contains more items:')) - explanation.extend(py.std.pprint.pformat( + explanation.extend(pprint.pformat( dict((k, left[k]) for k in extra_left)).splitlines()) extra_right = set(right) - set(left) if extra_right: explanation.append(u('Right contains more items:')) - explanation.extend(py.std.pprint.pformat( + explanation.extend(pprint.pformat( dict((k, right[k]) for k in extra_right)).splitlines()) return explanation diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -1,4 +1,9 @@ """ command line options, ini-file and conftest.py processing. """ +import argparse +import shlex +import traceback +import types +import warnings import py # DON't import pytest here because it causes import cycle troubles @@ -29,7 +34,7 @@ except ConftestImportFailure: e = sys.exc_info()[1] tw = py.io.TerminalWriter(sys.stderr) - for line in py.std.traceback.format_exception(*e.excinfo): + for line in traceback.format_exception(*e.excinfo): tw.line(line.rstrip(), red=True) tw.line("ERROR: could not load %s\n" % (e.path), red=True) return 4 @@ -71,7 +76,7 @@ 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) + args = shlex.split(args) pluginmanager = get_plugin_manager() try: if plugins: @@ -229,7 +234,7 @@ class Argument: - """class that mimics the necessary behaviour of py.std.optparse.Option """ + """class that mimics the necessary behaviour of optparse.Option """ _typ_map = { 'int': int, 'string': str, @@ -247,7 +252,7 @@ try: help = attrs['help'] if '%default' in help: - py.std.warnings.warn( + warnings.warn( 'pytest now uses argparse. "%default" should be' ' changed to "%(default)s" ', FutureWarning, @@ -263,7 +268,7 @@ if isinstance(typ, py.builtin._basestring): if typ == 'choice': if self.TYPE_WARN: - py.std.warnings.warn( + warnings.warn( 'type argument to addoption() is a string %r.' ' For parsearg this is optional and when supplied ' ' should be a type.' @@ -275,7 +280,7 @@ attrs['type'] = type(attrs['choices'][0]) else: if self.TYPE_WARN: - py.std.warnings.warn( + warnings.warn( 'type argument to addoption() is a string %r.' ' For parsearg this should be a type.' ' (options: %s)' % (typ, names), @@ -395,10 +400,10 @@ self.options.append(option) -class MyOptionParser(py.std.argparse.ArgumentParser): +class MyOptionParser(argparse.ArgumentParser): def __init__(self, parser): self._parser = parser - py.std.argparse.ArgumentParser.__init__(self, usage=parser._usage, + argparse.ArgumentParser.__init__(self, usage=parser._usage, add_help=False, formatter_class=DropShorterLongHelpFormatter) def parse_args(self, args=None, namespace=None): @@ -407,12 +412,12 @@ if argv: for arg in argv: if arg and arg[0] == '-': - msg = py.std.argparse._('unrecognized arguments: %s') + msg = argparse._('unrecognized arguments: %s') self.error(msg % ' '.join(argv)) getattr(args, FILE_OR_DIR).extend(argv) return args -class DropShorterLongHelpFormatter(py.std.argparse.HelpFormatter): +class DropShorterLongHelpFormatter(argparse.HelpFormatter): """shorten help for long options that differ only in extra hyphens - collapse **long** options that are the same except for extra hyphens @@ -422,7 +427,7 @@ - cache result on action object as this is called at least 2 times """ def _format_action_invocation(self, action): - orgstr = py.std.argparse.HelpFormatter._format_action_invocation(self, action) + orgstr = argparse.HelpFormatter._format_action_invocation(self, action) if orgstr and orgstr[0] != '-': # only optional arguments return orgstr res = getattr(action, '_formatted_action_invocation', None) @@ -746,7 +751,7 @@ self.hook.pytest_cmdline_preparse(config=self, args=args) args = self._parser.parse_setoption(args, self.option) if not args: - args.append(py.std.os.getcwd()) + args.append(os.getcwd()) self.args = args def addinivalue_line(self, name, line): @@ -784,11 +789,11 @@ if type == "pathlist": dp = py.path.local(self.inicfg.config.path).dirpath() l = [] - for relpath in py.std.shlex.split(value): + for relpath in shlex.split(value): l.append(dp.join(relpath, abs=True)) return l elif type == "args": - return py.std.shlex.split(value) + return shlex.split(value) elif type == "linelist": return [t for t in map(lambda x: x.strip(), value.split("\n")) if t] else: @@ -876,7 +881,7 @@ mod = getattr(obj, name, None) if mod is None: modname = "pytest.%s" % name - mod = py.std.types.ModuleType(modname) + mod = types.ModuleType(modname) sys.modules[modname] = mod mod.__all__ = [] setattr(obj, name, mod) diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/core.py --- a/_pytest/core.py +++ b/_pytest/core.py @@ -1,6 +1,7 @@ """ pytest PluginManager, basic initialization and tracing. """ +import os import sys import inspect import py @@ -154,7 +155,7 @@ # API for bootstrapping # def _envlist(self, varname): - val = py.std.os.environ.get(varname, None) + val = os.environ.get(varname, None) if val is not None: return val.split(',') return () @@ -221,7 +222,7 @@ return self.import_plugin(modname[7:]) raise except: - e = py.std.sys.exc_info()[1] + e = sys.exc_info()[1] import pytest if not hasattr(pytest, 'skip') or not isinstance(e, pytest.skip.Exception): raise diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/doctest.py --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -1,5 +1,6 @@ """ discover and run doctests in modules and test files.""" - +from __future__ import absolute_import +import traceback import pytest, py from _pytest.python import FixtureRequest, FuncFixtureInfo from py._code.code import TerminalRepr, ReprFileLocation @@ -43,7 +44,7 @@ self.runner.run(self.dtest) def repr_failure(self, excinfo): - doctest = py.std.doctest + import doctest if excinfo.errisinstance((doctest.DocTestFailure, doctest.UnexpectedException)): doctestfailure = excinfo.value @@ -56,8 +57,8 @@ lineno = test.lineno + example.lineno + 1 message = excinfo.type.__name__ reprlocation = ReprFileLocation(filename, lineno, message) - checker = py.std.doctest.OutputChecker() - REPORT_UDIFF = py.std.doctest.REPORT_UDIFF + checker = doctest.OutputChecker() + REPORT_UDIFF = doctest.REPORT_UDIFF filelines = py.path.local(filename).readlines(cr=0) lines = [] if lineno is not None: @@ -78,7 +79,7 @@ inner_excinfo = py.code.ExceptionInfo(excinfo.value.exc_info) lines += ["UNEXPECTED EXCEPTION: %s" % repr(inner_excinfo.value)] - lines += py.std.traceback.format_exception(*excinfo.value.exc_info) + lines += traceback.format_exception(*excinfo.value.exc_info) return ReprFailDoctest(reprlocation, lines) else: return super(DoctestItem, self).repr_failure(excinfo) @@ -88,7 +89,7 @@ class DoctestTextfile(DoctestItem, pytest.File): def runtest(self): - doctest = py.std.doctest + import doctest # satisfy `FixtureRequest` constructor... self.funcargs = {} fm = self.session._fixturemanager @@ -106,7 +107,7 @@ class DoctestModule(pytest.File): def collect(self): - doctest = py.std.doctest + import doctest if self.fspath.basename == "conftest.py": module = self.config._conftest.importconftest(self.fspath) else: diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/genscript.py --- a/_pytest/genscript.py +++ b/_pytest/genscript.py @@ -1,9 +1,13 @@ """ generate a single-file self-contained version of pytest """ +import base64 +import pickle import py import sys +import zlib + def find_toplevel(name): - for syspath in py.std.sys.path: + for syspath in sys.path: base = py.path.local(syspath) lib = base/name if lib.check(dir=1): @@ -29,9 +33,9 @@ return name2src def compress_mapping(mapping): - data = py.std.pickle.dumps(mapping, 2) - data = py.std.zlib.compress(data, 9) - data = py.std.base64.encodestring(data) + data = pickle.dumps(mapping, 2) + data = zlib.compress(data, 9) + data = base64.encodestring(data) data = data.decode('ascii') return data diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -2,6 +2,7 @@ Based on initial code from Ross Lawley. """ +import codecs import py import os @@ -206,8 +207,8 @@ self.suite_start_time = time.time() def pytest_sessionfinish(self): - if py.std.sys.version_info[0] < 3: - logfile = py.std.codecs.open(self.logfile, 'w', encoding='utf-8') + if sys.version_info[0] < 3: + logfile = codecs.open(self.logfile, 'w', encoding='utf-8') else: logfile = open(self.logfile, 'w', encoding='utf-8') diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -1,4 +1,5 @@ """ core implementation of testing process: init, session, runtest loop. """ +import re import py import pytest, _pytest @@ -19,7 +20,7 @@ EXIT_INTERNALERROR = 3 EXIT_USAGEERROR = 4 -name_re = py.std.re.compile("^[a-zA-Z_]\w*$") +name_re = re.compile("^[a-zA-Z_]\w*$") def pytest_addoption(parser): parser.addini("norecursedirs", "directory patterns to avoid for recursion", @@ -315,7 +316,7 @@ except py.builtin._sysex: raise except: - failure = py.std.sys.exc_info() + failure = sys.exc_info() setattr(self, exattrname, failure) raise setattr(self, attrname, res) diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/pdb.py --- a/_pytest/pdb.py +++ b/_pytest/pdb.py @@ -1,7 +1,11 @@ """ interactive debugging with PDB, the Python Debugger. """ +from __future__ import absolute_import +import pdb +import sys -import pytest, py -import sys +import pytest +import py + def pytest_addoption(parser): group = parser.getgroup("general") @@ -16,10 +20,10 @@ if config.getvalue("usepdb"): config.pluginmanager.register(PdbInvoke(), 'pdbinvoke') - old = (py.std.pdb.set_trace, pytestPDB._pluginmanager) + old = (pdb.set_trace, pytestPDB._pluginmanager) def fin(): - py.std.pdb.set_trace, pytestPDB._pluginmanager = old - py.std.pdb.set_trace = pytest.set_trace + pdb.set_trace, pytestPDB._pluginmanager = old + pdb.set_trace = pytest.set_trace pytestPDB._pluginmanager = config.pluginmanager config._cleanup.append(fin) @@ -38,7 +42,7 @@ tw = py.io.TerminalWriter() tw.line() tw.sep(">", "PDB set_trace (IO-capturing turned off)") - py.std.pdb.Pdb().set_trace(frame) + pdb.Pdb().set_trace(frame) class PdbInvoke: @@ -74,7 +78,8 @@ def _postmortem_traceback(excinfo): # A doctest.UnexpectedException is not useful for post_mortem. # Use the underlying exception instead: - if isinstance(excinfo.value, py.std.doctest.UnexpectedException): + from doctest import UnexpectedException + if isinstance(excinfo.value, UnexpectedException): return excinfo.value.exc_info[2] else: return excinfo._excinfo[2] @@ -88,7 +93,6 @@ def post_mortem(t): - pdb = py.std.pdb class Pdb(pdb.Pdb): def get_stack(self, f, t): stack, i = pdb.Pdb.get_stack(self, f, t) diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/pytester.py --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -1,15 +1,21 @@ """ (disabled by default) support for testing pytest and pytest plugins. """ - -import py, pytest -import sys, os +import inspect +import sys +import os import codecs import re import time +import platform from fnmatch import fnmatch -from _pytest.main import Session, EXIT_OK +import subprocess + +import py +import pytest from py.builtin import print_ from _pytest.core import HookRelay +from _pytest.main import Session, EXIT_OK + def get_public_names(l): """Only return names from iterator l without a leading underscore.""" @@ -87,10 +93,10 @@ def _makecallparser(self, method): name = method.__name__ - args, varargs, varkw, default = py.std.inspect.getargspec(method) + args, varargs, varkw, default = inspect.getargspec(method) if not args or args[0] != "self": args.insert(0, 'self') - fspec = py.std.inspect.formatargspec(args, varargs, varkw, default) + fspec = inspect.formatargspec(args, varargs, varkw, default) # we use exec because we want to have early type # errors on wrong input arguments, using # *args/**kwargs delays this and gives errors @@ -122,7 +128,7 @@ __tracebackhide__ = True i = 0 entries = list(entries) - backlocals = py.std.sys._getframe(1).f_locals + backlocals = sys._getframe(1).f_locals while entries: name, check = entries.pop(0) for ind, call in enumerate(self.calls[i:]): @@ -210,7 +216,7 @@ def finalize(self): for p in self._syspathremove: - py.std.sys.path.remove(p) + sys.path.remove(p) if hasattr(self, '_olddir'): self._olddir.chdir() # delete modules that have been loaded from tmpdir @@ -283,7 +289,7 @@ def syspathinsert(self, path=None): if path is None: path = self.tmpdir - py.std.sys.path.insert(0, str(path)) + sys.path.insert(0, str(path)) self._syspathremove.append(str(path)) def mkdir(self, name): @@ -426,9 +432,8 @@ env['PYTHONPATH'] = os.pathsep.join(filter(None, [ str(os.getcwd()), env.get('PYTHONPATH', '')])) kw['env'] = env - #print "env", env - return py.std.subprocess.Popen(cmdargs, - stdout=stdout, stderr=stderr, **kw) + return subprocess.Popen(cmdargs, + stdout=stdout, stderr=stderr, **kw) def run(self, *cmdargs): return self._run(*cmdargs) @@ -474,9 +479,9 @@ def _getpybinargs(self, scriptname): if not self.request.config.getvalue("notoolsonpath"): # XXX we rely on script referring to the correct environment - # we cannot use "(py.std.sys.executable,script)" + # we cannot use "(sys.executable,script)" # because on windows the script is e.g. a py.test.exe - return (py.std.sys.executable, _pytest_fullpath,) # noqa + return (sys.executable, _pytest_fullpath,) # noqa else: pytest.skip("cannot run %r with --no-tools-on-path" % scriptname) @@ -496,7 +501,7 @@ def runpython_c(self, command): command = self._getsysprepend() + command - return self.run(py.std.sys.executable, "-c", command) + return self.run(sys.executable, "-c", command) def runpytest(self, *args): p = py.path.local.make_numbered_dir(prefix="runpytest-", @@ -523,7 +528,7 @@ def spawn(self, cmd, expect_timeout=10.0): pexpect = pytest.importorskip("pexpect", "3.0") - if hasattr(sys, 'pypy_version_info') and '64' in py.std.platform.machine(): + if hasattr(sys, 'pypy_version_info') and '64' in platform.machine(): pytest.skip("pypy-64 bit not supported") if sys.platform == "darwin": pytest.xfail("pexpect does not work reliably on darwin?!") @@ -670,7 +675,7 @@ def fnmatch_lines(self, lines2): def show(arg1, arg2): - py.builtin.print_(arg1, arg2, file=py.std.sys.stderr) + py.builtin.print_(arg1, arg2, file=sys.stderr) lines2 = self._getlines(lines2) lines1 = self.lines[:] nextline = None diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/recwarn.py --- a/_pytest/recwarn.py +++ b/_pytest/recwarn.py @@ -1,7 +1,8 @@ """ recording warnings during test function execution. """ -import py import sys +import warnings + def pytest_funcarg__recwarn(request): """Return a WarningsRecorder instance that provides these methods: @@ -13,7 +14,6 @@ on warning categories. """ if sys.version_info >= (2,7): - import warnings oldfilters = warnings.filters[:] warnings.simplefilter('default') def reset_filters(): @@ -30,26 +30,24 @@ """ assert that calling ``func(*args, **kwargs)`` triggers a DeprecationWarning. """ - warningmodule = py.std.warnings l = [] - oldwarn_explicit = getattr(warningmodule, 'warn_explicit') + oldwarn_explicit = getattr(warnings, 'warn_explicit') def warn_explicit(*args, **kwargs): l.append(args) oldwarn_explicit(*args, **kwargs) - oldwarn = getattr(warningmodule, 'warn') + oldwarn = getattr(warnings, 'warn') def warn(*args, **kwargs): l.append(args) oldwarn(*args, **kwargs) - warningmodule.warn_explicit = warn_explicit - warningmodule.warn = warn + warnings.warn_explicit = warn_explicit + warnings.warn = warn try: ret = func(*args, **kwargs) finally: - warningmodule.warn_explicit = warn_explicit - warningmodule.warn = warn + warnings.warn_explicit = warn_explicit + warnings.warn = warn if not l: - #print warningmodule __tracebackhide__ = True raise AssertionError("%r did not produce DeprecationWarning" %(func,)) return ret @@ -65,7 +63,6 @@ class WarningsRecorder: def __init__(self): - warningmodule = py.std.warnings self.list = [] def showwarning(message, category, filename, lineno, line=0): self.list.append(RecordedWarning( @@ -76,8 +73,8 @@ except TypeError: # < python2.6 self.old_showwarning(message, category, filename, lineno) - self.old_showwarning = warningmodule.showwarning - warningmodule.showwarning = showwarning + self.old_showwarning = warnings.showwarning + warnings.showwarning = showwarning def pop(self, cls=Warning): """ pop the first recorded warning, raise exception if not exists.""" @@ -88,7 +85,6 @@ assert 0, "%r not found in %r" %(cls, self.list) #def resetregistry(self): - # import warnings # warnings.onceregistry.clear() # warnings.__warningregistry__.clear() @@ -96,4 +92,4 @@ self.list[:] = [] def finalize(self): - py.std.warnings.showwarning = self.old_showwarning + warnings.showwarning = self.old_showwarning diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -1,9 +1,10 @@ """ basic collect and runtest protocol implementations """ +import bdb +import sys +from time import time import py import pytest -import sys -from time import time from py._code.code import TerminalRepr def pytest_namespace(): @@ -118,7 +119,7 @@ return call.excinfo and not ( hasattr(report, "wasxfail") or call.excinfo.errisinstance(skip.Exception) or - call.excinfo.errisinstance(py.std.bdb.BdbQuit)) + call.excinfo.errisinstance(bdb.BdbQuit)) def call_runtest_hook(item, when, **kwds): hookname = "pytest_runtest_" + when diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/skipping.py --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -1,7 +1,10 @@ """ support for skip/xfail functions and markers. """ +import os +import sys +import traceback -import py, pytest -import sys +import py +import pytest def pytest_addoption(parser): group = parser.getgroup("general") @@ -79,7 +82,7 @@ msg = [" " * (self.exc[1].offset + 4) + "^",] msg.append("SyntaxError: invalid syntax") else: - msg = py.std.traceback.format_exception_only(*self.exc[:2]) + msg = traceback.format_exception_only(*self.exc[:2]) pytest.fail("Error evaluating %r expression\n" " %s\n" "%s" @@ -87,7 +90,7 @@ pytrace=False) def _getglobals(self): - d = {'os': py.std.os, 'sys': py.std.sys, 'config': self.item.config} + d = {'os': os, 'sys': sys, 'config': self.item.config} func = self.item.obj try: d.update(func.__globals__) diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -5,6 +5,8 @@ import pytest import py import sys +import time + def pytest_addoption(parser): group = parser.getgroup("terminal reporting", "reporting", after="general") @@ -49,7 +51,7 @@ optvalue = config.option.report if optvalue: py.builtin.print_("DEPRECATED: use -r instead of --report option.", - file=py.std.sys.stderr) + file=sys.stderr) if optvalue: for setting in optvalue.split(","): setting = setting.strip() @@ -95,7 +97,7 @@ self.stats = {} self.startdir = self.curdir = py.path.local() if file is None: - file = py.std.sys.stdout + file = sys.stdout self._tw = self.writer = py.io.TerminalWriter(file) if self.config.option.color == 'yes': self._tw.hasmarkup = True @@ -265,7 +267,7 @@ @pytest.mark.trylast def pytest_sessionstart(self, session): - self._sessionstarttime = py.std.time.time() + self._sessionstarttime = time.time() if not self.showheader: return self.write_sep("=", "test session starts", bold=True) @@ -469,7 +471,7 @@ self._tw.line(content) def summary_stats(self): - session_duration = py.std.time.time() - self._sessionstarttime + session_duration = time.time() - self._sessionstarttime keys = ("failed passed skipped deselected " "xfailed xpassed warnings").split() diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/tmpdir.py --- a/_pytest/tmpdir.py +++ b/_pytest/tmpdir.py @@ -1,7 +1,11 @@ """ support for providing temporary directories to test functions. """ -import pytest, py +import re + +import pytest +import py from _pytest.monkeypatch import monkeypatch + class TempdirHandler: def __init__(self, config): self.config = config @@ -63,7 +67,7 @@ path object. """ name = request.node.name - name = py.std.re.sub("[\W]", "_", name) + name = re.sub("[\W]", "_", name) MAXVAL = 30 if len(name) > MAXVAL: name = name[:MAXVAL] diff -r 040c46f257331f1c4546246683a808668969c011 -r fd3386d0539435a7f090179fba2d0babfa4e48e2 _pytest/unittest.py --- a/_pytest/unittest.py +++ b/_pytest/unittest.py @@ -1,7 +1,13 @@ """ discovery and running of std-library "unittest" style tests. """ -import pytest, py +from __future__ import absolute_import +import traceback +import unittest import sys +import pytest +import py + + # for transfering markers from _pytest.python import transfer_markers @@ -45,7 +51,7 @@ if not getattr(cls, "__test__", True): return self.session._fixturemanager.parsefactories(self, unittest=True) - loader = py.std.unittest.TestLoader() + loader = unittest.TestLoader() module = self.getparent(pytest.Module).obj foundsomething = False for name in loader.getTestCaseNames(self.obj): @@ -90,7 +96,7 @@ except TypeError: try: try: - l = py.std.traceback.format_exception(*rawexcinfo) + l = traceback.format_exception(*rawexcinfo) l.insert(0, "NOTE: Incompatible Exception Representation, " "displaying natively:\n\n") pytest.fail("".join(l), pytrace=False) https://bitbucket.org/hpk42/pytest/commits/e57017ad86ce/ Changeset: e57017ad86ce User: nicoddemus Date: 2014-08-01 00:52:08 Summary: Minor fixed in test_capture This test failed only in py34. We don't import logging directly, but it seems that one of the standard modules that are now globally imported started including this on py34. Just removed the assert as it doesn't seem central to the test's objective. Affected #: 1 file diff -r fd3386d0539435a7f090179fba2d0babfa4e48e2 -r e57017ad86ce74ebb0e51cc0ccda1d5a240115a7 testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -340,8 +340,6 @@ p = testdir.makepyfile(""" import sys def test_something(): - # pytest does not import logging - assert 'logging' not in sys.modules import logging logging.basicConfig() logging.warn("hello432") Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Aug 1 10:24:30 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 01 Aug 2014 08:24:30 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20140801082430.16319.38028@app09.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/2383dedde452/ Changeset: 2383dedde452 User: hpk42 Date: 2014-08-01 08:13:44 Summary: Backed out changeset e57017ad86ce -- logging should not be imported Affected #: 1 file diff -r e57017ad86ce74ebb0e51cc0ccda1d5a240115a7 -r 2383dedde45241649cec1f2c753a4d5a1073393e testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -340,6 +340,8 @@ p = testdir.makepyfile(""" import sys def test_something(): + # pytest does not import logging + assert 'logging' not in sys.modules import logging logging.basicConfig() logging.warn("hello432") https://bitbucket.org/hpk42/pytest/commits/9e3ed0aaa45a/ Changeset: 9e3ed0aaa45a User: hpk42 Date: 2014-08-01 10:12:53 Summary: put some imports back to function-level and streamline py2/py3 compat in one place Affected #: 6 files diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,9 @@ - fix issue544 by only removing "@NUM" at the end of "::" separated parts and if the part has an ".py" extension +- don't use py.std import helper, rather import things directly. + Thanks Bruno Oliveira. + 2.6 ----------------------------------- diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.6.1.dev1' +__version__ = '2.6.1.dev2' diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 _pytest/genscript.py --- a/_pytest/genscript.py +++ b/_pytest/genscript.py @@ -1,9 +1,6 @@ """ generate a single-file self-contained version of pytest """ -import base64 -import pickle import py import sys -import zlib def find_toplevel(name): @@ -33,6 +30,7 @@ return name2src def compress_mapping(mapping): + import base64, pickle, zlib data = pickle.dumps(mapping, 2) data = zlib.compress(data, 9) data = base64.encodestring(data) diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -2,8 +2,6 @@ Based on initial code from Ross Lawley. """ -import codecs - import py import os import re @@ -11,20 +9,13 @@ import time # Python 2.X and 3.X compatibility -try: - unichr(65) -except NameError: +if sys.version_info[0] < 3: + from codecs import open +else: unichr = chr -try: - unicode('A') -except NameError: unicode = str -try: - long(1) -except NameError: long = int - class Junit(py.xml.Namespace): pass @@ -207,11 +198,7 @@ self.suite_start_time = time.time() def pytest_sessionfinish(self): - if sys.version_info[0] < 3: - logfile = codecs.open(self.logfile, 'w', encoding='utf-8') - else: - logfile = open(self.logfile, 'w', encoding='utf-8') - + logfile = open(self.logfile, 'w', encoding='utf-8') suite_stop_time = time.time() suite_time_delta = suite_stop_time - self.suite_start_time numtests = self.passed + self.failed diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 _pytest/unittest.py --- a/_pytest/unittest.py +++ b/_pytest/unittest.py @@ -1,7 +1,6 @@ """ discovery and running of std-library "unittest" style tests. """ from __future__ import absolute_import import traceback -import unittest import sys import pytest @@ -12,22 +11,15 @@ from _pytest.python import transfer_markers -def is_unittest(obj): - """Is obj a subclass of unittest.TestCase?""" - unittest = sys.modules.get('unittest') - if unittest is None: - return # nobody can have derived unittest.TestCase +def pytest_pycollect_makeitem(collector, name, obj): + # has unittest been imported and is obj a subclass of its TestCase? try: - return issubclass(obj, unittest.TestCase) - except KeyboardInterrupt: - raise - except: - return False - - -def pytest_pycollect_makeitem(collector, name, obj): - if is_unittest(obj): - return UnitTestCase(name, parent=collector) + if not issubclass(obj, sys.modules["unittest"].TestCase): + return + except Exception: + return + # yes, so let's collect it + return UnitTestCase(name, parent=collector) class UnitTestCase(pytest.Class): @@ -47,11 +39,12 @@ super(UnitTestCase, self).setup() def collect(self): + from unittest import TestLoader cls = self.obj if not getattr(cls, "__test__", True): return self.session._fixturemanager.parsefactories(self, unittest=True) - loader = unittest.TestLoader() + loader = TestLoader() module = self.getparent(pytest.Module).obj foundsomething = False for name in loader.getTestCaseNames(self.obj): diff -r 2383dedde45241649cec1f2c753a4d5a1073393e -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.6.1.dev1', + version='2.6.1.dev2', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Fri Aug 1 20:40:22 2014 From: issues-reply at bitbucket.org (sontek) Date: Fri, 01 Aug 2014 18:40:22 -0000 Subject: [Pytest-commit] Issue #554: pytest 2.6 no longer works with mocks and fixtures (hpk42/pytest) Message-ID: <20140801184022.6367.42946@app13.ash-private.bitbucket.org> New issue 554: pytest 2.6 no longer works with mocks and fixtures https://bitbucket.org/hpk42/pytest/issue/554/pytest-26-no-longer-works-with-mocks-and sontek: I have a test that looks like this: ``` @pytest.mark.unit @mock.patch('ansvc.v1.lib.decorators.invalidate_highfiver') @mock.patch('ansvc.v1.lib.decorators.invalidate_tags') @mock.patch('ansvc.v1.models.surveys.is_survey_dirty') def test_rollups_simple_no_filter_or_compare_valid_json(hf, ig, isd): ``` and I get the error: ``` 10:47:47 fixture 'hf' not found 10:47:47 available fixtures: capfd, tmpdir, recwarn, wsgiapp, monkeypatch, cov, capsys, pytestconfig, session 10:47:47 use 'py.test --fixtures [testpath]' for help on them. ``` pytest 2.5.2 works, pytest 2.6.0 does not. Currently only seeing the failure in python 3.4 but have to dig into it more. From issues-reply at bitbucket.org Fri Aug 1 22:01:01 2014 From: issues-reply at bitbucket.org (Jason R. Coombs) Date: Fri, 01 Aug 2014 20:01:01 -0000 Subject: [Pytest-commit] Issue #555: AttributeError: '_io.FileIO' object has no attribute 'errors' (hpk42/pytest) Message-ID: <20140801200101.21158.90848@app08.ash-private.bitbucket.org> New issue 555: AttributeError: '_io.FileIO' object has no attribute 'errors' https://bitbucket.org/hpk42/pytest/issue/555/attributeerror-_iofileio-object-has-no Jason R. Coombs: New in pytest 2.6.0, many setuptools tests are failing thus: https://travis-ci.org/jaraco/setuptools/jobs/31453603 In particular, the error occurs with this traceback: ``` c:\python\lib\distutils\log.py:44: in info self._log(INFO, msg, args) c:\python\lib\distutils\log.py:30: in _log if stream.errors == 'strict': _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.capture.EncodedFile object at 0x0000000005C87128> name = 'errors' def __getattr__(self, name): > return getattr(self.buffer, name) E AttributeError: '_io.FileIO' object has no attribute 'errors' c:\python\lib\site-packages\pytest-2.6.0-py3.4.egg\_pytest\capture.py:242: AttributeError ``` Using Python 2.x or pytest 2.5.x works around the issue. From issues-reply at bitbucket.org Sun Aug 3 01:07:20 2014 From: issues-reply at bitbucket.org (Bruno Oliveira) Date: Sat, 02 Aug 2014 23:07:20 -0000 Subject: [Pytest-commit] Issue #556: Improve report when slaves collect different tests (hpk42/pytest) Message-ID: <20140802230720.8571.47518@app06.ash-private.bitbucket.org> New issue 556: Improve report when slaves collect different tests https://bitbucket.org/hpk42/pytest/issue/556/improve-report-when-slaves-collect Bruno Oliveira: As described in #437 and #301, a test run stops when slaves collect a different number of tests. The code that raises the error is: ```python # dsession.py:147 def init_distribute(self): assert self.collection_is_completed # XXX allow nodes to have different collections node_collection_items = list(self.node2collection.items()) first_node, col = node_collection_items[0] for node, collection in node_collection_items[1:]: report_collection_diff( col, collection, first_node.gateway.id, node.gateway.id, ) ``` If instead of raising an `AssertionError` in `report_collection_diff` we just `return None` if the collections differ, we obtain a better error message. ``` scheduling tests via LoadScheduling =================================== ERRORS ==================================== _______ ERROR collecting source/python/ben10/_tests/pytest_fixtures.py ________ .env27\lib\site-packages\py\_path\local.py:620: in pyimport __import__(modname) x:\pytest_cx_freeze\pytest\_pytest\assertion\rewrite.py:134: in find_module co = _read_pyc(fn_pypath, pyc) x:\pytest_cx_freeze\pytest\_pytest\assertion\rewrite.py:312: in _read_pyc co = marshal.load(fp) E EOFError: EOF read where object expected ``` Which makes it easy to track down the source of the problem (btw, the above issue has a proposed fix in pull request 192). From issues-reply at bitbucket.org Mon Aug 4 07:16:31 2014 From: issues-reply at bitbucket.org (andii1701) Date: Mon, 04 Aug 2014 05:16:31 -0000 Subject: [Pytest-commit] Issue #557: Running a specific test parameter that has '-' causes syntax error (hpk42/pytest) Message-ID: <20140804051631.25259.62766@app04.ash-private.bitbucket.org> New issue 557: Running a specific test parameter that has '-' causes syntax error https://bitbucket.org/hpk42/pytest/issue/557/running-a-specific-test-parameter-that-has andii1701: Hello I noticed when running a test with a specific parameter causes an syntax error. For example: ``` #!python $ py.test -v -s -k test_eval[3+5-8] ========================================================================== test session starts ========================================================================== platform linux -- Python 3.3.2 -- py-1.4.22 -- pytest-2.6.0 -- /home/ajones/Envs/1800respect/bin/python3.3 plugins: xdist, cov, django collected 5 items INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/main.py", line 83, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/main.py", line 120, in _main INTERNALERROR> config.hook.pytest_collection(session=session) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 412, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 423, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 314, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/main.py", line 124, in pytest_collection INTERNALERROR> return session.perform_collect() INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/main.py", line 546, in perform_collect INTERNALERROR> config=self.config, items=items) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 412, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 423, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/core.py", line 314, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/mark.py", line 67, in pytest_collection_modifyitems INTERNALERROR> if keywordexpr and not matchkeyword(colitem, keywordexpr): INTERNALERROR> File "/home/ajones/Envs/1800respect/lib/python3.3/site-packages/_pytest/mark.py", line 150, in matchkeyword INTERNALERROR> return eval(keywordexpr, {}, mapping) INTERNALERROR> File "", line 1 INTERNALERROR> test_eval[3+5not 8] INTERNALERROR> ^ INTERNALERROR> SyntaxError: invalid syntax ``` The problem is the '-' in the square bracket is getting converted to 'not '. Pull request with a fix is on its way. From commits-noreply at bitbucket.org Mon Aug 4 13:06:22 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 04 Aug 2014 11:06:22 -0000 Subject: [Pytest-commit] commit/apipkg: 2 new changesets Message-ID: <20140804110622.18959.61131@app13.ash-private.bitbucket.org> 2 new commits in apipkg: https://bitbucket.org/hpk42/apipkg/commits/6fb824ce1795/ Changeset: 6fb824ce1795 User: hpk42 Date: 2014-08-04 13:04:01 Summary: alias modules pointing to unimportable modules will return None for all their attributes instead of raising ImportError. This addresses python3.4 where any call to getframeinfo() can choke on sys.modules contents if pytest is not installed (because py.test.* imports it). Affected #: 3 files diff -r df47d01210a750c2732e733e3deb60e57d098538 -r 6fb824ce17958a7f793645d70778fb6ff33a04cc CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,10 @@ - fix issue2 - adapt tests on Jython - handle jython __pkgpath__ missabstraction when running python from jar files +- alias modules pointing to unimportable modules will return None for + all their attributes instead of raising ImportError. This addresses + python3.4 where any call to getframeinfo() can choke on sys.modules + contents if pytest is not installed (because py.test.* imports it). 1.2 ---------------------------------------- diff -r df47d01210a750c2732e733e3deb60e57d098538 -r 6fb824ce17958a7f793645d70778fb6ff33a04cc apipkg.py --- a/apipkg.py +++ b/apipkg.py @@ -17,6 +17,7 @@ that will leave paths from jython jars alone """ if path.startswith('__pyclasspath__'): + return path else: return os.path.abspath(path) @@ -41,7 +42,7 @@ if hasattr(oldmod, "__dict__"): oldmod.__dict__.update(d) mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d) - sys.modules[pkgname] = mod + sys.modules[pkgname] = mod def importobj(modpath, attrname): module = __import__(modpath, None, None, ['__doc__']) @@ -72,11 +73,11 @@ self.__implprefix__ = implprefix or name if attr: for name, val in attr.items(): - #print "setting", self.__name__, name, val + # print "setting", self.__name__, name, val setattr(self, name, val) for name, importspec in importspec.items(): if isinstance(importspec, dict): - subname = '%s.%s'%(self.__name__, name) + subname = '%s.%s' % (self.__name__, name) apimod = ApiModule(subname, importspec, implprefix) sys.modules[subname] = apimod setattr(self, name, apimod) @@ -88,7 +89,7 @@ modpath = implprefix + modpath if not attrname: - subname = '%s.%s'%(self.__name__, name) + subname = '%s.%s' % (self.__name__, name) apimod = AliasModule(subname, modpath) sys.modules[subname] = apimod if '.' not in name: @@ -108,7 +109,7 @@ def __makeattr(self, name): """lazily compute value for name or raise AttributeError if unknown.""" - #print "makeattr", self.__name__, name + # print "makeattr", self.__name__, name target = None if '__onfirstaccess__' in self.__map__: target = self.__map__.pop('__onfirstaccess__') @@ -126,7 +127,7 @@ try: del self.__map__[name] except KeyError: - pass # in a recursive-import situation a double-del can happen + pass # in a recursive-import situation a double-del can happen return result __getattr__ = __makeattr @@ -166,7 +167,10 @@ return '' % (modname, x) def __getattribute__(self, name): - return getattr(getmod(), name) + try: + return getattr(getmod(), name) + except ImportError: + return None def __setattr__(self, name, value): setattr(getmod(), name, value) diff -r df47d01210a750c2732e733e3deb60e57d098538 -r 6fb824ce17958a7f793645d70778fb6ff33a04cc test_apipkg.py --- a/test_apipkg.py +++ b/test_apipkg.py @@ -423,6 +423,13 @@ r = repr(am) assert "" == r assert am.format + assert not hasattr(am, "lqkje") + +def test_aliasmodule_aliases_unimportable(): + am = apipkg.AliasModule("mymod", "qlwkejqlwe", 'main') + r = repr(am) + assert "" == r + assert am.qwe is None def test_aliasmodule_unicode(): am = apipkg.AliasModule(py.builtin._totext("mymod"), "pprint") https://bitbucket.org/hpk42/apipkg/commits/64935a1665d6/ Changeset: 64935a1665d6 User: hpk42 Date: 2014-08-04 13:04:15 Summary: fix test wrt py34, modernize tox.ini Affected #: 2 files diff -r 6fb824ce17958a7f793645d70778fb6ff33a04cc -r 64935a1665d63883c751da5693039a304c1f7909 test_apipkg.py --- a/test_apipkg.py +++ b/test_apipkg.py @@ -245,12 +245,12 @@ def test_initpkg_not_transfers_not_existing_attrs(monkeypatch): mod = ModuleType('hello') mod.__file__ = "hello.py" + assert not hasattr(mod, '__path__') monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) newmod = sys.modules['hello'] assert newmod != mod assert newmod.__file__ == py.path.local(mod.__file__) - assert not hasattr(newmod, '__loader__') assert not hasattr(newmod, '__path__') diff -r 6fb824ce17958a7f793645d70778fb6ff33a04cc -r 64935a1665d63883c751da5693039a304c1f7909 tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] -envlist=py27,py26,py25,py24,py31,py32,jython +envlist=py27,py26,py33,py34,jython [tox:hudson] sdistsrc={distshare}/apipkg-* [testenv] -commands=py.test --junitxml={envlogdir}/junit-{envname}.xml [] +commands=py.test [] deps=pytest [testenv:jython] -commands=py.test-jython --junitxml={envlogdir}/junit-{envname}.xml [] +commands=py.test-jython [] Repository URL: https://bitbucket.org/hpk42/apipkg/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Mon Aug 4 14:47:34 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 04 Aug 2014 12:47:34 -0000 Subject: [Pytest-commit] commit/py: 4 new changesets Message-ID: <20140804124734.6325.34246@app03.ash-private.bitbucket.org> 4 new commits in py: https://bitbucket.org/hpk42/py/commits/0973095b4ffe/ Changeset: 0973095b4ffe User: hpk42 Date: 2014-08-04 13:10:59 Summary: use newer apipkg version which makes attribute access on alias modules resolve to None rather than an ImportError. This helps with code that uses inspect.getframeinfo() on py34 which causes a complete walk on sys.modules thus triggering the alias module to resolve and blowing up with ImportError. The negative side is that something like "py.test.X" will now result in None instead of "importerror: pytest" if pytest is not installed. But you shouldn't import "py.test" anyway anymore. Affected #: 3 files diff -r 37f557844498ef4943c1e68c8f40bc3713b0b393 -r 0973095b4ffec521e3f9ba94dd6c6b0d6c84a6e4 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,17 @@ +1.4.23 +================================================== + +- use newer apipkg version which makes attribute access on + alias modules resolve to None rather than an ImportError. + This helps with code that uses inspect.getframeinfo() + on py34 which causes a complete walk on sys.modules + thus triggering the alias module to resolve and blowing + up with ImportError. The negative side is that something + like "py.test.X" will now result in None instead of "importerror: pytest" + if pytest is not installed. But you shouldn't import "py.test" + anyway anymore. + + 1.4.22 ================================================== diff -r 37f557844498ef4943c1e68c8f40bc3713b0b393 -r 0973095b4ffec521e3f9ba94dd6c6b0d6c84a6e4 py/_apipkg.py --- a/py/_apipkg.py +++ b/py/_apipkg.py @@ -17,6 +17,7 @@ that will leave paths from jython jars alone """ if path.startswith('__pyclasspath__'): + return path else: return os.path.abspath(path) @@ -41,7 +42,7 @@ if hasattr(oldmod, "__dict__"): oldmod.__dict__.update(d) mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d) - sys.modules[pkgname] = mod + sys.modules[pkgname] = mod def importobj(modpath, attrname): module = __import__(modpath, None, None, ['__doc__']) @@ -72,11 +73,11 @@ self.__implprefix__ = implprefix or name if attr: for name, val in attr.items(): - #print "setting", self.__name__, name, val + # print "setting", self.__name__, name, val setattr(self, name, val) for name, importspec in importspec.items(): if isinstance(importspec, dict): - subname = '%s.%s'%(self.__name__, name) + subname = '%s.%s' % (self.__name__, name) apimod = ApiModule(subname, importspec, implprefix) sys.modules[subname] = apimod setattr(self, name, apimod) @@ -88,7 +89,7 @@ modpath = implprefix + modpath if not attrname: - subname = '%s.%s'%(self.__name__, name) + subname = '%s.%s' % (self.__name__, name) apimod = AliasModule(subname, modpath) sys.modules[subname] = apimod if '.' not in name: @@ -108,7 +109,7 @@ def __makeattr(self, name): """lazily compute value for name or raise AttributeError if unknown.""" - #print "makeattr", self.__name__, name + # print "makeattr", self.__name__, name target = None if '__onfirstaccess__' in self.__map__: target = self.__map__.pop('__onfirstaccess__') @@ -126,7 +127,7 @@ try: del self.__map__[name] except KeyError: - pass # in a recursive-import situation a double-del can happen + pass # in a recursive-import situation a double-del can happen return result __getattr__ = __makeattr @@ -166,7 +167,10 @@ return '' % (modname, x) def __getattribute__(self, name): - return getattr(getmod(), name) + try: + return getattr(getmod(), name) + except ImportError: + return None def __setattr__(self, name, value): setattr(getmod(), name, value) diff -r 37f557844498ef4943c1e68c8f40bc3713b0b393 -r 0973095b4ffec521e3f9ba94dd6c6b0d6c84a6e4 tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py26,py27,py32,py33,external +envlist=py26,py27,py33,py34,external # py27-xdist causes problems with svn, py25 requires virtualenv==1.9.1 #indexserver= # default=http://pypi.testrun.org https://bitbucket.org/hpk42/py/commits/ff73ae3a4b47/ Changeset: ff73ae3a4b47 User: hpk42 Date: 2014-08-04 13:15:48 Summary: adapt one svn test to only check for any exception instead of specific ones because different svn versions cause different errors and we don't care. Affected #: 2 files diff -r 0973095b4ffec521e3f9ba94dd6c6b0d6c84a6e4 -r ff73ae3a4b473d995d09a3ad69062af22a33d624 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,10 @@ if pytest is not installed. But you shouldn't import "py.test" anyway anymore. +- adapt one svn test to only check for any exception instead + of specific ones because different svn versions cause different + errors and we don't care. + 1.4.22 ================================================== diff -r 0973095b4ffec521e3f9ba94dd6c6b0d6c84a6e4 -r ff73ae3a4b473d995d09a3ad69062af22a33d624 testing/path/test_svnwc.py --- a/testing/path/test_svnwc.py +++ b/testing/path/test_svnwc.py @@ -338,7 +338,7 @@ somefile = root.join('somefile') somefile.ensure(file=True) # not yet added to repo - py.test.raises((py.process.cmdexec.Error, ValueError), 'somefile.lock()') + py.test.raises(Exception, 'somefile.lock()') somefile.write('foo') somefile.commit('test') assert somefile.check(versioned=True) https://bitbucket.org/hpk42/py/commits/01ae2cfcc61c/ Changeset: 01ae2cfcc61c User: hpk42 Date: 2014-08-04 13:16:34 Summary: prepare 1.4.23 Affected #: 2 files diff -r ff73ae3a4b473d995d09a3ad69062af22a33d624 -r 01ae2cfcc61c4fcb3aa5031349adb5b467c31018 py/__init__.py --- a/py/__init__.py +++ b/py/__init__.py @@ -8,7 +8,7 @@ (c) Holger Krekel and others, 2004-2013 """ -__version__ = '1.4.22' +__version__ = '1.4.23' from py import _apipkg diff -r ff73ae3a4b473d995d09a3ad69062af22a33d624 -r 01ae2cfcc61c4fcb3aa5031349adb5b467c31018 setup.py --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.22', + version='1.4.23', url='http://pylib.readthedocs.org/', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], https://bitbucket.org/hpk42/py/commits/591f6bfa83c0/ Changeset: 591f6bfa83c0 User: hpk42 Date: 2014-08-04 13:31:29 Summary: Added tag 1.4.23 for changeset 01ae2cfcc61c Affected #: 1 file diff -r 01ae2cfcc61c4fcb3aa5031349adb5b467c31018 -r 591f6bfa83c0f26d503a57f60c3275d33a4208f0 .hgtags --- a/.hgtags +++ b/.hgtags @@ -55,3 +55,4 @@ 284cc172e294d48edc840012e1451c32c3963d92 1.4.19 a3e0626aa0c5aecf271367dc77e476ab216ea3c8 1.4.20 5e48016c4a3af8e7358a1267d33d021e71765bed 1.4.21 +01ae2cfcc61c4fcb3aa5031349adb5b467c31018 1.4.23 Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Wed Aug 6 07:45:41 2014 From: issues-reply at bitbucket.org (vitaly bichov) Date: Wed, 06 Aug 2014 05:45:41 -0000 Subject: [Pytest-commit] Issue #558: resulting junitxml doesn't confirm to junit.xsd schema (hpk42/pytest) Message-ID: <20140806054541.16659.28811@app08.ash-private.bitbucket.org> New issue 558: resulting junitxml doesn't confirm to junit.xsd schema https://bitbucket.org/hpk42/pytest/issue/558/resulting-junitxml-doesnt-confirm-to vitaly bichov: The attached file fails validation against the xsd from: http://windyroad.com.au/2011/02/07/apache-ant-junit-xml-schema/ this in turn results in failure to parse the test results in Jenkins by xUnit plugin: 16:43:56 [xUnit] [ERROR] - The result file '/DATA/maas_slave/workspace/MaaS-Python-branch-master/target/junit-report.xml' for the metric 'JUnit' is not valid. The result file has been skipped. From issues-reply at bitbucket.org Wed Aug 6 17:38:38 2014 From: issues-reply at bitbucket.org (Justin Valentini) Date: Wed, 06 Aug 2014 15:38:38 -0000 Subject: [Pytest-commit] Issue #559: Loop on failure is creating zombie processes (hpk42/pytest) Message-ID: <20140806153838.23183.42398@app06.ash-private.bitbucket.org> New issue 559: Loop on failure is creating zombie processes https://bitbucket.org/hpk42/pytest/issue/559/loop-on-failure-is-creating-zombie Justin Valentini: Hi, Is anyone else having problems where ```py.test --looponfail``` creates zombies processes that continue to accumulate until the main process is killed? Thanks, Justin From issues-reply at bitbucket.org Thu Aug 7 07:00:21 2014 From: issues-reply at bitbucket.org (Alexander Schepanovski) Date: Thu, 07 Aug 2014 05:00:21 -0000 Subject: [Pytest-commit] Issue #183: Boolean algebra and factors (hpk42/tox) Message-ID: <20140807050021.19360.19849@app10.ash-private.bitbucket.org> New issue 183: Boolean algebra and factors https://bitbucket.org/hpk42/tox/issue/183/boolean-algebra-and-factors Alexander Schepanovski: I proposed before something like: ``` [testenv] deps = py26,py27: kind-of-or py26-django13: kind-of-and ``` This, however, could look a bit strange when negation is involved: ``` [testenv] deps = py26-!django13: kind-of-and ``` The alternatives I see is using `|` and `&` or `||` and `&&` (c-like). This, however, will trick users into adding spaces around operators: ``` [testenv] command = factor1 && factor2: kind-of-and ``` And if we permit spaces then other users could hit conditional syntax without expecting it. Either way (allowing spaces or not) will cause confusion for someone. I am currently in favor of using commas and hyphens, without allowing spaces. What do you think? Maybe you have other suggestions? Anyway, I am willing to implement this once we are set up on the interface. Responsible: hpk42 From commits-noreply at bitbucket.org Thu Aug 7 10:34:04 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 07 Aug 2014 08:34:04 -0000 Subject: [Pytest-commit] commit/pytest: 3 new changesets Message-ID: <20140807083404.3941.34539@app10.ash-private.bitbucket.org> 3 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/fd0377e5a7ec/ Changeset: fd0377e5a7ec User: flub Date: 2014-08-01 01:29:35 Summary: Simply show the node ID for verbose output This strips the line number, /@\d/, from the verbose output so it is directly the node ID of the test. This in turn means no special logic for accepting the line number as part of the node ID is needed when parsing the command line. Affected #: 6 files diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -2,7 +2,6 @@ import py # DON't import pytest here because it causes import cycle troubles -import re import sys, os from _pytest import hookspec # the extension point definitions from _pytest.core import PluginManager @@ -181,8 +180,7 @@ a = option.attrs() arggroup.add_argument(*n, **a) # bash like autocompletion for dirs (appending '/') - optparser.add_argument(FILE_OR_DIR, nargs='*', type=node_with_line_number, - ).completer=filescompleter + optparser.add_argument(FILE_OR_DIR, nargs='*').completer=filescompleter return optparser def parse_setoption(self, args, option): @@ -862,13 +860,6 @@ return {} -rex_pyat = re.compile(r'(.*\.py)@\d+$') - -def node_with_line_number(string): - return "::".join(rex_pyat.sub(lambda m: m.group(1), part) - for part in string.split("::")) - - def setns(obj, dic): import pytest for name, value in dic.items(): diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -380,9 +380,6 @@ fspath = "%s <- %s" % (collect_fspath, fspath) if fspath: line = str(fspath) - if lineno is not None: - lineno += 1 - line += "@" + str(lineno) if domain: split = str(domain).split('[') split[0] = split[0].replace('.', '::') # don't replace '.' in params diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1692,22 +1692,22 @@ """) result = testdir.runpytest("-v") result.stdout.fnmatch_lines(""" - test_mod1.py at 1::test_func[s1] PASSED - test_mod2.py at 1::test_func2[s1] PASSED - test_mod2.py at 3::test_func3[s1-m1] PASSED - test_mod2.py at 5::test_func3b[s1-m1] PASSED - test_mod2.py at 3::test_func3[s1-m2] PASSED - test_mod2.py at 5::test_func3b[s1-m2] PASSED - test_mod1.py at 1::test_func[s2] PASSED - test_mod2.py at 1::test_func2[s2] PASSED - test_mod2.py at 3::test_func3[s2-m1] PASSED - test_mod2.py at 5::test_func3b[s2-m1] PASSED - test_mod2.py at 7::test_func4[m1] PASSED - test_mod2.py at 3::test_func3[s2-m2] PASSED - test_mod2.py at 5::test_func3b[s2-m2] PASSED - test_mod2.py at 7::test_func4[m2] PASSED - test_mod1.py at 3::test_func1[m1] PASSED - test_mod1.py at 3::test_func1[m2] PASSED + test_mod1.py::test_func[s1] PASSED + test_mod2.py::test_func2[s1] PASSED + test_mod2.py::test_func3[s1-m1] PASSED + test_mod2.py::test_func3b[s1-m1] PASSED + test_mod2.py::test_func3[s1-m2] PASSED + test_mod2.py::test_func3b[s1-m2] PASSED + test_mod1.py::test_func[s2] PASSED + test_mod2.py::test_func2[s2] PASSED + test_mod2.py::test_func3[s2-m1] PASSED + test_mod2.py::test_func3b[s2-m1] PASSED + test_mod2.py::test_func4[m1] PASSED + test_mod2.py::test_func3[s2-m2] PASSED + test_mod2.py::test_func3b[s2-m2] PASSED + test_mod2.py::test_func4[m2] PASSED + test_mod1.py::test_func1[m1] PASSED + test_mod1.py::test_func1[m2] PASSED """) def test_class_ordering(self, testdir): @@ -1744,18 +1744,18 @@ """) result = testdir.runpytest("-vs") result.stdout.fnmatch_lines(""" - test_class_ordering.py at 4::TestClass2::test_1[1-a] PASSED - test_class_ordering.py at 4::TestClass2::test_1[2-a] PASSED - test_class_ordering.py at 6::TestClass2::test_2[1-a] PASSED - test_class_ordering.py at 6::TestClass2::test_2[2-a] PASSED - test_class_ordering.py at 4::TestClass2::test_1[1-b] PASSED - test_class_ordering.py at 4::TestClass2::test_1[2-b] PASSED - test_class_ordering.py at 6::TestClass2::test_2[1-b] PASSED - test_class_ordering.py at 6::TestClass2::test_2[2-b] PASSED - test_class_ordering.py at 9::TestClass::test_3[1-a] PASSED - test_class_ordering.py at 9::TestClass::test_3[2-a] PASSED - test_class_ordering.py at 9::TestClass::test_3[1-b] PASSED - test_class_ordering.py at 9::TestClass::test_3[2-b] PASSED + test_class_ordering.py::TestClass2::test_1[1-a] PASSED + test_class_ordering.py::TestClass2::test_1[2-a] PASSED + test_class_ordering.py::TestClass2::test_2[1-a] PASSED + test_class_ordering.py::TestClass2::test_2[2-a] PASSED + test_class_ordering.py::TestClass2::test_1[1-b] PASSED + test_class_ordering.py::TestClass2::test_1[2-b] PASSED + test_class_ordering.py::TestClass2::test_2[1-b] PASSED + test_class_ordering.py::TestClass2::test_2[2-b] PASSED + test_class_ordering.py::TestClass::test_3[1-a] PASSED + test_class_ordering.py::TestClass::test_3[2-a] PASSED + test_class_ordering.py::TestClass::test_3[1-b] PASSED + test_class_ordering.py::TestClass::test_3[2-b] PASSED """) def test_parametrize_separated_order_higher_scope_first(self, testdir): diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 testing/test_conftest.py --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -251,7 +251,7 @@ def test_hello(found): assert found == 1 """)) - result = testdir.runpytest(str(p) + "@2::test_hello", "-h") + result = testdir.runpytest(str(p) + "::test_hello", "-h") result.stdout.fnmatch_lines(""" *--hello-world* """) diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 testing/test_parseopt.py --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -145,21 +145,6 @@ assert args.R == True assert args.S == False - def test_parse_removes_line_number_from_positional_arguments(self, parser): - args = parser.parse(['path.txt at 2::item', - 'path2.py::func2[param with .py at 123]', - 'path.py at 123', - 'hello/path.py at 123', - ]) - # we only remove "@NUM" syntax for .py files which are currently - # the only ones which can produce it. - assert getattr(args, parseopt.FILE_OR_DIR) == [ - 'path.txt at 2::item', - 'path2.py::func2[param with .py at 123]', - 'path.py', - 'hello/path.py', - ] - def test_parse_defaultgetter(self): def defaultget(option): if not hasattr(option, 'type'): diff -r 040c46f257331f1c4546246683a808668969c011 -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -51,9 +51,9 @@ result = testdir.runpytest(*option.args) if option.verbose: result.stdout.fnmatch_lines([ - "*test_pass_skip_fail.py at 2::test_ok PASS*", - "*test_pass_skip_fail.py at 4::test_skip SKIP*", - "*test_pass_skip_fail.py at 6::test_func FAIL*", + "*test_pass_skip_fail.py::test_ok PASS*", + "*test_pass_skip_fail.py::test_skip SKIP*", + "*test_pass_skip_fail.py::test_func FAIL*", ]) else: result.stdout.fnmatch_lines([ @@ -126,7 +126,7 @@ ]) result = testdir.runpytest("-v", p2) result.stdout.fnmatch_lines([ - "*test_p2.py <- *test_p1.py at 2::TestMore::test_p1*", + "*test_p2.py <- *test_p1.py::TestMore::test_p1*", ]) def test_itemreport_directclasses_not_shown_as_subclasses(self, testdir): @@ -450,17 +450,17 @@ """) result = testdir.runpytest(p1, '-v') result.stdout.fnmatch_lines([ - "*test_verbose_reporting.py at 2::test_fail *FAIL*", - "*test_verbose_reporting.py at 4::test_pass *PASS*", - "*test_verbose_reporting.py at 7::TestClass::test_skip *SKIP*", - "*test_verbose_reporting.py at 10::test_gen*0* *FAIL*", + "*test_verbose_reporting.py::test_fail *FAIL*", + "*test_verbose_reporting.py::test_pass *PASS*", + "*test_verbose_reporting.py::TestClass::test_skip *SKIP*", + "*test_verbose_reporting.py::test_gen*0* *FAIL*", ]) assert result.ret == 1 pytestconfig.pluginmanager.skipifmissing("xdist") result = testdir.runpytest(p1, '-v', '-n 1') result.stdout.fnmatch_lines([ - "*FAIL*test_verbose_reporting.py at 2::test_fail*", + "*FAIL*test_verbose_reporting.py::test_fail*", ]) assert result.ret == 1 https://bitbucket.org/hpk42/pytest/commits/8007f98027d6/ Changeset: 8007f98027d6 User: flub Date: 2014-08-02 00:06:24 Summary: Merge default Affected #: 20 files diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,9 @@ - fix issue544 by only removing "@NUM" at the end of "::" separated parts and if the part has an ".py" extension +- don't use py.std import helper, rather import things directly. + Thanks Bruno Oliveira. + 2.6 ----------------------------------- diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.6.1.dev1' +__version__ = '2.6.1.dev2' diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/assertion/oldinterpret.py --- a/_pytest/assertion/oldinterpret.py +++ b/_pytest/assertion/oldinterpret.py @@ -1,3 +1,5 @@ +import traceback +import types import py import sys, inspect from compiler import parse, ast, pycodegen @@ -477,7 +479,7 @@ def interpret(source, frame, should_fail=False): module = Interpretable(parse(source, 'exec').node) #print "got module", module - if isinstance(frame, py.std.types.FrameType): + if isinstance(frame, types.FrameType): frame = py.code.Frame(frame) try: module.run(frame) @@ -487,7 +489,6 @@ except passthroughex: raise except: - import traceback traceback.print_exc() if should_fail: return ("(assertion failed, but when it was re-run for " diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -1,4 +1,5 @@ """Utilities for assertion debugging""" +import pprint import py try: @@ -168,6 +169,7 @@ If the input are bytes they will be safely converted to text. """ + from difflib import ndiff explanation = [] if isinstance(left, py.builtin.bytes): left = u(repr(left)[1:-1]).replace(r'\n', '\n') @@ -195,8 +197,8 @@ left = left[:-i] right = right[:-i] explanation += [line.strip('\n') - for line in py.std.difflib.ndiff(left.splitlines(), - right.splitlines())] + for line in ndiff(left.splitlines(), + right.splitlines())] return explanation @@ -214,8 +216,8 @@ explanation += [ u('Right contains more items, first extra item: %s') % py.io.saferepr(right[len(left)],)] - return explanation # + _diff_text(py.std.pprint.pformat(left), - # py.std.pprint.pformat(right)) + return explanation # + _diff_text(pprint.pformat(left), + # pprint.pformat(right)) def _compare_eq_set(left, right, verbose=False): @@ -242,7 +244,7 @@ len(same)] elif same: explanation += [u('Common items:')] - explanation += py.std.pprint.pformat(same).splitlines() + explanation += pprint.pformat(same).splitlines() diff = set(k for k in common if left[k] != right[k]) if diff: explanation += [u('Differing items:')] @@ -252,12 +254,12 @@ extra_left = set(left) - set(right) if extra_left: explanation.append(u('Left contains more items:')) - explanation.extend(py.std.pprint.pformat( + explanation.extend(pprint.pformat( dict((k, left[k]) for k in extra_left)).splitlines()) extra_right = set(right) - set(left) if extra_right: explanation.append(u('Right contains more items:')) - explanation.extend(py.std.pprint.pformat( + explanation.extend(pprint.pformat( dict((k, right[k]) for k in extra_right)).splitlines()) return explanation diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -1,4 +1,9 @@ """ command line options, ini-file and conftest.py processing. """ +import argparse +import shlex +import traceback +import types +import warnings import py # DON't import pytest here because it causes import cycle troubles @@ -28,7 +33,7 @@ except ConftestImportFailure: e = sys.exc_info()[1] tw = py.io.TerminalWriter(sys.stderr) - for line in py.std.traceback.format_exception(*e.excinfo): + for line in traceback.format_exception(*e.excinfo): tw.line(line.rstrip(), red=True) tw.line("ERROR: could not load %s\n" % (e.path), red=True) return 4 @@ -70,7 +75,7 @@ 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) + args = shlex.split(args) pluginmanager = get_plugin_manager() try: if plugins: @@ -227,7 +232,7 @@ class Argument: - """class that mimics the necessary behaviour of py.std.optparse.Option """ + """class that mimics the necessary behaviour of optparse.Option """ _typ_map = { 'int': int, 'string': str, @@ -245,7 +250,7 @@ try: help = attrs['help'] if '%default' in help: - py.std.warnings.warn( + warnings.warn( 'pytest now uses argparse. "%default" should be' ' changed to "%(default)s" ', FutureWarning, @@ -261,7 +266,7 @@ if isinstance(typ, py.builtin._basestring): if typ == 'choice': if self.TYPE_WARN: - py.std.warnings.warn( + warnings.warn( 'type argument to addoption() is a string %r.' ' For parsearg this is optional and when supplied ' ' should be a type.' @@ -273,7 +278,7 @@ attrs['type'] = type(attrs['choices'][0]) else: if self.TYPE_WARN: - py.std.warnings.warn( + warnings.warn( 'type argument to addoption() is a string %r.' ' For parsearg this should be a type.' ' (options: %s)' % (typ, names), @@ -393,10 +398,10 @@ self.options.append(option) -class MyOptionParser(py.std.argparse.ArgumentParser): +class MyOptionParser(argparse.ArgumentParser): def __init__(self, parser): self._parser = parser - py.std.argparse.ArgumentParser.__init__(self, usage=parser._usage, + argparse.ArgumentParser.__init__(self, usage=parser._usage, add_help=False, formatter_class=DropShorterLongHelpFormatter) def parse_args(self, args=None, namespace=None): @@ -405,12 +410,12 @@ if argv: for arg in argv: if arg and arg[0] == '-': - msg = py.std.argparse._('unrecognized arguments: %s') + msg = argparse._('unrecognized arguments: %s') self.error(msg % ' '.join(argv)) getattr(args, FILE_OR_DIR).extend(argv) return args -class DropShorterLongHelpFormatter(py.std.argparse.HelpFormatter): +class DropShorterLongHelpFormatter(argparse.HelpFormatter): """shorten help for long options that differ only in extra hyphens - collapse **long** options that are the same except for extra hyphens @@ -420,7 +425,7 @@ - cache result on action object as this is called at least 2 times """ def _format_action_invocation(self, action): - orgstr = py.std.argparse.HelpFormatter._format_action_invocation(self, action) + orgstr = argparse.HelpFormatter._format_action_invocation(self, action) if orgstr and orgstr[0] != '-': # only optional arguments return orgstr res = getattr(action, '_formatted_action_invocation', None) @@ -744,7 +749,7 @@ self.hook.pytest_cmdline_preparse(config=self, args=args) args = self._parser.parse_setoption(args, self.option) if not args: - args.append(py.std.os.getcwd()) + args.append(os.getcwd()) self.args = args def addinivalue_line(self, name, line): @@ -782,11 +787,11 @@ if type == "pathlist": dp = py.path.local(self.inicfg.config.path).dirpath() l = [] - for relpath in py.std.shlex.split(value): + for relpath in shlex.split(value): l.append(dp.join(relpath, abs=True)) return l elif type == "args": - return py.std.shlex.split(value) + return shlex.split(value) elif type == "linelist": return [t for t in map(lambda x: x.strip(), value.split("\n")) if t] else: @@ -867,7 +872,7 @@ mod = getattr(obj, name, None) if mod is None: modname = "pytest.%s" % name - mod = py.std.types.ModuleType(modname) + mod = types.ModuleType(modname) sys.modules[modname] = mod mod.__all__ = [] setattr(obj, name, mod) diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/core.py --- a/_pytest/core.py +++ b/_pytest/core.py @@ -1,6 +1,7 @@ """ pytest PluginManager, basic initialization and tracing. """ +import os import sys import inspect import py @@ -154,7 +155,7 @@ # API for bootstrapping # def _envlist(self, varname): - val = py.std.os.environ.get(varname, None) + val = os.environ.get(varname, None) if val is not None: return val.split(',') return () @@ -221,7 +222,7 @@ return self.import_plugin(modname[7:]) raise except: - e = py.std.sys.exc_info()[1] + e = sys.exc_info()[1] import pytest if not hasattr(pytest, 'skip') or not isinstance(e, pytest.skip.Exception): raise diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/doctest.py --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -1,5 +1,6 @@ """ discover and run doctests in modules and test files.""" - +from __future__ import absolute_import +import traceback import pytest, py from _pytest.python import FixtureRequest, FuncFixtureInfo from py._code.code import TerminalRepr, ReprFileLocation @@ -43,7 +44,7 @@ self.runner.run(self.dtest) def repr_failure(self, excinfo): - doctest = py.std.doctest + import doctest if excinfo.errisinstance((doctest.DocTestFailure, doctest.UnexpectedException)): doctestfailure = excinfo.value @@ -56,8 +57,8 @@ lineno = test.lineno + example.lineno + 1 message = excinfo.type.__name__ reprlocation = ReprFileLocation(filename, lineno, message) - checker = py.std.doctest.OutputChecker() - REPORT_UDIFF = py.std.doctest.REPORT_UDIFF + checker = doctest.OutputChecker() + REPORT_UDIFF = doctest.REPORT_UDIFF filelines = py.path.local(filename).readlines(cr=0) lines = [] if lineno is not None: @@ -78,7 +79,7 @@ inner_excinfo = py.code.ExceptionInfo(excinfo.value.exc_info) lines += ["UNEXPECTED EXCEPTION: %s" % repr(inner_excinfo.value)] - lines += py.std.traceback.format_exception(*excinfo.value.exc_info) + lines += traceback.format_exception(*excinfo.value.exc_info) return ReprFailDoctest(reprlocation, lines) else: return super(DoctestItem, self).repr_failure(excinfo) @@ -88,7 +89,7 @@ class DoctestTextfile(DoctestItem, pytest.File): def runtest(self): - doctest = py.std.doctest + import doctest # satisfy `FixtureRequest` constructor... self.funcargs = {} fm = self.session._fixturemanager @@ -106,7 +107,7 @@ class DoctestModule(pytest.File): def collect(self): - doctest = py.std.doctest + import doctest if self.fspath.basename == "conftest.py": module = self.config._conftest.importconftest(self.fspath) else: diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/genscript.py --- a/_pytest/genscript.py +++ b/_pytest/genscript.py @@ -2,8 +2,9 @@ import py import sys + def find_toplevel(name): - for syspath in py.std.sys.path: + for syspath in sys.path: base = py.path.local(syspath) lib = base/name if lib.check(dir=1): @@ -29,9 +30,10 @@ return name2src def compress_mapping(mapping): - data = py.std.pickle.dumps(mapping, 2) - data = py.std.zlib.compress(data, 9) - data = py.std.base64.encodestring(data) + import base64, pickle, zlib + data = pickle.dumps(mapping, 2) + data = zlib.compress(data, 9) + data = base64.encodestring(data) data = data.decode('ascii') return data diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -2,7 +2,6 @@ Based on initial code from Ross Lawley. """ - import py import os import re @@ -10,20 +9,13 @@ import time # Python 2.X and 3.X compatibility -try: - unichr(65) -except NameError: +if sys.version_info[0] < 3: + from codecs import open +else: unichr = chr -try: - unicode('A') -except NameError: unicode = str -try: - long(1) -except NameError: long = int - class Junit(py.xml.Namespace): pass @@ -206,11 +198,7 @@ self.suite_start_time = time.time() def pytest_sessionfinish(self): - if py.std.sys.version_info[0] < 3: - logfile = py.std.codecs.open(self.logfile, 'w', encoding='utf-8') - else: - logfile = open(self.logfile, 'w', encoding='utf-8') - + logfile = open(self.logfile, 'w', encoding='utf-8') suite_stop_time = time.time() suite_time_delta = suite_stop_time - self.suite_start_time numtests = self.passed + self.failed diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -1,4 +1,5 @@ """ core implementation of testing process: init, session, runtest loop. """ +import re import py import pytest, _pytest @@ -19,7 +20,7 @@ EXIT_INTERNALERROR = 3 EXIT_USAGEERROR = 4 -name_re = py.std.re.compile("^[a-zA-Z_]\w*$") +name_re = re.compile("^[a-zA-Z_]\w*$") def pytest_addoption(parser): parser.addini("norecursedirs", "directory patterns to avoid for recursion", @@ -315,7 +316,7 @@ except py.builtin._sysex: raise except: - failure = py.std.sys.exc_info() + failure = sys.exc_info() setattr(self, exattrname, failure) raise setattr(self, attrname, res) diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/pdb.py --- a/_pytest/pdb.py +++ b/_pytest/pdb.py @@ -1,7 +1,11 @@ """ interactive debugging with PDB, the Python Debugger. """ +from __future__ import absolute_import +import pdb +import sys -import pytest, py -import sys +import pytest +import py + def pytest_addoption(parser): group = parser.getgroup("general") @@ -16,10 +20,10 @@ if config.getvalue("usepdb"): config.pluginmanager.register(PdbInvoke(), 'pdbinvoke') - old = (py.std.pdb.set_trace, pytestPDB._pluginmanager) + old = (pdb.set_trace, pytestPDB._pluginmanager) def fin(): - py.std.pdb.set_trace, pytestPDB._pluginmanager = old - py.std.pdb.set_trace = pytest.set_trace + pdb.set_trace, pytestPDB._pluginmanager = old + pdb.set_trace = pytest.set_trace pytestPDB._pluginmanager = config.pluginmanager config._cleanup.append(fin) @@ -38,7 +42,7 @@ tw = py.io.TerminalWriter() tw.line() tw.sep(">", "PDB set_trace (IO-capturing turned off)") - py.std.pdb.Pdb().set_trace(frame) + pdb.Pdb().set_trace(frame) class PdbInvoke: @@ -74,7 +78,8 @@ def _postmortem_traceback(excinfo): # A doctest.UnexpectedException is not useful for post_mortem. # Use the underlying exception instead: - if isinstance(excinfo.value, py.std.doctest.UnexpectedException): + from doctest import UnexpectedException + if isinstance(excinfo.value, UnexpectedException): return excinfo.value.exc_info[2] else: return excinfo._excinfo[2] @@ -88,7 +93,6 @@ def post_mortem(t): - pdb = py.std.pdb class Pdb(pdb.Pdb): def get_stack(self, f, t): stack, i = pdb.Pdb.get_stack(self, f, t) diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/pytester.py --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -1,15 +1,21 @@ """ (disabled by default) support for testing pytest and pytest plugins. """ - -import py, pytest -import sys, os +import inspect +import sys +import os import codecs import re import time +import platform from fnmatch import fnmatch -from _pytest.main import Session, EXIT_OK +import subprocess + +import py +import pytest from py.builtin import print_ from _pytest.core import HookRelay +from _pytest.main import Session, EXIT_OK + def get_public_names(l): """Only return names from iterator l without a leading underscore.""" @@ -87,10 +93,10 @@ def _makecallparser(self, method): name = method.__name__ - args, varargs, varkw, default = py.std.inspect.getargspec(method) + args, varargs, varkw, default = inspect.getargspec(method) if not args or args[0] != "self": args.insert(0, 'self') - fspec = py.std.inspect.formatargspec(args, varargs, varkw, default) + fspec = inspect.formatargspec(args, varargs, varkw, default) # we use exec because we want to have early type # errors on wrong input arguments, using # *args/**kwargs delays this and gives errors @@ -122,7 +128,7 @@ __tracebackhide__ = True i = 0 entries = list(entries) - backlocals = py.std.sys._getframe(1).f_locals + backlocals = sys._getframe(1).f_locals while entries: name, check = entries.pop(0) for ind, call in enumerate(self.calls[i:]): @@ -210,7 +216,7 @@ def finalize(self): for p in self._syspathremove: - py.std.sys.path.remove(p) + sys.path.remove(p) if hasattr(self, '_olddir'): self._olddir.chdir() # delete modules that have been loaded from tmpdir @@ -283,7 +289,7 @@ def syspathinsert(self, path=None): if path is None: path = self.tmpdir - py.std.sys.path.insert(0, str(path)) + sys.path.insert(0, str(path)) self._syspathremove.append(str(path)) def mkdir(self, name): @@ -426,9 +432,8 @@ env['PYTHONPATH'] = os.pathsep.join(filter(None, [ str(os.getcwd()), env.get('PYTHONPATH', '')])) kw['env'] = env - #print "env", env - return py.std.subprocess.Popen(cmdargs, - stdout=stdout, stderr=stderr, **kw) + return subprocess.Popen(cmdargs, + stdout=stdout, stderr=stderr, **kw) def run(self, *cmdargs): return self._run(*cmdargs) @@ -474,9 +479,9 @@ def _getpybinargs(self, scriptname): if not self.request.config.getvalue("notoolsonpath"): # XXX we rely on script referring to the correct environment - # we cannot use "(py.std.sys.executable,script)" + # we cannot use "(sys.executable,script)" # because on windows the script is e.g. a py.test.exe - return (py.std.sys.executable, _pytest_fullpath,) # noqa + return (sys.executable, _pytest_fullpath,) # noqa else: pytest.skip("cannot run %r with --no-tools-on-path" % scriptname) @@ -496,7 +501,7 @@ def runpython_c(self, command): command = self._getsysprepend() + command - return self.run(py.std.sys.executable, "-c", command) + return self.run(sys.executable, "-c", command) def runpytest(self, *args): p = py.path.local.make_numbered_dir(prefix="runpytest-", @@ -523,7 +528,7 @@ def spawn(self, cmd, expect_timeout=10.0): pexpect = pytest.importorskip("pexpect", "3.0") - if hasattr(sys, 'pypy_version_info') and '64' in py.std.platform.machine(): + if hasattr(sys, 'pypy_version_info') and '64' in platform.machine(): pytest.skip("pypy-64 bit not supported") if sys.platform == "darwin": pytest.xfail("pexpect does not work reliably on darwin?!") @@ -670,7 +675,7 @@ def fnmatch_lines(self, lines2): def show(arg1, arg2): - py.builtin.print_(arg1, arg2, file=py.std.sys.stderr) + py.builtin.print_(arg1, arg2, file=sys.stderr) lines2 = self._getlines(lines2) lines1 = self.lines[:] nextline = None diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/recwarn.py --- a/_pytest/recwarn.py +++ b/_pytest/recwarn.py @@ -1,7 +1,8 @@ """ recording warnings during test function execution. """ -import py import sys +import warnings + def pytest_funcarg__recwarn(request): """Return a WarningsRecorder instance that provides these methods: @@ -13,7 +14,6 @@ on warning categories. """ if sys.version_info >= (2,7): - import warnings oldfilters = warnings.filters[:] warnings.simplefilter('default') def reset_filters(): @@ -30,26 +30,24 @@ """ assert that calling ``func(*args, **kwargs)`` triggers a DeprecationWarning. """ - warningmodule = py.std.warnings l = [] - oldwarn_explicit = getattr(warningmodule, 'warn_explicit') + oldwarn_explicit = getattr(warnings, 'warn_explicit') def warn_explicit(*args, **kwargs): l.append(args) oldwarn_explicit(*args, **kwargs) - oldwarn = getattr(warningmodule, 'warn') + oldwarn = getattr(warnings, 'warn') def warn(*args, **kwargs): l.append(args) oldwarn(*args, **kwargs) - warningmodule.warn_explicit = warn_explicit - warningmodule.warn = warn + warnings.warn_explicit = warn_explicit + warnings.warn = warn try: ret = func(*args, **kwargs) finally: - warningmodule.warn_explicit = warn_explicit - warningmodule.warn = warn + warnings.warn_explicit = warn_explicit + warnings.warn = warn if not l: - #print warningmodule __tracebackhide__ = True raise AssertionError("%r did not produce DeprecationWarning" %(func,)) return ret @@ -65,7 +63,6 @@ class WarningsRecorder: def __init__(self): - warningmodule = py.std.warnings self.list = [] def showwarning(message, category, filename, lineno, line=0): self.list.append(RecordedWarning( @@ -76,8 +73,8 @@ except TypeError: # < python2.6 self.old_showwarning(message, category, filename, lineno) - self.old_showwarning = warningmodule.showwarning - warningmodule.showwarning = showwarning + self.old_showwarning = warnings.showwarning + warnings.showwarning = showwarning def pop(self, cls=Warning): """ pop the first recorded warning, raise exception if not exists.""" @@ -88,7 +85,6 @@ assert 0, "%r not found in %r" %(cls, self.list) #def resetregistry(self): - # import warnings # warnings.onceregistry.clear() # warnings.__warningregistry__.clear() @@ -96,4 +92,4 @@ self.list[:] = [] def finalize(self): - py.std.warnings.showwarning = self.old_showwarning + warnings.showwarning = self.old_showwarning diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -1,9 +1,10 @@ """ basic collect and runtest protocol implementations """ +import bdb +import sys +from time import time import py import pytest -import sys -from time import time from py._code.code import TerminalRepr def pytest_namespace(): @@ -118,7 +119,7 @@ return call.excinfo and not ( hasattr(report, "wasxfail") or call.excinfo.errisinstance(skip.Exception) or - call.excinfo.errisinstance(py.std.bdb.BdbQuit)) + call.excinfo.errisinstance(bdb.BdbQuit)) def call_runtest_hook(item, when, **kwds): hookname = "pytest_runtest_" + when diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/skipping.py --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -1,7 +1,10 @@ """ support for skip/xfail functions and markers. """ +import os +import sys +import traceback -import py, pytest -import sys +import py +import pytest def pytest_addoption(parser): group = parser.getgroup("general") @@ -79,7 +82,7 @@ msg = [" " * (self.exc[1].offset + 4) + "^",] msg.append("SyntaxError: invalid syntax") else: - msg = py.std.traceback.format_exception_only(*self.exc[:2]) + msg = traceback.format_exception_only(*self.exc[:2]) pytest.fail("Error evaluating %r expression\n" " %s\n" "%s" @@ -87,7 +90,7 @@ pytrace=False) def _getglobals(self): - d = {'os': py.std.os, 'sys': py.std.sys, 'config': self.item.config} + d = {'os': os, 'sys': sys, 'config': self.item.config} func = self.item.obj try: d.update(func.__globals__) diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -5,6 +5,8 @@ import pytest import py import sys +import time + def pytest_addoption(parser): group = parser.getgroup("terminal reporting", "reporting", after="general") @@ -49,7 +51,7 @@ optvalue = config.option.report if optvalue: py.builtin.print_("DEPRECATED: use -r instead of --report option.", - file=py.std.sys.stderr) + file=sys.stderr) if optvalue: for setting in optvalue.split(","): setting = setting.strip() @@ -95,7 +97,7 @@ self.stats = {} self.startdir = self.curdir = py.path.local() if file is None: - file = py.std.sys.stdout + file = sys.stdout self._tw = self.writer = py.io.TerminalWriter(file) if self.config.option.color == 'yes': self._tw.hasmarkup = True @@ -265,7 +267,7 @@ @pytest.mark.trylast def pytest_sessionstart(self, session): - self._sessionstarttime = py.std.time.time() + self._sessionstarttime = time.time() if not self.showheader: return self.write_sep("=", "test session starts", bold=True) @@ -466,7 +468,7 @@ self._tw.line(content) def summary_stats(self): - session_duration = py.std.time.time() - self._sessionstarttime + session_duration = time.time() - self._sessionstarttime keys = ("failed passed skipped deselected " "xfailed xpassed warnings").split() diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/tmpdir.py --- a/_pytest/tmpdir.py +++ b/_pytest/tmpdir.py @@ -1,7 +1,11 @@ """ support for providing temporary directories to test functions. """ -import pytest, py +import re + +import pytest +import py from _pytest.monkeypatch import monkeypatch + class TempdirHandler: def __init__(self, config): self.config = config @@ -63,7 +67,7 @@ path object. """ name = request.node.name - name = py.std.re.sub("[\W]", "_", name) + name = re.sub("[\W]", "_", name) MAXVAL = 30 if len(name) > MAXVAL: name = name[:MAXVAL] diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 _pytest/unittest.py --- a/_pytest/unittest.py +++ b/_pytest/unittest.py @@ -1,27 +1,25 @@ """ discovery and running of std-library "unittest" style tests. """ -import pytest, py +from __future__ import absolute_import +import traceback import sys +import pytest +import py + + # for transfering markers from _pytest.python import transfer_markers -def is_unittest(obj): - """Is obj a subclass of unittest.TestCase?""" - unittest = sys.modules.get('unittest') - if unittest is None: - return # nobody can have derived unittest.TestCase +def pytest_pycollect_makeitem(collector, name, obj): + # has unittest been imported and is obj a subclass of its TestCase? try: - return issubclass(obj, unittest.TestCase) - except KeyboardInterrupt: - raise - except: - return False - - -def pytest_pycollect_makeitem(collector, name, obj): - if is_unittest(obj): - return UnitTestCase(name, parent=collector) + if not issubclass(obj, sys.modules["unittest"].TestCase): + return + except Exception: + return + # yes, so let's collect it + return UnitTestCase(name, parent=collector) class UnitTestCase(pytest.Class): @@ -41,11 +39,12 @@ super(UnitTestCase, self).setup() def collect(self): + from unittest import TestLoader cls = self.obj if not getattr(cls, "__test__", True): return self.session._fixturemanager.parsefactories(self, unittest=True) - loader = py.std.unittest.TestLoader() + loader = TestLoader() module = self.getparent(pytest.Module).obj foundsomething = False for name in loader.getTestCaseNames(self.obj): @@ -90,7 +89,7 @@ except TypeError: try: try: - l = py.std.traceback.format_exception(*rawexcinfo) + l = traceback.format_exception(*rawexcinfo) l.insert(0, "NOTE: Incompatible Exception Representation, " "displaying natively:\n\n") pytest.fail("".join(l), pytrace=False) diff -r fd0377e5a7ecbc1a0b09f7f2389f9f0be2254d90 -r 8007f98027d69dbe530865afa912e5fb2d6fd997 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.6.1.dev1', + version='2.6.1.dev2', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], https://bitbucket.org/hpk42/pytest/commits/eb6f0a6eb8a9/ Changeset: eb6f0a6eb8a9 User: flub Date: 2014-08-02 00:11:25 Summary: Mention change in -v output in changelog Affected #: 1 file diff -r 8007f98027d69dbe530865afa912e5fb2d6fd997 -r eb6f0a6eb8a98771c8b81d2028fc39cec783c52d CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ NEXT ----------------------------------- +- No longer show line numbers in the --verbose output, the output is now + purely the nodeid. The line number is still shown in failure reports. + - fix issue547 capsys/capfd also work when output capturing ("-s") is disabled. - address issue170: allow pytest.mark.xfail(...) to specify expected exceptions via Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Aug 7 10:43:46 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 07 Aug 2014 08:43:46 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20140807084346.412.13198@app10.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/1fe6e5cab490/ Changeset: 1fe6e5cab490 Branch: assertionrewrite-currupted-pyc User: nicoddemus Date: 2014-08-02 23:01:28 Summary: Fixed assertionrewrite._read_pyc to handle corrupted pyc files properly This seems to be the cause for issues #437 and #301. Affected #: 2 files diff -r 9e3ed0aaa45a92b50de88a72224f69ea22b805f0 -r 1fe6e5cab490a6850b7d31c7547e78e7b3d2eef7 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -308,7 +308,10 @@ if (len(data) != 8 or data[:4] != imp.get_magic() or struct.unpack(" strip_bytes + pyc.write(contents[:strip_bytes], mode='wb') + + assert _read_pyc(source, str(pyc)) is None # no error https://bitbucket.org/hpk42/pytest/commits/a07708939a75/ Changeset: a07708939a75 Branch: assertionrewrite-currupted-pyc User: nicoddemus Date: 2014-08-05 01:38:50 Summary: updated CHANGELOG and trace error message as requested in review fixes issue #437 Affected #: 2 files diff -r 1fe6e5cab490a6850b7d31c7547e78e7b3d2eef7 -r a07708939a75cd1c50d7724af1e5933a449a2b32 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ NEXT ----------------------------------- +- fix issue437 where assertion rewriting could cause pytest-xdist slaves + to collect different tests. + - fix issue547 capsys/capfd also work when output capturing ("-s") is disabled. - address issue170: allow pytest.mark.xfail(...) to specify expected exceptions via diff -r 1fe6e5cab490a6850b7d31c7547e78e7b3d2eef7 -r a07708939a75cd1c50d7724af1e5933a449a2b32 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -131,7 +131,7 @@ pyc = os.path.join(cache_dir, cache_name) # Notice that even if we're in a read-only directory, I'm going # to check for a cached pyc. This may not be optimal... - co = _read_pyc(fn_pypath, pyc) + co = _read_pyc(fn_pypath, pyc, state.trace) if co is None: state.trace("rewriting %r" % (fn,)) co = _rewrite_test(state, fn_pypath) @@ -289,11 +289,13 @@ if _write_pyc(state, co, fn, proc_pyc): os.rename(proc_pyc, pyc) -def _read_pyc(source, pyc): +def _read_pyc(source, pyc, trace=None): """Possibly read a pytest pyc containing rewritten code. Return rewritten code if successful or None if not. """ + if trace is None: + trace = lambda x: None try: fp = open(pyc, "rb") except IOError: @@ -302,18 +304,21 @@ try: mtime = int(source.mtime()) data = fp.read(8) - except EnvironmentError: + except EnvironmentError as e: + trace('_read_pyc(%s): EnvironmentError %s' % (source, e)) return None # Check for invalid or out of date pyc file. if (len(data) != 8 or data[:4] != imp.get_magic() or struct.unpack(" strip_bytes + pyc.write(contents[:strip_bytes], mode='wb') + + assert _read_pyc(source, str(pyc)) is None # no error https://bitbucket.org/hpk42/pytest/commits/cc7f185b717e/ Changeset: cc7f185b717e Branch: assertionrewrite-currupted-pyc User: hpk42 Date: 2014-08-07 10:42:34 Summary: close branch Affected #: 0 files Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Aug 7 15:26:21 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 07 Aug 2014 13:26:21 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix issue555: just add "errors" attribute to internal Capture stream. Message-ID: <20140807132621.30773.32522@app11.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/737cf55acf3c/ Changeset: 737cf55acf3c User: hpk42 Date: 2014-08-07 11:05:42 Summary: fix issue555: just add "errors" attribute to internal Capture stream. Affected #: 5 files diff -r 082460583d9567f5f56ff79e9cefdc2db7824697 -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,9 @@ - fix issue437 where assertion rewriting could cause pytest-xdist slaves to collect different tests. Thanks Bruno Oliveira. +- fix issue555: add "errors" attribute to capture-streams to satisfy + some distutils and possibly other code accessing sys.stdout.errors. + - fix issue547 capsys/capfd also work when output capturing ("-s") is disabled. - address issue170: allow pytest.mark.xfail(...) to specify expected exceptions via diff -r 082460583d9567f5f56ff79e9cefdc2db7824697 -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.6.1.dev2' +__version__ = '2.6.1.dev3' diff -r 082460583d9567f5f56ff79e9cefdc2db7824697 -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 _pytest/capture.py --- a/_pytest/capture.py +++ b/_pytest/capture.py @@ -223,6 +223,7 @@ class EncodedFile(object): + errors = "strict" # possibly needed by py3 code (issue555) def __init__(self, buffer, encoding): self.buffer = buffer self.encoding = encoding diff -r 082460583d9567f5f56ff79e9cefdc2db7824697 -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.6.1.dev2', + version='2.6.1.dev3', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -r 082460583d9567f5f56ff79e9cefdc2db7824697 -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 testing/test_capture.py --- a/testing/test_capture.py +++ b/testing/test_capture.py @@ -1012,3 +1012,13 @@ """) assert "atexit" not in result.stderr.str() + +def test_error_attribute_issue555(testdir): + testdir.makepyfile(""" + import sys + def test_capattr(): + assert sys.stdout.errors == "strict" + assert sys.stderr.errors == "strict" + """) + reprec = testdir.inline_run() + reprec.assertoutcome(passed=1) Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Aug 7 23:05:17 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 07 Aug 2014 21:05:17 -0000 Subject: [Pytest-commit] commit/pytest: 3 new changesets Message-ID: <20140807210517.16776.41996@app06.ash-private.bitbucket.org> 3 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/a4f9639702ba/ Changeset: a4f9639702ba User: hpk42 Date: 2014-08-07 21:41:51 Summary: finalize pytest-2.6.1 release, regen docs Affected #: 23 files diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -NEXT +2.6.1 ----------------------------------- - No longer show line numbers in the --verbose output, the output is now diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.6.1.dev3' +__version__ = '2.6.1' diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/announce/release-2.6.1.txt --- /dev/null +++ b/doc/en/announce/release-2.6.1.txt @@ -0,0 +1,59 @@ +pytest-2.6.1: fixes and new xfail feature +=========================================================================== + +pytest is a mature Python testing tool with more than a 1100 tests +against itself, passing on many different interpreters and platforms. +The 2.6.1 release is drop-in compatible to 2.5.2 and actually fixes some +regressions introduced with 2.6.0. It also brings a little feature +to the xfail marker which now recognizes expected exceptions, +see the CHANGELOG below. + +See docs at: + + http://pytest.org + +As usual, you can upgrade from pypi via:: + + pip install -U pytest + +Thanks to all who contributed, among them: + + Floris Bruynooghe + Bruno Oliveira + Nicolas Delaby + +have fun, +holger krekel + +Changes 2.6.1 +================= + +- No longer show line numbers in the --verbose output, the output is now + purely the nodeid. The line number is still shown in failure reports. + Thanks Floris Bruynooghe. + +- fix issue437 where assertion rewriting could cause pytest-xdist slaves + to collect different tests. Thanks Bruno Oliveira. + +- fix issue555: add "errors" attribute to capture-streams to satisfy + some distutils and possibly other code accessing sys.stdout.errors. + +- fix issue547 capsys/capfd also work when output capturing ("-s") is disabled. + +- address issue170: allow pytest.mark.xfail(...) to specify expected exceptions via + an optional "raises=EXC" argument where EXC can be a single exception + or a tuple of exception classes. Thanks David Mohr for the complete + PR. + +- fix integration of pytest with unittest.mock.patch decorator when + it uses the "new" argument. Thanks Nicolas Delaby for test and PR. + +- fix issue with detecting conftest files if the arguments contain + "::" node id specifications (copy pasted from "-v" output) + +- fix issue544 by only removing "@NUM" at the end of "::" separated parts + and if the part has an ".py" extension + +- don't use py.std import helper, rather import things directly. + Thanks Bruno Oliveira. + diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/assert.txt --- a/doc/en/assert.txt +++ b/doc/en/assert.txt @@ -26,7 +26,7 @@ $ py.test test_assert1.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_assert1.py F @@ -132,7 +132,7 @@ $ py.test test_assert2.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_assert2.py F diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/attic_fixtures.txt --- a/doc/en/attic_fixtures.txt +++ /dev/null @@ -1,188 +0,0 @@ - -**Test classes, modules or whole projects can make use of -one or more fixtures**. All required fixture functions will execute -before a test from the specifying context executes. As You can use this -to make tests operate from a pre-initialized directory or with -certain environment variables or with pre-configured global application -settings. - -For example, the Django_ project requires database -initialization to be able to import from and use its model objects. -For that, the `pytest-django`_ plugin provides fixtures which your -project can then easily depend or extend on, simply by referencing the -name of the particular fixture. - -Fixture functions have limited visilibity which depends on where they -are defined. If they are defined on a test class, only its test methods -may use it. A fixture defined in a module can only be used -from that test module. A fixture defined in a conftest.py file -can only be used by the tests below the directory of that file. -Lastly, plugins can define fixtures which are available across all -projects. - - - - - -Python, Java and many other languages support a so called xUnit_ style -for providing a fixed state, `test fixtures`_, for running tests. It -typically involves calling a autouse function ahead and a teardown -function after test execute. In 2005 pytest introduced a scope-specific -model of automatically detecting and calling autouse and teardown -functions on a per-module, class or function basis. The Python unittest -package and nose have subsequently incorporated them. This model -remains supported by pytest as :ref:`classic xunit`. - -One property of xunit fixture functions is that they work implicitely -by preparing global state or setting attributes on TestCase objects. -By contrast, pytest provides :ref:`funcargs` which allow to -dependency-inject application test state into test functions or -methods as function arguments. If your application is sufficiently modular -or if you are creating a new project, we recommend you now rather head over to -:ref:`funcargs` instead because many pytest users agree that using this -paradigm leads to better application and test organisation. - -However, not all programs and frameworks work and can be tested in -a fully modular way. They rather require preparation of global state -like database autouse on which further fixtures like preparing application -specific tables or wrapping tests in transactions can take place. For those -needs, pytest-2.3 now supports new **fixture functions** which come with -a ton of improvements over classic xunit fixture writing. Fixture functions: - -- allow to separate different autouse concerns into multiple modular functions - -- can receive and fully interoperate with :ref:`funcargs `, - -- are called multiple times if its funcargs are parametrized, - -- don't need to be defined directly in your test classes or modules, - they can also be defined in a plugin or :ref:`conftest.py ` files and get called - -- are called on a per-session, per-module, per-class or per-function basis - by means of a simple "scope" declaration. - -- can access the :ref:`request ` object which allows to - introspect and interact with the (scoped) testcontext. - -- can add cleanup functions which will be invoked when the last test - of the fixture test context has finished executing. - -All of these features are now demonstrated by little examples. - - - - - -test modules accessing a global resource -------------------------------------------------------- - -.. note:: - - Relying on `global state is considered bad programming practise `_ but when you work with an application - that relies on it you often have no choice. - -If you want test modules to access a global resource, -you can stick the resource to the module globals in -a per-module autouse function. We use a :ref:`resource factory -<@pytest.fixture>` to create our global resource:: - - # content of conftest.py - import pytest - - class GlobalResource: - def __init__(self): - pass - - @pytest.fixture(scope="session") - def globresource(): - return GlobalResource() - - @pytest.fixture(scope="module") - def setresource(request, globresource): - request.module.globresource = globresource - -Now any test module can access ``globresource`` as a module global:: - - # content of test_glob.py - - def test_1(): - print ("test_1 %s" % globresource) - def test_2(): - print ("test_2 %s" % globresource) - -Let's run this module without output-capturing:: - - $ py.test -qs test_glob.py - FF - ================================= FAILURES ================================= - __________________________________ test_1 __________________________________ - - def test_1(): - > print ("test_1 %s" % globresource) - E NameError: global name 'globresource' is not defined - - test_glob.py:3: NameError - __________________________________ test_2 __________________________________ - - def test_2(): - > print ("test_2 %s" % globresource) - E NameError: global name 'globresource' is not defined - - test_glob.py:5: NameError - 2 failed in 0.01 seconds - -The two tests see the same global ``globresource`` object. - -Parametrizing the global resource -+++++++++++++++++++++++++++++++++++++++++++++++++ - -We extend the previous example and add parametrization to the globresource -factory and also add a finalizer:: - - # content of conftest.py - - import pytest - - class GlobalResource: - def __init__(self, param): - self.param = param - - @pytest.fixture(scope="session", params=[1,2]) - def globresource(request): - g = GlobalResource(request.param) - def fin(): - print "finalizing", g - request.addfinalizer(fin) - return g - - @pytest.fixture(scope="module") - def setresource(request, globresource): - request.module.globresource = globresource - -And then re-run our test module:: - - $ py.test -qs test_glob.py - FF - ================================= FAILURES ================================= - __________________________________ test_1 __________________________________ - - def test_1(): - > print ("test_1 %s" % globresource) - E NameError: global name 'globresource' is not defined - - test_glob.py:3: NameError - __________________________________ test_2 __________________________________ - - def test_2(): - > print ("test_2 %s" % globresource) - E NameError: global name 'globresource' is not defined - - test_glob.py:5: NameError - 2 failed in 0.01 seconds - -We are now running the two tests twice with two different global resource -instances. Note that the tests are ordered such that only -one instance is active at any given time: the finalizer of -the first globresource instance is called before the second -instance is created and sent to the autouse functions. - diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/capture.txt --- a/doc/en/capture.txt +++ b/doc/en/capture.txt @@ -64,7 +64,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py .F @@ -78,7 +78,7 @@ test_module.py:9: AssertionError -------------------------- Captured stdout setup --------------------------- - setting up + setting up ==================== 1 failed, 1 passed in 0.01 seconds ==================== Accessing captured output from a test function diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/doctest.txt --- a/doc/en/doctest.txt +++ b/doc/en/doctest.txt @@ -44,12 +44,12 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items mymodule.py . - ========================= 1 passed in 0.04 seconds ========================= + ========================= 1 passed in 0.06 seconds ========================= It is possible to use fixtures using the ``getfixture`` helper:: diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/markers.txt --- a/doc/en/example/markers.txt +++ b/doc/en/example/markers.txt @@ -31,10 +31,10 @@ $ py.test -v -m webtest =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 3::test_send_http PASSED + test_server.py::test_send_http PASSED =================== 3 tests deselected by "-m 'webtest'" =================== ================== 1 passed, 3 deselected in 0.01 seconds ================== @@ -43,12 +43,12 @@ $ py.test -v -m "not webtest" =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 6::test_something_quick PASSED - test_server.py at 8::test_another PASSED - test_server.py at 11::TestClass::test_method PASSED + test_server.py::test_something_quick PASSED + test_server.py::test_another PASSED + test_server.py::TestClass::test_method PASSED ================= 1 tests deselected by "-m 'not webtest'" ================= ================== 3 passed, 1 deselected in 0.01 seconds ================== @@ -62,10 +62,10 @@ $ py.test -v test_server.py::TestClass::test_method =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 5 items - test_server.py at 11::TestClass::test_method PASSED + test_server.py::TestClass::test_method PASSED ========================= 1 passed in 0.01 seconds ========================= @@ -73,10 +73,10 @@ $ py.test -v test_server.py::TestClass =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 11::TestClass::test_method PASSED + test_server.py::TestClass::test_method PASSED ========================= 1 passed in 0.01 seconds ========================= @@ -84,11 +84,11 @@ $ py.test -v test_server.py::TestClass test_server.py::test_send_http =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 8 items - test_server.py at 11::TestClass::test_method PASSED - test_server.py at 3::test_send_http PASSED + test_server.py::TestClass::test_method PASSED + test_server.py::test_send_http PASSED ========================= 2 passed in 0.01 seconds ========================= @@ -120,10 +120,10 @@ $ py.test -v -k http # running with the above defined example module =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 3::test_send_http PASSED + test_server.py::test_send_http PASSED ====================== 3 tests deselected by '-khttp' ====================== ================== 1 passed, 3 deselected in 0.01 seconds ================== @@ -132,12 +132,12 @@ $ py.test -k "not send_http" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 6::test_something_quick PASSED - test_server.py at 8::test_another PASSED - test_server.py at 11::TestClass::test_method PASSED + test_server.py::test_something_quick PASSED + test_server.py::test_another PASSED + test_server.py::TestClass::test_method PASSED ================= 1 tests deselected by '-knot send_http' ================== ================== 3 passed, 1 deselected in 0.01 seconds ================== @@ -146,11 +146,11 @@ $ py.test -k "http or quick" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 4 items - test_server.py at 3::test_send_http PASSED - test_server.py at 6::test_something_quick PASSED + test_server.py::test_send_http PASSED + test_server.py::test_something_quick PASSED ================= 2 tests deselected by '-khttp or quick' ================== ================== 2 passed, 2 deselected in 0.01 seconds ================== @@ -187,7 +187,7 @@ @pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html - @pytest.mark.xfail(condition, reason=None, run=True): mark the the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. See http://pytest.org/latest/skipping.html + @pytest.mark.xfail(condition, reason=None, run=True, raises=None): mark the the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html @pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see http://pytest.org/latest/parametrize.html for more info and examples. @@ -326,7 +326,7 @@ $ py.test -E stage2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_someenv.py s @@ -337,7 +337,7 @@ $ py.test -E stage1 =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_someenv.py . @@ -351,7 +351,7 @@ @pytest.mark.skipif(condition): skip the given test function if eval(condition) results in a True value. Evaluation happens within the module global context. Example: skipif('sys.platform == "win32"') skips the test if we are on the win32 platform. see http://pytest.org/latest/skipping.html - @pytest.mark.xfail(condition, reason=None, run=True): mark the the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. See http://pytest.org/latest/skipping.html + @pytest.mark.xfail(condition, reason=None, run=True, raises=None): mark the the test function as an expected failure if eval(condition) has a True value. Optionally specify a reason for better reporting and run=False if you don't even want to execute the test function. If only specific exception(s) are expected, you can list them in raises, and if the test fails in other ways, it will be reported as a true failure. See http://pytest.org/latest/skipping.html @pytest.mark.parametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see http://pytest.org/latest/parametrize.html for more info and examples. @@ -455,26 +455,26 @@ $ py.test -rs # this option reports skip reasons =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items - test_plat.py s.s. + test_plat.py sss. ========================= short test summary info ========================== - SKIP [2] /tmp/doc-exec-142/conftest.py:12: cannot run on platform linux2 + SKIP [3] /tmp/doc-exec-238/conftest.py:12: cannot run on platform linux - =================== 2 passed, 2 skipped in 0.01 seconds ==================== + =================== 1 passed, 3 skipped in 0.01 seconds ==================== Note that if you specify a platform via the marker-command line option like this:: $ py.test -m linux2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items - test_plat.py . + test_plat.py s =================== 3 tests deselected by "-m 'linux2'" ==================== - ================== 1 passed, 3 deselected in 0.01 seconds ================== + ================= 1 skipped, 3 deselected in 0.01 seconds ================== then the unmarked-tests will not be run. It is thus a way to restrict the run to the specific tests. @@ -519,7 +519,7 @@ $ py.test -m interface --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items test_module.py FF @@ -540,7 +540,7 @@ $ py.test -m "interface or event" --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items test_module.py FFF @@ -559,4 +559,4 @@ assert 0 E assert 0 ============= 1 tests deselected by "-m 'interface or event'" ============== - ================== 3 failed, 1 deselected in 0.02 seconds ================== + ================== 3 failed, 1 deselected in 0.01 seconds ================== diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/nonpython.txt --- a/doc/en/example/nonpython.txt +++ b/doc/en/example/nonpython.txt @@ -27,7 +27,7 @@ nonpython $ py.test test_simple.yml =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_simple.yml .F @@ -56,11 +56,11 @@ nonpython $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items - test_simple.yml at 1::usecase: ok PASSED - test_simple.yml at 1::usecase: hello FAILED + test_simple.yml::usecase: ok PASSED + test_simple.yml::usecase: hello FAILED ================================= FAILURES ================================= ______________________________ usecase: hello ______________________________ @@ -74,7 +74,7 @@ nonpython $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/parametrize.txt --- a/doc/en/example/parametrize.txt +++ b/doc/en/example/parametrize.txt @@ -106,7 +106,7 @@ $ py.test test_scenarios.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items test_scenarios.py .... @@ -118,7 +118,7 @@ $ py.test --collect-only test_scenarios.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items @@ -182,7 +182,7 @@ $ py.test test_backends.py --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items @@ -197,7 +197,7 @@ ================================= FAILURES ================================= _________________________ test_db_initialized[d2] __________________________ - db = + db = def test_db_initialized(db): # a dummy test @@ -251,9 +251,9 @@ $ py.test -q F.. ================================= FAILURES ================================= - ________________________ TestClass.test_equals[1-2] ________________________ + ________________________ TestClass.test_equals[2-1] ________________________ - self = , a = 1, b = 2 + self = , a = 1, b = 2 def test_equals(self, a, b): > assert a == b @@ -281,10 +281,10 @@ . $ py.test -rs -q multipython.py ssssssssssssssssssssssssssssssssssss......sssssssss......ssssssssssssssssss ========================= short test summary info ========================== + SKIP [21] /home/hpk/p/pytest/doc/en/example/multipython.py:22: 'python2.5' not found + SKIP [21] /home/hpk/p/pytest/doc/en/example/multipython.py:22: 'python2.8' not found SKIP [21] /home/hpk/p/pytest/doc/en/example/multipython.py:22: 'python2.4' not found - SKIP [21] /home/hpk/p/pytest/doc/en/example/multipython.py:22: 'python2.8' not found - SKIP [21] /home/hpk/p/pytest/doc/en/example/multipython.py:22: 'python2.5' not found - 12 passed, 63 skipped in 0.66 seconds + 12 passed, 63 skipped in 0.65 seconds Indirect parametrization of optional implementations/imports -------------------------------------------------------------------- @@ -331,12 +331,12 @@ $ py.test -rs test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-144/conftest.py:10: could not import 'opt2' + SKIP [1] /tmp/doc-exec-240/conftest.py:10: could not import 'opt2' =================== 1 passed, 1 skipped in 0.01 seconds ==================== diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/pythoncollection.txt --- a/doc/en/example/pythoncollection.txt +++ b/doc/en/example/pythoncollection.txt @@ -43,7 +43,7 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items @@ -88,7 +88,7 @@ . $ py.test --collect-only pythoncollection.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 3 items @@ -141,10 +141,8 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 - collected 1 items - - + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 + collected 0 items ============================= in 0.01 seconds ============================= diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/reportingdemo.txt --- a/doc/en/example/reportingdemo.txt +++ b/doc/en/example/reportingdemo.txt @@ -13,7 +13,7 @@ assertion $ py.test failure_demo.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 39 items failure_demo.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF @@ -30,7 +30,7 @@ failure_demo.py:15: AssertionError _________________________ TestFailing.test_simple __________________________ - self = + self = def test_simple(self): def f(): @@ -40,13 +40,13 @@ > assert f() == g() E assert 42 == 43 - E + where 42 = () - E + and 43 = () + E + where 42 = .f at 0x2aec3e47b158>() + E + and 43 = .g at 0x2aec3e47b268>() failure_demo.py:28: AssertionError ____________________ TestFailing.test_simple_multiline _____________________ - self = + self = def test_simple_multiline(self): otherfunc_multi( @@ -66,19 +66,19 @@ failure_demo.py:11: AssertionError ___________________________ TestFailing.test_not ___________________________ - self = + self = def test_not(self): def f(): return 42 > assert not f() E assert not 42 - E + where 42 = () + E + where 42 = .f at 0x2aec3e47e620>() failure_demo.py:38: AssertionError _________________ TestSpecialisedExplanations.test_eq_text _________________ - self = + self = def test_eq_text(self): > assert 'spam' == 'eggs' @@ -89,7 +89,7 @@ failure_demo.py:42: AssertionError _____________ TestSpecialisedExplanations.test_eq_similar_text _____________ - self = + self = def test_eq_similar_text(self): > assert 'foo 1 bar' == 'foo 2 bar' @@ -102,7 +102,7 @@ failure_demo.py:45: AssertionError ____________ TestSpecialisedExplanations.test_eq_multiline_text ____________ - self = + self = def test_eq_multiline_text(self): > assert 'foo\nspam\nbar' == 'foo\neggs\nbar' @@ -115,7 +115,7 @@ failure_demo.py:48: AssertionError ______________ TestSpecialisedExplanations.test_eq_long_text _______________ - self = + self = def test_eq_long_text(self): a = '1'*100 + 'a' + '2'*100 @@ -132,7 +132,7 @@ failure_demo.py:53: AssertionError _________ TestSpecialisedExplanations.test_eq_long_text_multiline __________ - self = + self = def test_eq_long_text_multiline(self): a = '1\n'*100 + 'a' + '2\n'*100 @@ -156,7 +156,7 @@ failure_demo.py:58: AssertionError _________________ TestSpecialisedExplanations.test_eq_list _________________ - self = + self = def test_eq_list(self): > assert [0, 1, 2] == [0, 1, 3] @@ -166,7 +166,7 @@ failure_demo.py:61: AssertionError ______________ TestSpecialisedExplanations.test_eq_list_long _______________ - self = + self = def test_eq_list_long(self): a = [0]*100 + [1] + [3]*100 @@ -178,7 +178,7 @@ failure_demo.py:66: AssertionError _________________ TestSpecialisedExplanations.test_eq_dict _________________ - self = + self = def test_eq_dict(self): > assert {'a': 0, 'b': 1, 'c': 0} == {'a': 0, 'b': 2, 'd': 0} @@ -194,7 +194,7 @@ failure_demo.py:69: AssertionError _________________ TestSpecialisedExplanations.test_eq_set __________________ - self = + self = def test_eq_set(self): > assert set([0, 10, 11, 12]) == set([0, 20, 21]) @@ -210,7 +210,7 @@ failure_demo.py:72: AssertionError _____________ TestSpecialisedExplanations.test_eq_longer_list ______________ - self = + self = def test_eq_longer_list(self): > assert [1,2] == [1,2,3] @@ -220,7 +220,7 @@ failure_demo.py:75: AssertionError _________________ TestSpecialisedExplanations.test_in_list _________________ - self = + self = def test_in_list(self): > assert 1 in [0, 2, 3, 4, 5] @@ -229,7 +229,7 @@ failure_demo.py:78: AssertionError __________ TestSpecialisedExplanations.test_not_in_text_multiline __________ - self = + self = def test_not_in_text_multiline(self): text = 'some multiline\ntext\nwhich\nincludes foo\nand a\ntail' @@ -247,7 +247,7 @@ failure_demo.py:82: AssertionError ___________ TestSpecialisedExplanations.test_not_in_text_single ____________ - self = + self = def test_not_in_text_single(self): text = 'single foo line' @@ -260,7 +260,7 @@ failure_demo.py:86: AssertionError _________ TestSpecialisedExplanations.test_not_in_text_single_long _________ - self = + self = def test_not_in_text_single_long(self): text = 'head ' * 50 + 'foo ' + 'tail ' * 20 @@ -273,7 +273,7 @@ failure_demo.py:90: AssertionError ______ TestSpecialisedExplanations.test_not_in_text_single_long_term _______ - self = + self = def test_not_in_text_single_long_term(self): text = 'head ' * 50 + 'f'*70 + 'tail ' * 20 @@ -292,7 +292,7 @@ i = Foo() > assert i.b == 2 E assert 1 == 2 - E + where 1 = .b + E + where 1 = .Foo object at 0x2aec3e519c18>.b failure_demo.py:101: AssertionError _________________________ test_attribute_instance __________________________ @@ -302,8 +302,8 @@ b = 1 > assert Foo().b == 2 E assert 1 == 2 - E + where 1 = .b - E + where = () + E + where 1 = .Foo object at 0x2aec3e52d898>.b + E + where .Foo object at 0x2aec3e52d898> = .Foo'>() failure_demo.py:107: AssertionError __________________________ test_attribute_failure __________________________ @@ -319,7 +319,7 @@ failure_demo.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - self = + self = .Foo object at 0x2aec3e4e0b38> def _get_b(self): > raise Exception('Failed to get attrib') @@ -335,15 +335,15 @@ b = 2 > assert Foo().b == Bar().b E assert 1 == 2 - E + where 1 = .b - E + where = () - E + and 2 = .b - E + where = () + E + where 1 = .Foo object at 0x2aec3e4a5748>.b + E + where .Foo object at 0x2aec3e4a5748> = .Foo'>() + E + and 2 = .Bar object at 0x2aec3e4a51d0>.b + E + where .Bar object at 0x2aec3e4a51d0> = .Bar'>() failure_demo.py:124: AssertionError __________________________ TestRaises.test_raises __________________________ - self = + self = def test_raises(self): s = 'qwe' @@ -355,10 +355,10 @@ > int(s) E ValueError: invalid literal for int() with base 10: 'qwe' - <0-codegen /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:1028>:1: ValueError + <0-codegen /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1028>:1: ValueError ______________________ TestRaises.test_raises_doesnt _______________________ - self = + self = def test_raises_doesnt(self): > raises(IOError, "int('3')") @@ -367,7 +367,7 @@ failure_demo.py:136: Failed __________________________ TestRaises.test_raise ___________________________ - self = + self = def test_raise(self): > raise ValueError("demo error") @@ -376,7 +376,7 @@ failure_demo.py:139: ValueError ________________________ TestRaises.test_tupleerror ________________________ - self = + self = def test_tupleerror(self): > a,b = [1] @@ -385,7 +385,7 @@ failure_demo.py:142: ValueError ______ TestRaises.test_reinterpret_fails_with_print_for_the_fun_of_it ______ - self = + self = def test_reinterpret_fails_with_print_for_the_fun_of_it(self): l = [1,2,3] @@ -398,11 +398,11 @@ l is [1, 2, 3] ________________________ TestRaises.test_some_error ________________________ - self = + self = def test_some_error(self): > if namenotexi: - E NameError: global name 'namenotexi' is not defined + E NameError: name 'namenotexi' is not defined failure_demo.py:150: NameError ____________________ test_dynamic_compile_shows_nicely _____________________ @@ -426,7 +426,7 @@ <2-codegen 'abc-123' /home/hpk/p/pytest/doc/en/example/assertion/failure_demo.py:162>:2: AssertionError ____________________ TestMoreErrors.test_complex_error _____________________ - self = + self = def test_complex_error(self): def f(): @@ -450,7 +450,7 @@ failure_demo.py:5: AssertionError ___________________ TestMoreErrors.test_z1_unpack_error ____________________ - self = + self = def test_z1_unpack_error(self): l = [] @@ -460,7 +460,7 @@ failure_demo.py:179: ValueError ____________________ TestMoreErrors.test_z2_type_error _____________________ - self = + self = def test_z2_type_error(self): l = 3 @@ -470,19 +470,19 @@ failure_demo.py:183: TypeError ______________________ TestMoreErrors.test_startswith ______________________ - self = + self = def test_startswith(self): s = "123" g = "456" > assert s.startswith(g) - E assert ('456') - E + where = '123'.startswith + E assert ('456') + E + where = '123'.startswith failure_demo.py:188: AssertionError __________________ TestMoreErrors.test_startswith_nested ___________________ - self = + self = def test_startswith_nested(self): def f(): @@ -490,15 +490,15 @@ def g(): return "456" > assert f().startswith(g()) - E assert ('456') - E + where = '123'.startswith - E + where '123' = () - E + and '456' = () + E assert ('456') + E + where = '123'.startswith + E + where '123' = .f at 0x2aec3e5572f0>() + E + and '456' = .g at 0x2aec3e557268>() failure_demo.py:195: AssertionError _____________________ TestMoreErrors.test_global_func ______________________ - self = + self = def test_global_func(self): > assert isinstance(globf(42), float) @@ -508,18 +508,18 @@ failure_demo.py:198: AssertionError _______________________ TestMoreErrors.test_instance _______________________ - self = + self = def test_instance(self): self.x = 6*7 > assert self.x != 42 E assert 42 != 42 - E + where 42 = .x + E + where 42 = .x failure_demo.py:202: AssertionError _______________________ TestMoreErrors.test_compare ________________________ - self = + self = def test_compare(self): > assert globf(10) < 5 @@ -529,7 +529,7 @@ failure_demo.py:205: AssertionError _____________________ TestMoreErrors.test_try_finally ______________________ - self = + self = def test_try_finally(self): x = 1 @@ -538,4 +538,4 @@ E assert 1 == 0 failure_demo.py:210: AssertionError - ======================== 39 failed in 0.21 seconds ========================= + ======================== 39 failed in 0.22 seconds ========================= diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/simple.txt --- a/doc/en/example/simple.txt +++ b/doc/en/example/simple.txt @@ -108,7 +108,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 0 items ============================= in 0.00 seconds ============================= @@ -152,12 +152,12 @@ $ py.test -rs # "-rs" means report details on the little 's' =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-147/conftest.py:9: need --runslow option to run + SKIP [1] /tmp/doc-exec-243/conftest.py:9: need --runslow option to run =================== 1 passed, 1 skipped in 0.01 seconds ==================== @@ -165,7 +165,7 @@ $ py.test --runslow =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py .. @@ -256,7 +256,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 project deps: mylib-1.1 collected 0 items @@ -279,7 +279,7 @@ $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 info1: did you know that ... did you? collecting ... collected 0 items @@ -290,7 +290,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 0 items ============================= in 0.00 seconds ============================= @@ -322,7 +322,7 @@ $ py.test --durations=3 =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 3 items test_some_are_slow.py ... @@ -383,7 +383,7 @@ $ py.test -rx =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 4 items test_step.py .Fx. @@ -391,7 +391,7 @@ ================================= FAILURES ================================= ____________________ TestUserHandling.test_modification ____________________ - self = + self = def test_modification(self): > assert 0 @@ -453,7 +453,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 7 items test_step.py .Fx. @@ -463,17 +463,17 @@ ================================== ERRORS ================================== _______________________ ERROR at setup of test_root ________________________ - file /tmp/doc-exec-147/b/test_error.py, line 1 + file /tmp/doc-exec-243/b/test_error.py, line 1 def test_root(db): # no db here, will error out fixture 'db' not found - available fixtures: tmpdir, monkeypatch, pytestconfig, recwarn, capsys, capfd + available fixtures: tmpdir, monkeypatch, capsys, capfd, pytestconfig, recwarn use 'py.test --fixtures [testpath]' for help on them. - /tmp/doc-exec-147/b/test_error.py:1 + /tmp/doc-exec-243/b/test_error.py:1 ================================= FAILURES ================================= ____________________ TestUserHandling.test_modification ____________________ - self = + self = def test_modification(self): > assert 0 @@ -482,20 +482,20 @@ test_step.py:9: AssertionError _________________________________ test_a1 __________________________________ - db = + db = def test_a1(db): > assert 0, db # to show value - E AssertionError: + E AssertionError: a/test_db.py:2: AssertionError _________________________________ test_a2 __________________________________ - db = + db = def test_a2(db): > assert 0, db # to show value - E AssertionError: + E AssertionError: a/test_db2.py:2: AssertionError ========== 3 failed, 2 passed, 1 xfailed, 1 error in 0.03 seconds ========== @@ -553,7 +553,7 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py FF @@ -561,7 +561,7 @@ ================================= FAILURES ================================= ________________________________ test_fail1 ________________________________ - tmpdir = local('/tmp/pytest-28/test_fail10') + tmpdir = local('/tmp/pytest-509/test_fail10') def test_fail1(tmpdir): > assert 0 @@ -575,12 +575,12 @@ E assert 0 test_module.py:4: AssertionError - ========================= 2 failed in 0.01 seconds ========================= + ========================= 2 failed in 0.02 seconds ========================= you will have a "failures" file which contains the failing test ids:: $ cat failures - test_module.py::test_fail1 (/tmp/pytest-28/test_fail10) + test_module.py::test_fail1 (/tmp/pytest-509/test_fail10) test_module.py::test_fail2 Making test result information available in fixtures @@ -642,41 +642,29 @@ and run it:: $ py.test -s test_module.py - =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 - collected 3 items + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 513, in getconftestmodules + return self._path2confmods[path] + KeyError: local('/tmp/doc-exec-243/test_module.py') - test_module.py Esetting up a test failed! test_module.py::test_setup_fails - Fexecuting test failed test_module.py::test_call_fails - F + During handling of the above exception, another exception occurred: + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 537, in importconftest + return self._conftestpath2mod[conftestpath] + KeyError: local('/tmp/doc-exec-243/conftest.py') - ================================== ERRORS ================================== - ____________________ ERROR at setup of test_setup_fails ____________________ + During handling of the above exception, another exception occurred: + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 543, in importconftest + mod = conftestpath.pyimport() + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/py/_path/local.py", line 620, in pyimport + __import__(modname) + File "/tmp/doc-exec-243/conftest.py", line 22 + print "setting up a test failed!", request.node.nodeid + ^ + SyntaxError: invalid syntax + ERROR: could not load /tmp/doc-exec-243/conftest.py - @pytest.fixture - def other(): - > assert 0 - E assert 0 - - test_module.py:6: AssertionError - ================================= FAILURES ================================= - _____________________________ test_call_fails ______________________________ - - something = None - - def test_call_fails(something): - > assert 0 - E assert 0 - - test_module.py:12: AssertionError - ________________________________ test_fail2 ________________________________ - - def test_fail2(): - > assert 0 - E assert 0 - - test_module.py:15: AssertionError - ==================== 2 failed, 1 error in 0.01 seconds ===================== You'll see that the fixture finalizers could use the precise reporting information. @@ -736,4 +724,5 @@ This makes it convenient to execute your tests from within your frozen application, using standard ``py.test`` command-line:: - $ ./app_main --pytest --verbose --tb=long --junit-xml=results.xml test-suite/ \ No newline at end of file + $ ./app_main --pytest --verbose --tb=long --junit-xml=results.xml test-suite/ /bin/sh: 1: ./app_main: not found + /bin/sh: 1: ./app_main: not found diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/special.txt --- a/doc/en/example/special.txt +++ b/doc/en/example/special.txt @@ -60,13 +60,26 @@ If you run this without output capturing:: $ py.test -q -s test_module.py - callattr_ahead_of_alltests called - callme called! - callme other called - SomeTest callme called - test_method1 called - .test_method1 called - .test other - .test_unit1 method called - . - 4 passed in 0.03 seconds + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 513, in getconftestmodules + return self._path2confmods[path] + KeyError: local('/tmp/doc-exec-244/test_module.py') + + During handling of the above exception, another exception occurred: + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 537, in importconftest + return self._conftestpath2mod[conftestpath] + KeyError: local('/tmp/doc-exec-244/conftest.py') + + During handling of the above exception, another exception occurred: + Traceback (most recent call last): + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/config.py", line 543, in importconftest + mod = conftestpath.pyimport() + File "/home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/py/_path/local.py", line 620, in pyimport + __import__(modname) + File "/tmp/doc-exec-244/conftest.py", line 6 + print "callattr_ahead_of_alltests called" + ^ + SyntaxError: invalid syntax + ERROR: could not load /tmp/doc-exec-244/conftest.py + diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/example/xfail_demo.py --- a/doc/en/example/xfail_demo.py +++ b/doc/en/example/xfail_demo.py @@ -25,6 +25,6 @@ pytest.xfail("reason") @xfail(raises=IndexError) -def test_hello7() +def test_hello7(): x = [] x[1] = 1 diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -76,7 +76,7 @@ $ py.test test_smtpsimple.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_smtpsimple.py F @@ -84,17 +84,16 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - assert "merlinux" in msg - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in msg + E TypeError: Type str doesn't support the buffer API - test_smtpsimple.py:12: AssertionError - ========================= 1 failed in 0.15 seconds ========================= + test_smtpsimple.py:11: TypeError + ========================= 1 failed in 0.18 seconds ========================= In the failure traceback we see that the test function was called with a ``smtp`` argument, the ``smtplib.SMTP()`` instance created by the fixture @@ -194,7 +193,7 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py FF @@ -202,19 +201,18 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - assert "merlinux" in response[1] - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in response[1] + E TypeError: Type str doesn't support the buffer API - test_module.py:6: AssertionError + test_module.py:5: TypeError ________________________________ test_noop _________________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -223,7 +221,7 @@ E assert 0 test_module.py:11: AssertionError - ========================= 2 failed in 0.16 seconds ========================= + ========================= 2 failed in 0.18 seconds ========================= You see the two ``assert 0`` failing and more importantly you can also see that the same (module-scoped) ``smtp`` object was passed into the two @@ -271,7 +269,7 @@ $ py.test -s -q --tb=no FFteardown smtp - 2 failed in 0.16 seconds + 2 failed in 0.22 seconds We see that the ``smtp`` instance is finalized after the two tests finished execution. Note that if we decorated our fixture @@ -312,7 +310,7 @@ $ py.test -s -q --tb=no FF - 2 failed in 0.17 seconds + 2 failed in 0.19 seconds Let's quickly create another test module that actually sets the server URL in its module namespace:: @@ -332,7 +330,7 @@ ______________________________ test_showhelo _______________________________ test_anothersmtp.py:5: in test_showhelo assert 0, smtp.helo() - E AssertionError: (250, 'mail.python.org') + E AssertionError: (250, b'mail.python.org') voila! The ``smtp`` fixture function picked up our mail server name from the module namespace. @@ -379,19 +377,18 @@ ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - assert "merlinux" in response[1] - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in response[1] + E TypeError: Type str doesn't support the buffer API - test_module.py:6: AssertionError + test_module.py:5: TypeError __________________________ test_noop[merlinux.eu] __________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -402,20 +399,20 @@ test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] - E assert 'merlinux' in 'mail.python.org\nSIZE 25600000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' + E TypeError: Type str doesn't support the buffer API - test_module.py:5: AssertionError + test_module.py:5: TypeError -------------------------- Captured stdout setup --------------------------- - finalizing + finalizing ________________________ test_noop[mail.python.org] ________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -424,7 +421,7 @@ E assert 0 test_module.py:11: AssertionError - 4 failed in 5.62 seconds + 4 failed in 6.25 seconds We see that our two test functions each ran twice, against the different ``smtp`` instances. Note also, that with the ``mail.python.org`` @@ -464,13 +461,13 @@ $ py.test -v test_appsetup.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items - test_appsetup.py at 12::test_smtp_exists[merlinux.eu] PASSED - test_appsetup.py at 12::test_smtp_exists[mail.python.org] PASSED + test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED + test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - ========================= 2 passed in 6.27 seconds ========================= + ========================= 2 passed in 5.90 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two different ``App`` instances and respective smtp servers. There is no @@ -528,29 +525,20 @@ $ py.test -v -s test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 -- /home/hpk/p/pytest/.tox/regen/bin/python - collecting ... collected 8 items + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + collecting ... collected 0 items / 1 errors - test_module.py at 15::test_0[1] test0 1 - PASSED - test_module.py at 15::test_0[2] test0 2 - PASSED - test_module.py at 17::test_1[mod1] create mod1 - test1 mod1 - PASSED - test_module.py at 19::test_2[1-mod1] test2 1 mod1 - PASSED - test_module.py at 19::test_2[2-mod1] test2 2 mod1 - PASSED - test_module.py at 17::test_1[mod2] create mod2 - test1 mod2 - PASSED - test_module.py at 19::test_2[1-mod2] test2 1 mod2 - PASSED - test_module.py at 19::test_2[2-mod2] test2 2 mod2 - PASSED - - ========================= 8 passed in 0.01 seconds ========================= + ================================== ERRORS ================================== + _____________________ ERROR collecting test_module.py ______________________ + /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:463: in _importtestmodule + mod = self.fspath.pyimport(ensuresyspath=True) + /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/py/_path/local.py:620: in pyimport + __import__(modname) + E File "/tmp/doc-exec-184/test_module.py", line 6 + E print "create", param + E ^ + E SyntaxError: invalid syntax + ========================= 1 error in 0.03 seconds ========================== You can see that the parametrized module-scoped ``modarg`` resource caused an ordering of test execution that lead to the fewest possible "active" resources. The finalizer for the ``mod1`` parametrized resource was executed diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/getting-started.txt --- a/doc/en/getting-started.txt +++ b/doc/en/getting-started.txt @@ -27,7 +27,7 @@ To check your installation has installed the correct version:: $ py.test --version - This is pytest version 2.6.0, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc + This is pytest version 2.6.1, imported from /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/pytest.py If you get an error checkout :ref:`installation issues`. @@ -49,7 +49,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_sample.py F @@ -127,7 +127,7 @@ ================================= FAILURES ================================= ____________________________ TestClass.test_two ____________________________ - self = + self = def test_two(self): x = "hello" @@ -159,21 +159,18 @@ before performing the test function call. Let's just run it:: $ py.test -q test_tmpdir.py - F - ================================= FAILURES ================================= - _____________________________ test_needsfiles ______________________________ - tmpdir = local('/tmp/pytest-24/test_needsfiles0') - - def test_needsfiles(tmpdir): - print tmpdir - > assert 0 - E assert 0 - - test_tmpdir.py:3: AssertionError - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-24/test_needsfiles0 - 1 failed in 0.01 seconds + ================================== ERRORS ================================== + _____________________ ERROR collecting test_tmpdir.py ______________________ + /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:463: in _importtestmodule + mod = self.fspath.pyimport(ensuresyspath=True) + /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/py/_path/local.py:620: in pyimport + __import__(modname) + E File "/tmp/doc-exec-187/test_tmpdir.py", line 2 + E print tmpdir + E ^ + E SyntaxError: invalid syntax + 1 error in 0.03 seconds Before the test runs, a unique-per-test-invocation temporary directory was created. More info at :ref:`tmpdir handling`. diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/parametrize.txt --- a/doc/en/parametrize.txt +++ b/doc/en/parametrize.txt @@ -53,7 +53,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 3 items test_expectation.py ..F @@ -100,7 +100,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 3 items test_expectation.py ..x @@ -170,8 +170,8 @@ def test_valid_string(stringinput): > assert stringinput.isalpha() - E assert () - E + where = '!'.isalpha + E assert () + E + where = '!'.isalpha test_strings.py:3: AssertionError 1 failed in 0.01 seconds @@ -185,7 +185,7 @@ $ py.test -q -rs test_strings.py s ========================= short test summary info ========================== - SKIP [1] /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:1139: got empty parameter set, function test_valid_string at /tmp/doc-exec-100/test_strings.py:1 + SKIP [1] /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1139: got empty parameter set, function test_valid_string at /tmp/doc-exec-195/test_strings.py:1 1 skipped in 0.01 seconds For further examples, you might want to look at :ref:`more diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/skipping.txt --- a/doc/en/skipping.txt +++ b/doc/en/skipping.txt @@ -164,10 +164,10 @@ example $ py.test -rx xfail_demo.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 - collected 6 items + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 + collected 7 items - xfail_demo.py xxxxxx + xfail_demo.py xxxxxxx ========================= short test summary info ========================== XFAIL xfail_demo.py::test_hello XFAIL xfail_demo.py::test_hello2 @@ -180,8 +180,9 @@ condition: pytest.__version__[0] != "17" XFAIL xfail_demo.py::test_hello6 reason: reason + XFAIL xfail_demo.py::test_hello7 - ======================== 6 xfailed in 0.05 seconds ========================= + ======================== 7 xfailed in 0.05 seconds ========================= .. _`skip/xfail with parametrize`: diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/tmpdir.txt --- a/doc/en/tmpdir.txt +++ b/doc/en/tmpdir.txt @@ -29,7 +29,7 @@ $ py.test test_tmpdir.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_tmpdir.py F @@ -37,7 +37,7 @@ ================================= FAILURES ================================= _____________________________ test_create_file _____________________________ - tmpdir = local('/tmp/pytest-25/test_create_file0') + tmpdir = local('/tmp/pytest-506/test_create_file0') def test_create_file(tmpdir): p = tmpdir.mkdir("sub").join("hello.txt") @@ -48,7 +48,7 @@ E assert 0 test_tmpdir.py:7: AssertionError - ========================= 1 failed in 0.01 seconds ========================= + ========================= 1 failed in 0.02 seconds ========================= .. _`base temporary directory`: diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 doc/en/unittest.txt --- a/doc/en/unittest.txt +++ b/doc/en/unittest.txt @@ -88,7 +88,7 @@ $ py.test test_unittest_db.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.6 -- py-1.4.22 -- pytest-2.6.0 + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_unittest_db.py FF @@ -101,7 +101,7 @@ def test_method1(self): assert hasattr(self, "db") > assert 0, self.db # fail for demo purposes - E AssertionError: + E AssertionError: .DummyDB object at 0x2b12849f90b8> test_unittest_db.py:9: AssertionError ___________________________ MyTest.test_method2 ____________________________ @@ -110,10 +110,10 @@ def test_method2(self): > assert 0, self.db # fail for demo purposes - E AssertionError: + E AssertionError: .DummyDB object at 0x2b12849f90b8> test_unittest_db.py:12: AssertionError - ========================= 2 failed in 0.04 seconds ========================= + ========================= 2 failed in 0.05 seconds ========================= This default pytest traceback shows that the two test methods share the same ``self.db`` instance which was our intention @@ -160,7 +160,7 @@ $ py.test -q test_unittest_cleandir.py . - 1 passed in 0.03 seconds + 1 passed in 0.05 seconds ... gives us one passed test because the ``initdir`` fixture function was executed ahead of the ``test_method``. diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.6.1.dev3', + version='2.6.1', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -r 737cf55acf3c5401b44f13239fa3d9e87031d8a3 -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 tox.ini --- a/tox.ini +++ b/tox.ini @@ -99,7 +99,7 @@ commands= py.test -rfsxX --junitxml={envlogdir}/junit-{envname}.xml [] [testenv:regen] -basepython=python +basepython=python3.4 changedir=doc/en deps=sphinx PyYAML https://bitbucket.org/hpk42/pytest/commits/d98b36d9786e/ Changeset: d98b36d9786e User: hpk42 Date: 2014-08-07 22:55:17 Summary: Added tag 2.6.1 for changeset a4f9639702ba Affected #: 1 file diff -r a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 -r d98b36d9786e113f0e047efb1480e05afcb4b14e .hgtags --- a/.hgtags +++ b/.hgtags @@ -69,3 +69,4 @@ 60725b17a9d1af4100abb8be3f9f4ddf6262bf34 2.6.0 60725b17a9d1af4100abb8be3f9f4ddf6262bf34 2.6.0 88af949b9611494e2c65d528f9e565b00fb7e8ca 2.6.0 +a4f9639702baa3eb4f3b16e162f74f7b69f3f9e1 2.6.1 https://bitbucket.org/hpk42/pytest/commits/73f340b8e927/ Changeset: 73f340b8e927 User: hpk42 Date: 2014-08-07 23:05:02 Summary: fix doc config for latex Affected #: 1 file diff -r d98b36d9786e113f0e047efb1480e05afcb4b14e -r 73f340b8e9270e42d1ea43bf119ace3dfabf747f doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -18,7 +18,7 @@ # The full version, including alpha/beta/rc tags. # The short X.Y version. version = "2.6" -release = "2.6.0" +release = "2.6.1" import sys, os @@ -225,7 +225,7 @@ # The name of an image file (relative to this directory) to place at the top of # the title page. -#latex_logo = None +latex_logo = 'img/pytest1.png' # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Thu Aug 7 23:15:48 2014 From: issues-reply at bitbucket.org (Thomas Tanner) Date: Thu, 07 Aug 2014 21:15:48 -0000 Subject: [Pytest-commit] Issue #560: IndexError in source display (hpk42/pytest) Message-ID: <20140807211548.31056.77972@app14.ash-private.bitbucket.org> New issue 560: IndexError in source display https://bitbucket.org/hpk42/pytest/issue/560/indexerror-in-source-display Thomas Tanner: Tested with both version 2.6.0 and 2.6.1. Both fail: $ py.test test.py ===================================================== test session starts ====================================================== platform darwin -- Python 2.7.8 -- py-1.4.22 -- pytest-2.6.1 plugins: bdd, pep8, cache, django, cov, xdist collected 86 items test.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE..................FF..................FF..... INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/main.py", line 84, in wrap_session INTERNALERROR> doit(config, session) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/main.py", line 122, in _main INTERNALERROR> config.hook.pytest_runtestloop(session=session) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 413, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 424, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 315, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/main.py", line 142, in pytest_runtestloop INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 413, in __call__ INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 424, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 315, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/runner.py", line 65, in pytest_runtest_protocol INTERNALERROR> runtestprotocol(item, nextitem=nextitem) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/runner.py", line 75, in runtestprotocol INTERNALERROR> reports.append(call_and_report(item, "call", log)) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/runner.py", line 111, in call_and_report INTERNALERROR> report = hook.pytest_runtest_makereport(item=item, call=call) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/main.py", line 166, in call_matching_hooks INTERNALERROR> return hookmethod.pcall(plugins, **kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 417, in pcall INTERNALERROR> return self._docall(methods, kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 424, in _docall INTERNALERROR> res = mc.execute() INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/core.py", line 315, in execute INTERNALERROR> res = method(**kwargs) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/runner.py", line 214, in pytest_runtest_makereport INTERNALERROR> longrepr = item.repr_failure(excinfo) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/python.py", line 600, in repr_failure INTERNALERROR> return self._repr_failure_py(excinfo, style=style) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/python.py", line 593, in _repr_failure_py INTERNALERROR> style=style) INTERNALERROR> File "/pytest-2.6.1-py2.7.egg/_pytest/main.py", line 411, in _repr_failure_py INTERNALERROR> style=style, tbfilter=tbfilter) INTERNALERROR> File "/py/_code/code.py", line 412, in getrepr INTERNALERROR> return fmt.repr_excinfo(self) INTERNALERROR> File "/py/_code/code.py", line 589, in repr_excinfo INTERNALERROR> reprtraceback = self.repr_traceback(excinfo) INTERNALERROR> File "/py/_code/code.py", line 581, in repr_traceback INTERNALERROR> reprentry = self.repr_traceback_entry(entry, einfo) INTERNALERROR> File "/py/_code/code.py", line 543, in repr_traceback_entry INTERNALERROR> s = self.get_source(source, line_index, excinfo, short=short) INTERNALERROR> File "/py/_code/code.py", line 484, in get_source INTERNALERROR> lines.append(self.flow_marker + " " + source.lines[line_index]) INTERNALERROR> IndexError: list index out of range ======================================== 4 failed, 41 passed, 38 error in 1.11 seconds From commits-noreply at bitbucket.org Fri Aug 8 12:59:44 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 08 Aug 2014 10:59:44 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20140808105944.16146.45565@app05.ash-private.bitbucket.org> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/5f64ef0ca63f/ Changeset: 5f64ef0ca63f Branch: fix_console_encoding User: tkhyn Date: 2014-08-02 06:08:48 Summary: Fixed console encoding issue The issue occured with python 3.3 on windows with dependencies needing to be compiled (e.g. markupsafe) Affected #: 2 files diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r 5f64ef0ca63f363e77d74966bba105d822a2caf3 tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -552,8 +552,6 @@ assert 'install' in l[0].args env = l[0].env assert env is not None - assert 'PYTHONIOENCODING' in env - assert env['PYTHONIOENCODING'] == 'utf_8' def test_run_custom_install_command(newmocksession): mocksession = newmocksession([], """ diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r 5f64ef0ca63f363e77d74966bba105d822a2caf3 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -1,5 +1,6 @@ from __future__ import with_statement import sys, os +import codecs import py import tox from tox._config import DepConfig @@ -276,11 +277,13 @@ del os.environ[x] except KeyError: pass - env = dict(PYTHONIOENCODING='utf_8') - if extraenv is not None: - env.update(extraenv) + old_stdout = sys.stdout + sys.stdout = codecs.getwriter('utf8')(sys.stdout) + if extraenv is None: + extraenv = {} self._pcall(argv, cwd=self.envconfig.config.toxinidir, - extraenv=env, action=action) + extraenv=extraenv, action=action) + sys.stdout = old_stdout def _install(self, deps, extraopts=None, action=None): if not deps: https://bitbucket.org/hpk42/tox/commits/d835cca51418/ Changeset: d835cca51418 User: hpk42 Date: 2014-08-08 12:59:41 Summary: Merged in tkhyn/tox/fix_console_encoding (pull request #115) Fixed console encoding issue Affected #: 2 files diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r d835cca51418210730ba8c9cc88a8829bc7cb05d tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -552,8 +552,6 @@ assert 'install' in l[0].args env = l[0].env assert env is not None - assert 'PYTHONIOENCODING' in env - assert env['PYTHONIOENCODING'] == 'utf_8' def test_run_custom_install_command(newmocksession): mocksession = newmocksession([], """ diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r d835cca51418210730ba8c9cc88a8829bc7cb05d tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -1,5 +1,6 @@ from __future__ import with_statement import sys, os +import codecs import py import tox from tox._config import DepConfig @@ -276,11 +277,13 @@ del os.environ[x] except KeyError: pass - env = dict(PYTHONIOENCODING='utf_8') - if extraenv is not None: - env.update(extraenv) + old_stdout = sys.stdout + sys.stdout = codecs.getwriter('utf8')(sys.stdout) + if extraenv is None: + extraenv = {} self._pcall(argv, cwd=self.envconfig.config.toxinidir, - extraenv=env, action=action) + extraenv=extraenv, action=action) + sys.stdout = old_stdout def _install(self, deps, extraopts=None, action=None): if not deps: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Aug 8 12:59:44 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 08 Aug 2014 10:59:44 -0000 Subject: [Pytest-commit] commit/tox: hpk42: Merged in tkhyn/tox/fix_console_encoding (pull request #115) Message-ID: <20140808105944.23294.62491@app01.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/d835cca51418/ Changeset: d835cca51418 User: hpk42 Date: 2014-08-08 12:59:41 Summary: Merged in tkhyn/tox/fix_console_encoding (pull request #115) Fixed console encoding issue Affected #: 2 files diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r d835cca51418210730ba8c9cc88a8829bc7cb05d tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -552,8 +552,6 @@ assert 'install' in l[0].args env = l[0].env assert env is not None - assert 'PYTHONIOENCODING' in env - assert env['PYTHONIOENCODING'] == 'utf_8' def test_run_custom_install_command(newmocksession): mocksession = newmocksession([], """ diff -r 30fcc85296981a9fc3f5b8782c91817d5a569357 -r d835cca51418210730ba8c9cc88a8829bc7cb05d tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -1,5 +1,6 @@ from __future__ import with_statement import sys, os +import codecs import py import tox from tox._config import DepConfig @@ -276,11 +277,13 @@ del os.environ[x] except KeyError: pass - env = dict(PYTHONIOENCODING='utf_8') - if extraenv is not None: - env.update(extraenv) + old_stdout = sys.stdout + sys.stdout = codecs.getwriter('utf8')(sys.stdout) + if extraenv is None: + extraenv = {} self._pcall(argv, cwd=self.envconfig.config.toxinidir, - extraenv=env, action=action) + extraenv=extraenv, action=action) + sys.stdout = old_stdout def _install(self, deps, extraopts=None, action=None): if not deps: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Fri Aug 8 15:14:10 2014 From: issues-reply at bitbucket.org (Diogo Campos) Date: Fri, 08 Aug 2014 13:14:10 -0000 Subject: [Pytest-commit] Issue #561: SyntaxError in docs (hpk42/pytest) Message-ID: <20140808131410.27451.69901@app10.ash-private.bitbucket.org> New issue 561: SyntaxError in docs https://bitbucket.org/hpk42/pytest/issue/561/syntaxerror-in-docs Diogo Campos: The example for **Automatic grouping of tests by fixture instances** is broken (it was probably written in Python 2) http://pytest.org/latest/fixture.html#automatic-grouping-of-tests-by-fixture-instances From commits-noreply at bitbucket.org Fri Aug 8 15:20:48 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 08 Aug 2014 13:20:48 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix issue561 example adapted to python3. Message-ID: <20140808132048.27451.66619@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/4651a2651cc3/ Changeset: 4651a2651cc3 User: hpk42 Date: 2014-08-08 15:20:37 Summary: fix issue561 example adapted to python3. Affected #: 4 files diff -r 73f340b8e9270e42d1ea43bf119ace3dfabf747f -r 4651a2651cc3a663519e2484fb6d0df4bd8d38a3 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +NEXT +----------- + +- fixed issue561: adapt autouse fixture example for python3. + 2.6.1 ----------------------------------- diff -r 73f340b8e9270e42d1ea43bf119ace3dfabf747f -r 4651a2651cc3a663519e2484fb6d0df4bd8d38a3 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.6.1' +__version__ = '2.6.2.dev1' diff -r 73f340b8e9270e42d1ea43bf119ace3dfabf747f -r 4651a2651cc3a663519e2484fb6d0df4bd8d38a3 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -75,25 +75,26 @@ marked ``smtp`` fixture function. Running the test looks like this:: $ py.test test_smtpsimple.py - =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 + ============================= test session starts ============================== + platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_smtpsimple.py F - ================================= FAILURES ================================= - ________________________________ test_ehlo _________________________________ + =================================== FAILURES =================================== + __________________________________ test_ehlo ___________________________________ - smtp = + smtp = def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - > assert "merlinux" in msg - E TypeError: Type str doesn't support the buffer API + assert "merlinux" in msg + > assert 0 # for demo purposes + E assert 0 - test_smtpsimple.py:11: TypeError - ========================= 1 failed in 0.18 seconds ========================= + test_smtpsimple.py:12: AssertionError + =========================== 1 failed in 0.17 seconds =========================== In the failure traceback we see that the test function was called with a ``smtp`` argument, the ``smtplib.SMTP()`` instance created by the fixture @@ -192,27 +193,28 @@ inspect what is going on and can now run the tests:: $ py.test test_module.py - =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 + ============================= test session starts ============================== + platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 collected 2 items test_module.py FF - ================================= FAILURES ================================= - ________________________________ test_ehlo _________________________________ + =================================== FAILURES =================================== + __________________________________ test_ehlo ___________________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - > assert "merlinux" in response[1] - E TypeError: Type str doesn't support the buffer API + assert "merlinux" in response[1] + > assert 0 # for demo purposes + E assert 0 - test_module.py:5: TypeError - ________________________________ test_noop _________________________________ + test_module.py:6: AssertionError + __________________________________ test_noop ___________________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -221,7 +223,7 @@ E assert 0 test_module.py:11: AssertionError - ========================= 2 failed in 0.18 seconds ========================= + =========================== 2 failed in 0.17 seconds =========================== You see the two ``assert 0`` failing and more importantly you can also see that the same (module-scoped) ``smtp`` object was passed into the two @@ -269,7 +271,7 @@ $ py.test -s -q --tb=no FFteardown smtp - 2 failed in 0.22 seconds + 2 failed in 0.16 seconds We see that the ``smtp`` instance is finalized after the two tests finished execution. Note that if we decorated our fixture @@ -309,8 +311,9 @@ again, nothing much has changed:: $ py.test -s -q --tb=no - FF - 2 failed in 0.19 seconds + FFteardown smtp + + 2 failed in 0.17 seconds Let's quickly create another test module that actually sets the server URL in its module namespace:: @@ -326,11 +329,11 @@ $ py.test -qq --tb=short test_anothersmtp.py F - ================================= FAILURES ================================= - ______________________________ test_showhelo _______________________________ + =================================== FAILURES =================================== + ________________________________ test_showhelo _________________________________ test_anothersmtp.py:5: in test_showhelo assert 0, smtp.helo() - E AssertionError: (250, b'mail.python.org') + E AssertionError: (250, 'hq.merlinux.eu') voila! The ``smtp`` fixture function picked up our mail server name from the module namespace. @@ -374,21 +377,22 @@ $ py.test -q test_module.py FFFF - ================================= FAILURES ================================= - __________________________ test_ehlo[merlinux.eu] __________________________ + =================================== FAILURES =================================== + ____________________________ test_ehlo[merlinux.eu] ____________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - > assert "merlinux" in response[1] - E TypeError: Type str doesn't support the buffer API + assert "merlinux" in response[1] + > assert 0 # for demo purposes + E assert 0 - test_module.py:5: TypeError - __________________________ test_noop[merlinux.eu] __________________________ + test_module.py:6: AssertionError + ____________________________ test_noop[merlinux.eu] ____________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -397,22 +401,22 @@ E assert 0 test_module.py:11: AssertionError - ________________________ test_ehlo[mail.python.org] ________________________ + __________________________ test_ehlo[mail.python.org] __________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] - E TypeError: Type str doesn't support the buffer API + E assert 'merlinux' in 'mail.python.org\nSIZE 25600000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' - test_module.py:5: TypeError - -------------------------- Captured stdout setup --------------------------- - finalizing - ________________________ test_noop[mail.python.org] ________________________ + test_module.py:5: AssertionError + ---------------------------- Captured stdout setup ----------------------------- + finalizing + __________________________ test_noop[mail.python.org] __________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -421,7 +425,7 @@ E assert 0 test_module.py:11: AssertionError - 4 failed in 6.25 seconds + 4 failed in 6.26 seconds We see that our two test functions each ran twice, against the different ``smtp`` instances. Note also, that with the ``mail.python.org`` @@ -460,14 +464,14 @@ ``smtp`` fixture and instantiates an ``App`` object with it. Let's run it:: $ py.test -v test_appsetup.py - =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + ============================= test session starts ============================== + platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/venv/0/bin/python collecting ... collected 2 items test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - ========================= 2 passed in 5.90 seconds ========================= + =========================== 2 passed in 5.46 seconds =========================== Due to the parametrization of ``smtp`` the test will run twice with two different ``App`` instances and respective smtp servers. There is no @@ -505,7 +509,7 @@ @pytest.fixture(scope="module", params=["mod1", "mod2"]) def modarg(request): param = request.param - print "create", param + print ("create", param) def fin(): print ("fin %s" % param) return param @@ -515,30 +519,39 @@ return request.param def test_0(otherarg): - print " test0", otherarg + print (" test0", otherarg) def test_1(modarg): - print " test1", modarg + print (" test1", modarg) def test_2(otherarg, modarg): - print " test2", otherarg, modarg + print (" test2", otherarg, modarg) Let's run the tests in verbose mode and with looking at the print-output:: $ py.test -v -s test_module.py - =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 - collecting ... collected 0 items / 1 errors + ============================= test session starts ============================== + platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/venv/0/bin/python + collecting ... collected 8 items - ================================== ERRORS ================================== - _____________________ ERROR collecting test_module.py ______________________ - /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:463: in _importtestmodule - mod = self.fspath.pyimport(ensuresyspath=True) - /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/py/_path/local.py:620: in pyimport - __import__(modname) - E File "/tmp/doc-exec-184/test_module.py", line 6 - E print "create", param - E ^ - E SyntaxError: invalid syntax - ========================= 1 error in 0.03 seconds ========================== + test_module.py::test_0[1] (' test0', 1) + PASSED + test_module.py::test_0[2] (' test0', 2) + PASSED + test_module.py::test_1[mod1] ('create', 'mod1') + (' test1', 'mod1') + PASSED + test_module.py::test_2[1-mod1] (' test2', 1, 'mod1') + PASSED + test_module.py::test_2[2-mod1] (' test2', 2, 'mod1') + PASSED + test_module.py::test_1[mod2] ('create', 'mod2') + (' test1', 'mod2') + PASSED + test_module.py::test_2[1-mod2] (' test2', 1, 'mod2') + PASSED + test_module.py::test_2[2-mod2] (' test2', 2, 'mod2') + PASSED + + =========================== 8 passed in 0.01 seconds =========================== You can see that the parametrized module-scoped ``modarg`` resource caused an ordering of test execution that lead to the fewest possible "active" resources. The finalizer for the ``mod1`` parametrized resource was executed diff -r 73f340b8e9270e42d1ea43bf119ace3dfabf747f -r 4651a2651cc3a663519e2484fb6d0df4bd8d38a3 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.6.1', + version='2.6.2.dev1', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Aug 8 15:25:24 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 08 Aug 2014 13:25:24 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: actually regen fixture docs with python3.4 instead of python2.7 (doh) Message-ID: <20140808132524.15573.69352@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/f0d4a70ab98a/ Changeset: f0d4a70ab98a User: hpk42 Date: 2014-08-08 15:25:16 Summary: actually regen fixture docs with python3.4 instead of python2.7 (doh) Affected #: 1 file diff -r 4651a2651cc3a663519e2484fb6d0df4bd8d38a3 -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -75,26 +75,25 @@ marked ``smtp`` fixture function. Running the test looks like this:: $ py.test test_smtpsimple.py - ============================= test session starts ============================== - platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.2.dev1 collected 1 items test_smtpsimple.py F - =================================== FAILURES =================================== - __________________________________ test_ehlo ___________________________________ + ================================= FAILURES ================================= + ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - assert "merlinux" in msg - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in msg + E TypeError: Type str doesn't support the buffer API - test_smtpsimple.py:12: AssertionError - =========================== 1 failed in 0.17 seconds =========================== + test_smtpsimple.py:11: TypeError + ========================= 1 failed in 0.18 seconds ========================= In the failure traceback we see that the test function was called with a ``smtp`` argument, the ``smtplib.SMTP()`` instance created by the fixture @@ -193,28 +192,27 @@ inspect what is going on and can now run the tests:: $ py.test test_module.py - ============================= test session starts ============================== - platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.2.dev1 collected 2 items test_module.py FF - =================================== FAILURES =================================== - __________________________________ test_ehlo ___________________________________ + ================================= FAILURES ================================= + ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - assert "merlinux" in response[1] - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in response[1] + E TypeError: Type str doesn't support the buffer API - test_module.py:6: AssertionError - __________________________________ test_noop ___________________________________ + test_module.py:5: TypeError + ________________________________ test_noop _________________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -223,7 +221,7 @@ E assert 0 test_module.py:11: AssertionError - =========================== 2 failed in 0.17 seconds =========================== + ========================= 2 failed in 0.18 seconds ========================= You see the two ``assert 0`` failing and more importantly you can also see that the same (module-scoped) ``smtp`` object was passed into the two @@ -311,8 +309,7 @@ again, nothing much has changed:: $ py.test -s -q --tb=no - FFteardown smtp - + FF 2 failed in 0.17 seconds Let's quickly create another test module that actually sets the @@ -329,11 +326,11 @@ $ py.test -qq --tb=short test_anothersmtp.py F - =================================== FAILURES =================================== - ________________________________ test_showhelo _________________________________ + ================================= FAILURES ================================= + ______________________________ test_showhelo _______________________________ test_anothersmtp.py:5: in test_showhelo assert 0, smtp.helo() - E AssertionError: (250, 'hq.merlinux.eu') + E AssertionError: (250, b'mail.python.org') voila! The ``smtp`` fixture function picked up our mail server name from the module namespace. @@ -377,22 +374,21 @@ $ py.test -q test_module.py FFFF - =================================== FAILURES =================================== - ____________________________ test_ehlo[merlinux.eu] ____________________________ + ================================= FAILURES ================================= + __________________________ test_ehlo[merlinux.eu] __________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 - assert "merlinux" in response[1] - > assert 0 # for demo purposes - E assert 0 + > assert "merlinux" in response[1] + E TypeError: Type str doesn't support the buffer API - test_module.py:6: AssertionError - ____________________________ test_noop[merlinux.eu] ____________________________ + test_module.py:5: TypeError + __________________________ test_noop[merlinux.eu] __________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -401,22 +397,22 @@ E assert 0 test_module.py:11: AssertionError - __________________________ test_ehlo[mail.python.org] __________________________ + ________________________ test_ehlo[mail.python.org] ________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] - E assert 'merlinux' in 'mail.python.org\nSIZE 25600000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN\nSMTPUTF8' + E TypeError: Type str doesn't support the buffer API - test_module.py:5: AssertionError - ---------------------------- Captured stdout setup ----------------------------- - finalizing - __________________________ test_noop[mail.python.org] __________________________ + test_module.py:5: TypeError + -------------------------- Captured stdout setup --------------------------- + finalizing + ________________________ test_noop[mail.python.org] ________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -425,7 +421,7 @@ E assert 0 test_module.py:11: AssertionError - 4 failed in 6.26 seconds + 4 failed in 6.37 seconds We see that our two test functions each ran twice, against the different ``smtp`` instances. Note also, that with the ``mail.python.org`` @@ -464,14 +460,14 @@ ``smtp`` fixture and instantiates an ``App`` object with it. Let's run it:: $ py.test -v test_appsetup.py - ============================= test session starts ============================== - platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/venv/0/bin/python + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.2.dev1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - =========================== 2 passed in 5.46 seconds =========================== + ========================= 2 passed in 6.11 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two different ``App`` instances and respective smtp servers. There is no @@ -528,30 +524,30 @@ Let's run the tests in verbose mode and with looking at the print-output:: $ py.test -v -s test_module.py - ============================= test session starts ============================== - platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 -- /home/hpk/venv/0/bin/python + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.23 -- pytest-2.6.2.dev1 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 8 items - test_module.py::test_0[1] (' test0', 1) + test_module.py::test_0[1] test0 1 PASSED - test_module.py::test_0[2] (' test0', 2) + test_module.py::test_0[2] test0 2 PASSED - test_module.py::test_1[mod1] ('create', 'mod1') - (' test1', 'mod1') + test_module.py::test_1[mod1] create mod1 + test1 mod1 PASSED - test_module.py::test_2[1-mod1] (' test2', 1, 'mod1') + test_module.py::test_2[1-mod1] test2 1 mod1 PASSED - test_module.py::test_2[2-mod1] (' test2', 2, 'mod1') + test_module.py::test_2[2-mod1] test2 2 mod1 PASSED - test_module.py::test_1[mod2] ('create', 'mod2') - (' test1', 'mod2') + test_module.py::test_1[mod2] create mod2 + test1 mod2 PASSED - test_module.py::test_2[1-mod2] (' test2', 1, 'mod2') + test_module.py::test_2[1-mod2] test2 1 mod2 PASSED - test_module.py::test_2[2-mod2] (' test2', 2, 'mod2') + test_module.py::test_2[2-mod2] test2 2 mod2 PASSED - =========================== 8 passed in 0.01 seconds =========================== + ========================= 8 passed in 0.01 seconds ========================= You can see that the parametrized module-scoped ``modarg`` resource caused an ordering of test execution that lead to the fewest possible "active" resources. The finalizer for the ``mod1`` parametrized resource was executed Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Sun Aug 10 23:30:14 2014 From: issues-reply at bitbucket.org (Tom V) Date: Sun, 10 Aug 2014 21:30:14 -0000 Subject: [Pytest-commit] Issue #562: @nose.tools.istest not respected (hpk42/pytest) Message-ID: <20140810213014.3358.11619@app09.ash-private.bitbucket.org> New issue 562: @nose.tools.istest not respected https://bitbucket.org/hpk42/pytest/issue/562/nosetoolsistest-not-respected Tom V: Given the [Supported nose Idioms](http://pytest.org/latest/nose.html#supported-nose-idioms) page says pytest supports: *`__test__` attribute on modules/classes/functions* I assumed the following test would be collected: @nose.tools.istest def toast_stuff(): assert 0 Full script with the final test showing that the attribute `__test__` is successfully set on the `toast_stuff` function import nose.tools def not_nose(): assert 0 @nose.tools.istest def toast_stuff(): assert 0 def test_attributes(): assert not hasattr(not_nose, '__test__') assert toast_stuff.__test__ $ py.test test_nose.py -v === test session starts === platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.1 collected 1 items test_nose.py::test_attributes PASSED === 1 passed in 0.03 seconds === Am I misunderstanding the docs, and test must *also* meet the usual name prefix criteria? That would make the `istest` decorator redundant. From issues-reply at bitbucket.org Tue Aug 12 13:35:00 2014 From: issues-reply at bitbucket.org (Thomas Tanner) Date: Tue, 12 Aug 2014 11:35:00 -0000 Subject: [Pytest-commit] Issue #563: unrelated multiline comments shown in source (hpk42/pytest) Message-ID: <20140812113500.20481.577@app08.ash-private.bitbucket.org> New issue 563: unrelated multiline comments shown in source https://bitbucket.org/hpk42/pytest/issue/563/unrelated-multiline-comments-shown-in Thomas Tanner: Unrelated multiline comments are shown in the source display, while single line comments or strings are correctly hidden. example: ``` #!python def test(): "function comment" assert False """ this should not appear """ ``` ``` #!python platform darwin -- Python 2.7.8 -- py-1.4.23 -- pytest-2.6.1 plugins: bdd, pep8, cache, django, cov, xdist collected 1 items test.py F =========================================================== FAILURES =========================================================== _____________________________________________________________ test _____________________________________________________________ def test(): "function comment" > assert False """ this should not appear E assert False test.py:5: AssertionError ``` From issues-reply at bitbucket.org Wed Aug 13 11:12:58 2014 From: issues-reply at bitbucket.org (Sergey Shepelev) Date: Wed, 13 Aug 2014 09:12:58 -0000 Subject: [Pytest-commit] Issue #564: xdist glitch passing config files from master to slaves (hpk42/pytest) Message-ID: <20140813091258.16762.97810@app02.ash-private.bitbucket.org> New issue 564: xdist glitch passing config files from master to slaves https://bitbucket.org/hpk42/pytest/issue/564/xdist-glitch-passing-config-files-from Sergey Shepelev: Let me speak with code: ``` % ls -lh -rw-r--r-- 1 temoto temoto 33 Aug 13 11:35 conf -rw-r--r-- 1 temoto temoto 25 Aug 13 11:35 test_evil.py -rw-r--r-- 1 temoto temoto 24 Aug 13 11:36 tests.py % cat conf [pytest] python_files = tests.py % cat test_evil.py def test_evil(): pass % cat tests.py def test_good(): pass % ../env/bin/py.test --collect-only -c conf ==================================================================================== test session starts ===================================================================================== platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.0 plugins: xdist, django collected 1 items % ../env/bin/py.test -c conf --verbose ==================================================================================== test session starts ===================================================================================== platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.0 -- /home/temoto/env/bin/python2.7 plugins: xdist, django collected 1 items tests.py at 1::test_good PASSED # So far everything is cool. But xdist does not respect python_files from config. % ../env/bin/py.test -c conf -n2 --verbose ==================================================================================== test session starts ===================================================================================== platform linux2 -- Python 2.7.6 -- py-1.4.23 -- pytest-2.6.0 -- /home/temoto/env/bin/python2.7 plugins: xdist, django [gw0] linux2 Python 2.7.6 cwd: /home/temoto/xdist-bug [gw1] linux2 Python 2.7.6 cwd: /home/temoto/xdist-bug [gw0] Python 2.7.6 (default, Mar 22 2014, 22:59:56) -- [GCC 4.8.2] [gw1] Python 2.7.6 (default, Mar 22 2014, 22:59:56) -- [GCC 4.8.2] gw0 [1] / gw1 [1] scheduling tests via LoadScheduling test_evil.py at 1::test_evil [gw0] PASSED test_evil.py at 1::test_evil ``` From commits-noreply at bitbucket.org Thu Aug 14 22:32:48 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 14 Aug 2014 20:32:48 -0000 Subject: [Pytest-commit] commit/py: 2 new changesets Message-ID: <20140814203248.3114.83934@app02.ash-private.bitbucket.org> 2 new commits in py: https://bitbucket.org/hpk42/py/commits/e5a98a808315/ Changeset: e5a98a808315 User: flub Date: 2014-08-12 00:19:35 Summary: Correct source extraction for else statements If the else statement has more then the else on it the source lines extraction would get it wrong and exclude the else line. This corrects the heuristic to include the else line if it contains other code. This is to fix issue 560 from py.test. Affected #: 3 files diff -r 591f6bfa83c0f26d503a57f60c3275d33a4208f0 -r e5a98a808315979d034a299066f41adbf6ac4052 py/_code/source.py --- a/py/_code/source.py +++ b/py/_code/source.py @@ -377,8 +377,10 @@ end = len(source.lines) while end: line = source.lines[end-1].lstrip() - if (not line or line.startswith("#") or line.startswith("else:") or - line.startswith("finally:")): + if (not line + or line.startswith("#") + or line.replace(" ", "") == "else:" + or line.replace(" ", "") == "finally:"): end -= 1 else: break diff -r 591f6bfa83c0f26d503a57f60c3275d33a4208f0 -r e5a98a808315979d034a299066f41adbf6ac4052 testing/code/test_code.py --- a/testing/code/test_code.py +++ b/testing/code/test_code.py @@ -132,3 +132,28 @@ fr4 = py.code.Frame(f4('a', 'b', c='d')) assert fr4.getargs(var=True) == [('x', 'a'), ('y', ('b',)), ('z', {'c': 'd'})] + + +class TestExceptionInfo: + + def test_bad_getsource(self): + try: + if False: pass + else: assert False + except AssertionError: + exci = py.code.ExceptionInfo() + assert exci.getrepr() + + +class TestTracebackEntry: + + def test_getsource(self): + try: + if False: pass + else: assert False + except AssertionError: + exci = py.code.ExceptionInfo() + entry = exci.traceback[0] + source = entry.getsource() + assert len(source) == 4 + assert 'else: assert False' in source[3] diff -r 591f6bfa83c0f26d503a57f60c3275d33a4208f0 -r e5a98a808315979d034a299066f41adbf6ac4052 testing/code/test_source.py --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -489,6 +489,14 @@ source = getstatement(0, "raise ValueError\n#hello") assert str(source) == "raise ValueError" +def test_single_line_else(): + source = getstatement(1, "if False: 2\nelse: 3") + assert str(source) == "else: 3" + +def test_single_line_finally(): + source = getstatement(1, "try: 1\nfinally: 3") + assert str(source) == "finally: 3" + def XXXtest_multiline(): source = getstatement(0, """\ raise ValueError( https://bitbucket.org/hpk42/py/commits/5b72dc874706/ Changeset: 5b72dc874706 User: flub Date: 2014-08-12 00:44:45 Summary: Mention fix in changelog and bump version Affected #: 2 files diff -r e5a98a808315979d034a299066f41adbf6ac4052 -r 5b72dc87470629b28be486be252b54a4fd3bcf13 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +1.4.24 +================================================== + +- Fix retrieving source when an else: line has an other statement on + the same line. + + 1.4.23 ================================================== diff -r e5a98a808315979d034a299066f41adbf6ac4052 -r 5b72dc87470629b28be486be252b54a4fd3bcf13 setup.py --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.23', + version='1.4.24.dev1', url='http://pylib.readthedocs.org/', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Fri Aug 15 20:49:01 2014 From: issues-reply at bitbucket.org (cel4) Date: Fri, 15 Aug 2014 18:49:01 -0000 Subject: [Pytest-commit] Issue #184: tox fails to install statsmodels due to missing numpy dependency. (hpk42/tox) Message-ID: <20140815184901.23827.27209@app07.ash-private.bitbucket.org> New issue 184: tox fails to install statsmodels due to missing numpy dependency. https://bitbucket.org/hpk42/tox/issue/184/tox-fails-to-install-statsmodels-due-to cel4: The error can be reproduced with this minimal `tox.ini`: ``` [tox] envlist = py27 [testenv] deps = numpy scipy patsy statsmodels commands = bash -c "echo ouch..." ``` Running a dummy `setup.py` with this `tox.ini` will result in a failure while installing the dependencies: ``` File "/tmp/toxtest/.tox/py27/build/statsmodels/setup.py", line 463, in check_dependency_versions(min_versions) File "/tmp/toxtest/.tox/py27/build/statsmodels/setup.py", line 107, in check_dependency_versions raise ImportError("statsmodels requires numpy") ImportError: statsmodels requires numpy ``` Which comes from: https://github.com/statsmodels/statsmodels/blob/master/setup.py#L104-L108 One could expect that this error cannot occur, since numpy should have already been installed when statsmodels' `setup.py` is run. However that does not seem to be the case. It's not clear to me if this problem is caused by tox or a bad `setup.py`. Is there a workaround for this problem? (tested with tox 1.7.1) From commits-noreply at bitbucket.org Tue Aug 19 20:57:03 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 19 Aug 2014 18:57:03 -0000 Subject: [Pytest-commit] commit/pytest: t-8ch: [doc] fix requests monkeypatch example Message-ID: <20140819185703.13162.62938@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/a7e8085f8437/ Changeset: a7e8085f8437 User: t-8ch Date: 2014-08-18 21:44:34 Summary: [doc] fix requests monkeypatch example Affected #: 1 file diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a7e8085f843717871030cabb0906084e18f3bd30 doc/en/monkeypatch.txt --- a/doc/en/monkeypatch.txt +++ b/doc/en/monkeypatch.txt @@ -48,7 +48,7 @@ import pytest @pytest.fixture(autouse=True) def no_requests(monkeypatch): - monkeypatch.delattr("requests.session.Session.request") + monkeypatch.delattr("requests.sessions.Session.request") This autouse fixture will be executed for each test function and it will delete the method ``request.session.Session.request`` Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Aug 19 21:01:11 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 19 Aug 2014 19:01:11 -0000 Subject: [Pytest-commit] commit/pytest: flub: Mention doc fix in changelog Message-ID: <20140819190111.31328.41261@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/d8f5a2a67a5d/ Changeset: d8f5a2a67a5d User: flub Date: 2014-08-19 21:00:46 Summary: Mention doc fix in changelog Affected #: 1 file diff -r a7e8085f843717871030cabb0906084e18f3bd30 -r d8f5a2a67a5d2de6e075e11bc24a308521093dcf CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,8 @@ - fixed issue561: adapt autouse fixture example for python3. +- Fix example in monkeypatch documentation, thanks t-8ch. + 2.6.1 ----------------------------------- Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Wed Aug 20 00:52:49 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 19 Aug 2014 22:52:49 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: plugin organization proposal Message-ID: <20140819225249.20643.94358@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/a71457338b8b/ Changeset: a71457338b8b Branch: contributing-community User: bubenkoff Date: 2014-08-20 00:52:40 Summary: plugin organization proposal Affected #: 1 file diff -r d8f5a2a67a5d2de6e075e11bc24a308521093dcf -r a71457338b8b8147e1aa138a28c7fb1859a9e995 doc/en/plugins.txt --- a/doc/en/plugins.txt +++ b/doc/en/plugins.txt @@ -1,7 +1,7 @@ .. _plugins: Working with plugins and conftest files -============================================= +======================================= ``pytest`` implements all aspects of configuration, collection, running and reporting by calling `well specified hooks`_. Virtually any Python module can be registered as a plugin. It can implement any number of hook functions (usually two or three) which all have a ``pytest_`` prefix, making hook functions easy to distinguish and find. There are three basic location types: @@ -16,7 +16,7 @@ .. _`conftest`: conftest.py: local per-directory plugins --------------------------------------------------------------- +---------------------------------------- local ``conftest.py`` plugins contain directory-specific hook implementations. Session and test running activities will @@ -55,7 +55,7 @@ .. _`extplugins`: Installing External Plugins / Searching ------------------------------------------------------- +--------------------------------------- Installing a plugin happens through any usual Python installation tool, for example:: @@ -119,6 +119,16 @@ .. _`available installable plugins`: .. _`pytest- pypi.python.org search`: http://pypi.python.org/pypi?%3Aaction=search&term=pytest-&submit=search + +External plugin development +--------------------------- + +Pytest community cares about pytest users, in particular, it's important for the community +to keep all pieces of the pytest ecosystem supported. External plugins are important for +pytest users, as they implement many useful, and sometimes critical features which the pytest core does +not implement. + + Writing a plugin by looking at examples ------------------------------------------------------ @@ -138,7 +148,7 @@ .. _`setuptools entry points`: Making your plugin installable by others ------------------------------------------------ +---------------------------------------- If you want to make your plugin externally available, you may define a so-called entry point for your distribution so @@ -169,10 +179,11 @@ ``myproject.pluginmodule`` as a plugin which can define `well specified hooks`_. + .. _`pluginorder`: Plugin discovery order at tool startup --------------------------------------------- +-------------------------------------- ``pytest`` loads plugin modules at tool startup in the following way: @@ -187,8 +198,8 @@ invocation: - if no test paths are specified use current dir as a test path - - if exists, load ``conftest.py`` and ``test*/conftest.py`` relative - to the directory part of the first test path. + - if exists, load ``conftest.py`` and ``test*/conftest.py`` relative + to the directory part of the first test path. Note that pytest does not find ``conftest.py`` files in deeper nested sub directories at tool startup. It is usually a good idea to keep @@ -199,7 +210,7 @@ Requiring/Loading plugins in a test module or conftest file -------------------------------------------------------------- +----------------------------------------------------------- You can require plugins in a test module or a conftest file like this:: @@ -214,7 +225,7 @@ Accessing another plugin by name --------------------------------------------- +-------------------------------- If a plugin wants to collaborate with code from another plugin it can obtain a reference through @@ -230,7 +241,7 @@ .. _`findpluginname`: Finding out which plugins are active ----------------------------------------------------------------------------- +------------------------------------ If you want to find out which plugins are active in your environment you can type:: @@ -244,7 +255,7 @@ .. _`cmdunregister`: Deactivating / unregistering a plugin by name ----------------------------------------------------------------------------- +--------------------------------------------- You can prevent plugins from loading or unregister them:: @@ -257,7 +268,7 @@ .. _`builtin plugins`: pytest default plugin reference -==================================== +=============================== You can find the source code for the following plugins @@ -305,7 +316,7 @@ hook name itself you get an error showing the available arguments. Initialization, command line and configuration hooks --------------------------------------------------------------------- +---------------------------------------------------- .. currentmodule:: _pytest.hookspec @@ -319,7 +330,7 @@ .. autofunction:: pytest_unconfigure Generic "runtest" hooks ------------------------------- +----------------------- All runtest related hooks receive a :py:class:`pytest.Item` object. @@ -339,7 +350,7 @@ the reporting hook to print information about a test run. Collection hooks ------------------------------- +---------------- ``pytest`` calls the following hooks for collecting files and directories: @@ -359,7 +370,7 @@ .. autofunction:: pytest_collection_modifyitems Reporting hooks ------------------------------- +--------------- Session related reporting hooks: @@ -375,7 +386,7 @@ Debugging/Interaction hooks --------------------------------------- +--------------------------- There are few hooks which can be used for special reporting or interaction with exceptions: @@ -385,7 +396,7 @@ .. autofunction:: pytest_exception_interact Reference of objects involved in hooks -=========================================================== +====================================== .. autoclass:: _pytest.config.Config() :members: Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Wed Aug 20 23:20:15 2014 From: issues-reply at bitbucket.org (Anthony Dodd) Date: Wed, 20 Aug 2014 21:20:15 -0000 Subject: [Pytest-commit] Issue #565: autouse fixture and pytest_generate_tests not working together properly (hpk42/pytest) Message-ID: <20140820212015.24303.32628@app05.ash-private.bitbucket.org> New issue 565: autouse fixture and pytest_generate_tests not working together properly https://bitbucket.org/hpk42/pytest/issue/565/autouse-fixture-and-pytest_generate_tests Anthony Dodd: I have a test harness ``class`` which has a ``@pytest.fixture(autouse)`` fixture. Inside of the harness ``class`` I've defined a ``pytest_generate_tests`` method hook which simply generates two tests for any test using a particular fixture. When I execute my test suite, the first test executes properly for each parametrized test, but the second always fails, seemingly due to the ``@pytest.fixture(autouse)`` fixture not being executed. Any thoughts. I can paste some additional code if need be. From issues-reply at bitbucket.org Thu Aug 21 21:35:55 2014 From: issues-reply at bitbucket.org (sontek) Date: Thu, 21 Aug 2014 19:35:55 -0000 Subject: [Pytest-commit] Issue #566: pytest is no longer a universal wheel. (hpk42/pytest) Message-ID: <20140821193555.3819.54962@app06.ash-private.bitbucket.org> New issue 566: pytest is no longer a universal wheel. https://bitbucket.org/hpk42/pytest/issue/566/pytest-is-no-longer-a-universal-wheel sontek: pytest has different dependencies if you are running on Python2.6 vs Python2.7 but in its setup.cfg it is marked as a universal wheel. This makes it so a wheel built on 2.7 will fail to install on 2.6. From issues-reply at bitbucket.org Fri Aug 22 04:21:09 2014 From: issues-reply at bitbucket.org (Jason R. Coombs) Date: Fri, 22 Aug 2014 02:21:09 -0000 Subject: [Pytest-commit] Issue #567: use of 'pytest' in setup.cfg collides with 'pytest' distutils command (hpk42/pytest) Message-ID: <20140822022109.2729.1437@app01.ash-private.bitbucket.org> New issue 567: use of 'pytest' in setup.cfg collides with 'pytest' distutils command https://bitbucket.org/hpk42/pytest/issue/567/use-of-pytest-in-setupcfg-collides-with Jason R. Coombs: In [pytest-runner 2](/jaraco/pytest-runner/issue/2), I adapted pytest-runner to support the 'pytest' distutils command. However, because the pytest project itself uses the ``[pytest]`` section of setup.cfg, that conflicts with the same section for the 'pytest' distutils command. Using the 'pytest' distutils command in a project which specifies, for example, 'norecursedirs', the runner will fail because the pytest-runner distutils command doesn't recognize that parameter (or any other ini options). An example error message is: ``` error: error in setup.cfg: command 'PyTest' has no such option 'norecursedirs' ``` I see a few options here: 1. Just use the 'ptr' command name. 2. Have pytest runner distutils command disregard all unrecognized options. 3. Have pytest runner distutils command implement and ignore all of the options that might be presented in setup.cfg. It would need to do this before pytest is present (because args are processed before dependencies such as pytest are downloaded/imported). 4. Have pytest drop support for setup.cfg. 5. Require that users not use setup.cfg for pytest ini options (only support pytest.ini and tox.ini for pytest options when running under distutils). I suspect there are other options, too. I'm not particularly happy with any of those options, but I'm leaning toward (2). I've filed the ticket here with pytest for two reasons: - I want the implementation to be as acceptable as possible for the pytest project to endorse it as a viable integration mechanism. - I believe the use of the [pytest] section in the setup.cfg by the pytest library is a violation of the [explicit expectation](https://docs.python.org/2/distutils/configfile.html) that those sections are meant for distutils commands. @hpk42 What is your reaction? What would you suggest? From commits-noreply at bitbucket.org Fri Aug 22 20:16:20 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 22 Aug 2014 18:16:20 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20140822181620.25736.22316@app09.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/258e2f56cabf/ Changeset: 258e2f56cabf Branch: fix_universal User: son... at gmail.com Date: 2014-08-21 21:47:53 Summary: Removed marking pytest as universal, py26 and py27 are not compatible. Affected #: 1 file diff -r d8f5a2a67a5d2de6e075e11bc24a308521093dcf -r 258e2f56cabfe2547794a4cbf5b5a193ae6aa224 setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,3 @@ [upload_sphinx] upload-dir = doc/en/build/html - -[wheel] -universal = 1 \ No newline at end of file https://bitbucket.org/hpk42/pytest/commits/87fd7120e6d6/ Changeset: 87fd7120e6d6 User: flub Date: 2014-08-22 20:16:17 Summary: Merged in sontek/pytest/fix_universal (pull request #198) Removed marking pytest as universal, py26 and py27 are not compatible. Affected #: 1 file diff -r d8f5a2a67a5d2de6e075e11bc24a308521093dcf -r 87fd7120e6d6052de01d29d7b9a73f454518a18e setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,3 @@ [upload_sphinx] upload-dir = doc/en/build/html - -[wheel] -universal = 1 \ No newline at end of file Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Aug 22 20:16:21 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 22 Aug 2014 18:16:21 -0000 Subject: [Pytest-commit] commit/pytest: flub: Merged in sontek/pytest/fix_universal (pull request #198) Message-ID: <20140822181621.30766.25917@app07.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/87fd7120e6d6/ Changeset: 87fd7120e6d6 User: flub Date: 2014-08-22 20:16:17 Summary: Merged in sontek/pytest/fix_universal (pull request #198) Removed marking pytest as universal, py26 and py27 are not compatible. Affected #: 1 file diff -r d8f5a2a67a5d2de6e075e11bc24a308521093dcf -r 87fd7120e6d6052de01d29d7b9a73f454518a18e setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,3 @@ [upload_sphinx] upload-dir = doc/en/build/html - -[wheel] -universal = 1 \ No newline at end of file Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Aug 22 20:23:08 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 22 Aug 2014 18:23:08 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20140822182308.19018.1488@app02.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/de6f2467e14e/ Changeset: de6f2467e14e Branch: fix_universal User: flub Date: 2014-08-22 20:19:15 Summary: Close branch Affected #: 0 files https://bitbucket.org/hpk42/pytest/commits/9baf836b29b5/ Changeset: 9baf836b29b5 User: flub Date: 2014-08-22 20:22:51 Summary: Mention why no universal wheel in changelog Fixes issue566. Affected #: 1 file diff -r 87fd7120e6d6052de01d29d7b9a73f454518a18e -r 9baf836b29b58c72ffccc113bca3ac54c883caf8 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,10 @@ - Fix example in monkeypatch documentation, thanks t-8ch. +- Do not mark as universal wheel because Python 2.6 is different from + other builds due to the extra argparse dependency. Fixes issue566. + Thanks sontek. + 2.6.1 ----------------------------------- Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Sat Aug 23 01:41:13 2014 From: issues-reply at bitbucket.org (Markus Unterwaditzer) Date: Fri, 22 Aug 2014 23:41:13 -0000 Subject: [Pytest-commit] Issue #568: skipif marker stains on all related classes (hpk42/pytest) Message-ID: <20140822234113.5271.84727@app07.ash-private.bitbucket.org> New issue 568: skipif marker stains on all related classes https://bitbucket.org/hpk42/pytest/issue/568/skipif-marker-stains-on-all-related Markus Unterwaditzer: Given this class hierarchy: import pytest class Foo(object): def test_lol(self): pass @pytest.mark.skipif(False, reason='BECAUSE') class TestBar(Foo): pass @pytest.mark.skipif(True, reason='BECAUSE') class TestBaz(Foo): pass py.test will skip the single testcase of both TestBar and TestBaz. From issues-reply at bitbucket.org Mon Aug 25 13:22:14 2014 From: issues-reply at bitbucket.org (Ivan Smirnov) Date: Mon, 25 Aug 2014 11:22:14 -0000 Subject: [Pytest-commit] Issue #569: Nicer filenames in terminal reports, custom startdir? (hpk42/pytest) Message-ID: <20140825112214.4537.42618@app08.ash-private.bitbucket.org> New issue 569: Nicer filenames in terminal reports, custom startdir? https://bitbucket.org/hpk42/pytest/issue/569/nicer-filenames-in-terminal-reports-custom Ivan Smirnov: When testing an installed package (e.g. as in the example below via `py.test -v --pyargs foo`), the report looks super ugly containing long paths: ``` envs/py27/lib/python2.7/site-packages/foo/tests/test_foo.py::TestBar::test_baz PASSED envs/py27/lib/python2.7/site-packages/foo/tests/test_bar.py::TestBar::test_baz PASSED ``` It would be sure nice to get something like this: ``` foo/tests/test_foo.py::TestBar::test_baz PASSED foo/tests/test_bar.py::TestBar::test_baz PASSED ``` Or even this: ``` test_foo.py::TestBar::test_baz PASSED test_bar.py::TestBar::test_baz PASSED ``` but it would require setting a starting folder manually somehow. I've noticed this code in `TerminalReporter` but for some reason the relpath part is commented out, so it looks like `startdir` (and the corresponding hook) is unused now? ```python def write_fspath_result(self, fspath, res): if fspath != self.currentfspath: self.currentfspath = fspath #fspath = self.startdir.bestrelpath(fspath) self._tw.line() #relpath = self.startdir.bestrelpath(fspath) self._tw.write(fspath + " ") self._tw.write(res) ``` One idea I've had regarding file paths reporting is that if we know all paths prior to reporting (which we do), the `startdir` could be just set like so ```python startdir = py.path.local(os.path.commonprefix(collected_files)) ``` and this would automatically generate nice terminal logs regardless of where the package is physically located, so no conftest hacking is required. Would it make sense to implement it as an option? Thanks. From issues-reply at bitbucket.org Mon Aug 25 16:15:48 2014 From: issues-reply at bitbucket.org (Ivan Kalinin) Date: Mon, 25 Aug 2014 14:15:48 -0000 Subject: [Pytest-commit] Issue #570: indirect=True in parametrize breaks fixture scopes (hpk42/pytest) Message-ID: <20140825141548.25534.6830@app11.ash-private.bitbucket.org> New issue 570: indirect=True in parametrize breaks fixture scopes https://bitbucket.org/hpk42/pytest/issue/570/indirect-true-in-parametrize-breaks Ivan Kalinin: The following test: ``` #!python import pytest @pytest.fixture(scope='class') def my_profile(request): print 'Setting up profile with param', getattr(request, 'param', 'Nothing') @pytest.mark.parametrize('my_profile', ['pewpew', 'ololo'], indirect=True) class TestClassOne: def test_foo(self, my_profile): pass def test_bar(self, my_profile): pass ``` Outputs this: ``` #!text (pytest)pupssman at dirigible:~$ py.test test_1.py -sv ================================================ test session starts ================================================= platform linux2 -- Python 2.7.4 -- py-1.4.23 -- pytest-2.6.1 -- /home/pupssman/venv/pytest/bin/python plugins: qabs-yadt, allure-adaptor, contextfixture, capturelog, xdist collected 4 items test_1.py::TestClassOne::test_foo[pewpew] Setting up profile with param pewpew PASSED test_1.py::TestClassOne::test_foo[ololo] Setting up profile with param ololo PASSED test_1.py::TestClassOne::test_bar[pewpew] Setting up profile with param pewpew PASSED test_1.py::TestClassOne::test_bar[ololo] Setting up profile with param ololo PASSED ============================================== 4 passed in 0.01 seconds ============================================== ``` Looks like it sets the fixture up for each test method of class independently. However, the declaration of ```scope='class'``` should force py.test to set the fixture up only once for each parameter value for the test class. I.e., the output should be something like that: ``` #!text (pytest)pupssman at dirigible:~$ py.test test_1.py -sv ================================================ test session starts ================================================= platform linux2 -- Python 2.7.4 -- py-1.4.23 -- pytest-2.6.1 -- /home/pupssman/venv/pytest/bin/python plugins: qabs-yadt, allure-adaptor, contextfixture, capturelog, xdist collected 4 items test_1.py::TestClassOne::test_foo[pewpew] Setting up profile with param pewpew PASSED test_1.py::TestClassOne::test_bar[pewpew] PASSED test_1.py::TestClassOne::test_foo[ololo] Setting up profile with param ololo PASSED test_1.py::TestClassOne::test_bar[ololo] PASSED ============================================== 4 passed in 0.01 seconds ============================================== ``` From issues-reply at bitbucket.org Tue Aug 26 13:19:18 2014 From: issues-reply at bitbucket.org (Thomas Grainger) Date: Tue, 26 Aug 2014 11:19:18 -0000 Subject: [Pytest-commit] Issue #185: build wheels instead of sdist (hpk42/tox) Message-ID: <20140826111918.27718.20015@app09.ash-private.bitbucket.org> New issue 185: build wheels instead of sdist https://bitbucket.org/hpk42/tox/issue/185/build-wheels-instead-of-sdist Thomas Grainger: For installation of test packages it would be great if wheels could be used instead. This is difficult to work for all possible python versions but to start with, universal wheels could be supported. In this case the universal wheel could be produced in the first step. Then tox can use the test_requires and install_requires to build the deps used in the testenv. From issues-reply at bitbucket.org Tue Aug 26 22:44:29 2014 From: issues-reply at bitbucket.org (eevee) Date: Tue, 26 Aug 2014 20:44:29 -0000 Subject: [Pytest-commit] Issue #571: pytest_collect_directory is not particularly useful (hpk42/pytest) Message-ID: <20140826204429.18215.98195@app02.ash-private.bitbucket.org> New issue 571: pytest_collect_directory is not particularly useful https://bitbucket.org/hpk42/pytest/issue/571/pytest_collect_directory-is-not eevee: It can't programmatically stop recursing into a directory ? its return value is ignored. (Granted, `pytest_ignore_collect` can do this.) It can't mark the directory as skip ? calling `pytest.skip` will end collection entirely. It can't collect the directory itself as an `Item` ? again, its return value is ignored. I feel some potential has been lost here. :) (I have a bunch of test files for a compiler project, where each file is effectively a single test, and I wanted to group them in the default reporting by the directory that contains them, rather than have each of some hundred test files lists on its own line.) From issues-reply at bitbucket.org Wed Aug 27 03:10:59 2014 From: issues-reply at bitbucket.org (jnuneziglesias) Date: Wed, 27 Aug 2014 01:10:59 -0000 Subject: [Pytest-commit] Issue #572: Syntax error in docs (redux ; ) (hpk42/pytest) Message-ID: <20140827011059.4338.74771@app04.ash-private.bitbucket.org> New issue 572: Syntax error in docs (redux ;) https://bitbucket.org/hpk42/pytest/issue/572/syntax-error-in-docs-redux jnuneziglesias: There is a syntax error [here](http://pytest.org/latest/getting-started.html#going-functional-requesting-a-unique-temporary-directory) due to the switch to Python 3: ![Screen Shot 2014-08-27 at 11.03.03 am.png](https://bitbucket.org/repo/Kd84B/images/357899787-Screen%20Shot%202014-08-27%20at%2011.03.03%20am.png) From commits-noreply at bitbucket.org Wed Aug 27 22:16:44 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 27 Aug 2014 20:16:44 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20140827201644.11815.32479@app14.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/a8cc1d22509d/ Changeset: a8cc1d22509d User: flub Date: 2014-08-18 20:07:38 Summary: Escape newlines in repr for assertion rewriting The assertion formatting mini-language depends on newlines being escaped. Unfortunately if the repr of an object contained newlines the rewriting module did not escape those, which is now fixed. Fixes issue453. Affected #: 3 files diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a8cc1d22509d432d8b9aa137d28263e4924f0fa8 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,9 @@ - fixed issue561: adapt autouse fixture example for python3. +- fixed issue453: assertion rewriting issue with __repr__ containing + "\n{", "\n}" and "\n~". + 2.6.1 ----------------------------------- diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a8cc1d22509d432d8b9aa137d28263e4924f0fa8 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -326,7 +326,15 @@ AssertionRewriter().run(mod) -_saferepr = py.io.saferepr +def _saferepr(obj): + repr = py.io.saferepr(obj) + if py.builtin._istext(repr): + t = py.builtin.text + else: + t = py.builtin.bytes + return repr.replace(t("\n"), t("\\n")) + + from _pytest.assertion.util import format_explanation as _format_explanation # noqa def _should_repr_global_name(obj): diff -r f0d4a70ab98a3f1e82f25531ed7e1c9979c12b13 -r a8cc1d22509d432d8b9aa137d28263e4924f0fa8 testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -313,6 +313,17 @@ assert "%test" == "test" assert getmsg(f).startswith("assert '%test' == 'test'") + def test_custom_repr(self): + def f(): + class Foo(object): + a = 1 + + def __repr__(self): + return "\n{ \n~ \n}" + f = Foo() + assert 0 == f.a + assert r"where 1 = \n{ \n~ \n}.a" in util._format_lines([getmsg(f)])[0] + class TestRewriteOnImport: https://bitbucket.org/hpk42/pytest/commits/dc8df0698bce/ Changeset: dc8df0698bce User: flub Date: 2014-08-19 20:50:25 Summary: Explain why this is important Affected #: 1 file diff -r a8cc1d22509d432d8b9aa137d28263e4924f0fa8 -r dc8df0698bce865c33dbed2cf0351c7c963462c6 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -327,6 +327,13 @@ def _saferepr(obj): + """Get a safe repr of an object for assertion error messages + + The assertion formatting (util.format_explanation()) requires + newlines to be escaped since they are a special character for it. + But py.io.saferepr allows newlines, so we need to escape them + here. + """ repr = py.io.saferepr(obj) if py.builtin._istext(repr): t = py.builtin.text https://bitbucket.org/hpk42/pytest/commits/18dc9d3ba496/ Changeset: 18dc9d3ba496 User: flub Date: 2014-08-23 12:10:16 Summary: Improve the docstring further Affected #: 1 file diff -r dc8df0698bce865c33dbed2cf0351c7c963462c6 -r 18dc9d3ba496f75d636bf88fa8ca5ca175f179ce _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -327,12 +327,15 @@ def _saferepr(obj): - """Get a safe repr of an object for assertion error messages + """Get a safe repr of an object for assertion error messages. The assertion formatting (util.format_explanation()) requires newlines to be escaped since they are a special character for it. - But py.io.saferepr allows newlines, so we need to escape them - here. + Normally assertion.util.format_explanation() does this but for a + custom repr it is possible to contain one of the special escape + sequences, especially '\n{' and '\n}' are likely to be present in + JSON reprs. + """ repr = py.io.saferepr(obj) if py.builtin._istext(repr): https://bitbucket.org/hpk42/pytest/commits/aed87f841a76/ Changeset: aed87f841a76 User: flub Date: 2014-08-27 22:00:24 Summary: Merged in flub/pytest (pull request #196) Affected #: 3 files diff -r 5c5f7ef69bcd8586823b839d0abe88d1d72c1110 -r aed87f841a762133588d09f17f2ceb050d726569 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,9 @@ - fixed issue561: adapt autouse fixture example for python3. +- fixed issue453: assertion rewriting issue with __repr__ containing + "\n{", "\n}" and "\n~". + - Fix example in monkeypatch documentation, thanks t-8ch. - Do not mark as universal wheel because Python 2.6 is different from diff -r 5c5f7ef69bcd8586823b839d0abe88d1d72c1110 -r aed87f841a762133588d09f17f2ceb050d726569 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -326,7 +326,25 @@ AssertionRewriter().run(mod) -_saferepr = py.io.saferepr +def _saferepr(obj): + """Get a safe repr of an object for assertion error messages. + + The assertion formatting (util.format_explanation()) requires + newlines to be escaped since they are a special character for it. + Normally assertion.util.format_explanation() does this but for a + custom repr it is possible to contain one of the special escape + sequences, especially '\n{' and '\n}' are likely to be present in + JSON reprs. + + """ + repr = py.io.saferepr(obj) + if py.builtin._istext(repr): + t = py.builtin.text + else: + t = py.builtin.bytes + return repr.replace(t("\n"), t("\\n")) + + from _pytest.assertion.util import format_explanation as _format_explanation # noqa def _should_repr_global_name(obj): diff -r 5c5f7ef69bcd8586823b839d0abe88d1d72c1110 -r aed87f841a762133588d09f17f2ceb050d726569 testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -313,6 +313,17 @@ assert "%test" == "test" assert getmsg(f).startswith("assert '%test' == 'test'") + def test_custom_repr(self): + def f(): + class Foo(object): + a = 1 + + def __repr__(self): + return "\n{ \n~ \n}" + f = Foo() + assert 0 == f.a + assert r"where 1 = \n{ \n~ \n}.a" in util._format_lines([getmsg(f)])[0] + class TestRewriteOnImport: Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Wed Aug 27 22:37:08 2014 From: issues-reply at bitbucket.org (=?utf-8?q?David_R=C3=B6thlisberger?=) Date: Wed, 27 Aug 2014 20:37:08 -0000 Subject: [Pytest-commit] Issue #573: --boxed raises UnicodeEncodeError when used with --capture=no (hpk42/pytest) Message-ID: <20140827203708.12537.70577@app05.ash-private.bitbucket.org> New issue 573: --boxed raises UnicodeEncodeError when used with --capture=no https://bitbucket.org/hpk42/pytest/issue/573/boxed-raises-unicodeencodeerror-when-used David R?thlisberger: With the following test case in "test.py": ```python # coding: utf-8 def test_unicode(): print u"?nic?de" ``` Running the above test case with `py.test --boxed --capture=no test.py` fails with: ``` ==================================== test session starts ===================================== platform darwin -- Python 2.7.8 -- py-1.4.23 -- pytest-2.6.1 plugins: xdist collected 1 items test.py F ========================================== FAILURES ========================================== ________________________________________ test_unicode ________________________________________ def test_unicode(): > print u"?nic?de" test.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = '?nic?de' def write(self, data): > f.write(data) E UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 0: ordinal not in range(128) /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py/_process/forkedfunc.py:20: UnicodeEncodeError ``` Note that any other combination of --boxed and --capture works ok: ``` ? py.test -v --capture=fd test.py ? py.test -v --capture=fd --boxed test.py ? py.test -v --capture=sys test.py ? py.test -v --capture=sys --boxed test.py ? py.test -v --capture=no test.py x py.test -v --capture=no --boxed test.py ``` Using `-p no:capture` has the same effect as `--capture=no` above. Is using `--boxed` with `--capture=no` a valid combination? (I need to implement my own capturing ?which is working except for this issue? and that is why I need to disable pytest's capture plugin). From commits-noreply at bitbucket.org Wed Aug 27 01:39:35 2014 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 26 Aug 2014 23:39:35 -0000 Subject: [Pytest-commit] commit/pytest: nicoddemus: Updating plugins_index Message-ID: <20140826233935.11925.70310@app08.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/5c5f7ef69bcd/ Changeset: 5c5f7ef69bcd User: nicoddemus Date: 2014-08-27 01:38:19 Summary: Updating plugins_index Also fixed duplicated links when repository is not github or bitbucket Affected #: 2 files diff -r 9baf836b29b58c72ffccc113bca3ac54c883caf8 -r 5c5f7ef69bcd8586823b839d0abe88d1d72c1110 doc/en/plugins_index/index.txt --- a/doc/en/plugins_index/index.txt +++ b/doc/en/plugins_index/index.txt @@ -4,7 +4,7 @@ =========================== The table below contains a listing of plugins found in PyPI and -their status when tested using py.test **2.6.0** and python 2.7 and +their status when tested using py.test **2.6.2.dev1** and python 2.7 and 3.3. A complete listing can also be found at @@ -12,146 +12,154 @@ status against other py.test releases. -========================================================================================== ============================================================================================================ ============================================================================================================ ========================================================================= ============================================================================================================================================= - Name Py27 Py34 Repo Summary -========================================================================================== ============================================================================================================ ============================================================================================================ ========================================================================= ============================================================================================================================================= - `pytest-allure-adaptor-1.3.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py34&pytest=2.6.0 .. image:: github.png Plugin for py.test to generate allure xml reports - :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py34&pytest=2.6.0 :target: https://github.com/allure-framework/allure-python - `pytest-bdd-2.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py34&pytest=2.6.0 .. image:: github.png BDD for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py34&pytest=2.6.0 :target: https://github.com/olegpidsadnyi/pytest-bdd - `pytest-beds-0.0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py34&pytest=2.6.0 .. image:: github.png Fixtures for testing Google Appengine (GAE) apps - :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py34&pytest=2.6.0 :target: https://github.com/kaste/pytest-beds - `pytest-bench-0.2.5 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py34&pytest=2.6.0 .. image:: github.png Benchmark utility that plugs into pytest. - :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py34&pytest=2.6.0 :target: http://github.com/concordusapps/pytest-bench - `pytest-blockage-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py34&pytest=2.6.0 .. image:: github.png Disable network requests during a test run. - :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py34&pytest=2.6.0 :target: https://github.com/rob-b/pytest-blockage - `pytest-browsermob-proxy-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.0 .. image:: github.png BrowserMob proxy plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.0 :target: https://github.com/davehunt/pytest-browsermob-proxy - `pytest-bugzilla-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test bugzilla integration plugin - :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py34&pytest=2.6.0 :target: http://github.com/nibrahim/pytest_bugzilla - `pytest-cache-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin with mechanisms for caching across test runs - :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hpk42/pytest-cache/ - `pytest-capturelog-0.7 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test plugin to capture log messages - :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/memedough/pytest-capturelog/overview - `pytest-codecheckers-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin to add source code sanity checks (pep8 and friends) - :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/ - `pytest-config-0.0.10 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py34&pytest=2.6.0 .. image:: github.png Base configurations and utilities for developing your Python project test suite with pytest. - :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py34&pytest=2.6.0 :target: https://github.com/buzzfeed/pytest_config - `pytest-contextfixture-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py34&pytest=2.6.0 .. image:: github.png Define pytest fixtures as context managers. - :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py34&pytest=2.6.0 :target: http://github.com/pelme/pytest-contextfixture/ - `pytest-couchdbkit-0.5.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test extension for per-test couchdb databases using couchdbkit - :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-couchdbkit - `pytest-cov-1.7.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py34&pytest=2.6.0 :target: https://github.com/schlamar/pytest-cov - `pytest-dbfixtures-0.4.20 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py34&pytest=2.6.0 .. image:: github.png Databases fixtures plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py34&pytest=2.6.0 :target: https://github.com/ClearcodeHQ/pytest-dbfixtures - `pytest-dbus-notification-1.0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py34&pytest=2.6.0 .. image:: github.png D-BUS notifications for pytest results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py34&pytest=2.6.0 :target: https://github.com/bmathieu33/pytest-dbus-notification - `pytest-diffeo-0.1.7 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py34&pytest=2.6.0 .. image:: github.png Common py.test support for Diffeo packages - :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py34&pytest=2.6.0 :target: https://github.com/diffeo/pytest-diffeo - `pytest-django-2.6.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py34&pytest=2.6.0 `link `_ A Django plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py34&pytest=2.6.0 - `pytest-django-haystack-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py34&pytest=2.6.0 .. image:: github.png Cleanup your Haystack indexes between tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py34&pytest=2.6.0 :target: http://github.com/rouge8/pytest-django-haystack - `pytest-django-lite-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py34&pytest=2.6.0 .. image:: github.png The bare minimum to integrate py.test with Django. - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py34&pytest=2.6.0 :target: https://github.com/dcramer/pytest-django-lite - `pytest-eradicate-0.0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to check for commented out code - :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py34&pytest=2.6.0 :target: https://github.com/spil-johan/pytest-eradicate - `pytest-figleaf-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test figleaf coverage plugin - :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hpk42/pytest-figleaf - `pytest-flakes-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to check source code with pyflakes - :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py34&pytest=2.6.0 :target: https://github.com/fschulze/pytest-flakes - `pytest-greendots-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py34&pytest=2.6.0 ? Green progress dots - :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py34&pytest=2.6.0 - `pytest-growl-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py34&pytest=2.6.0 ? Growl notifications for pytest results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py34&pytest=2.6.0 - `pytest-httpbin-0.0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py34&pytest=2.6.0 .. image:: github.png Easily test your HTTP library against a local copy of httpbin - :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py34&pytest=2.6.0 :target: https://github.com/kevin1024/pytest-httpbin - `pytest-httpretty-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py34&pytest=2.6.0 .. image:: github.png A thin wrapper of HTTPretty for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py34&pytest=2.6.0 :target: http://github.com/papaeye/pytest-httpretty - `pytest-incremental-0.3.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png an incremental test runner (pytest plugin) - :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py34&pytest=2.6.0 :target: https://bitbucket.org/schettino72/pytest-incremental - `pytest-instafail-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test plugin to show failures instantly - :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py34&pytest=2.6.0 :target: https://github.com/jpvanhal/pytest-instafail - `pytest-ipdb-0.1-prerelease `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py34&pytest=2.6.0 .. image:: github.png A py.test plug-in to enable drop to ipdb debugger on test failure. - :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py34&pytest=2.6.0 :target: https://github.com/mverteuil/pytest-ipdb - `pytest-jira-0.01 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test JIRA integration plugin, using markers - :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py34&pytest=2.6.0 :target: http://github.com/jlaska/pytest_jira - `pytest-knows-0.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py34&pytest=2.6.0 .. image:: github.png A pytest plugin that can automaticly skip test case based on dependence info calculated by trace - :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py34&pytest=2.6.0 :target: https://github.com/mapix/ptknows - `pytest-konira-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py34&pytest=2.6.0 .. image:: github.png Run Konira DSL tests with py.test - :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py34&pytest=2.6.0 :target: http://github.com/alfredodeza/pytest-konira - `pytest-localserver-0.3.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test plugin to test server connections locally. - :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/basti/pytest-localserver/ - `pytest-marker-bugzilla-0.06 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test bugzilla integration plugin, using markers - :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.0 :target: http://github.com/eanxgeek/pytest_marker_bugzilla - `pytest-markfiltration-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py34&pytest=2.6.0 .. image:: github.png UNKNOWN - :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py34&pytest=2.6.0 :target: https://github.com/adamgoucher/pytest-markfiltration - `pytest-marks-0.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py34&pytest=2.6.0 .. image:: github.png UNKNOWN - :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py34&pytest=2.6.0 :target: https://github.com/adamgoucher/pytest-marks - `pytest-mock-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py34&pytest=2.6.0 .. image:: github.png Thin-wrapper around the mock package for easier use with py.test - :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py34&pytest=2.6.0 :target: https://github.com/nicoddemus/pytest-mock/ - `pytest-monkeyplus-1.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest's monkeypatch subclass with extra functionalities - :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hsoft/pytest-monkeyplus/ - `pytest-mozwebqa-1.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py34&pytest=2.6.0 .. image:: github.png Mozilla WebQA plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py34&pytest=2.6.0 :target: https://github.com/davehunt/pytest-mozwebqa - `pytest-oerp-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to test OpenERP modules - :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py34&pytest=2.6.0 :target: http://github.com/santagada/pytest-oerp/ - `pytest-ordering-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to run your tests in a specific order - :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py34&pytest=2.6.0 :target: https://github.com/ftobia/pytest-ordering - `pytest-osxnotify-0.1.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py34&pytest=2.6.0 .. image:: github.png OS X notifications for py.test results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py34&pytest=2.6.0 :target: https://github.com/dbader/pytest-osxnotify - `pytest-paste-config-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py34&pytest=2.6.0 ? Allow setting the path to a paste config file - :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py34&pytest=2.6.0 - `pytest-pep8-1.0.6 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin to check PEP8 requirements - :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hpk42/pytest-pep8/ - `pytest-poo-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py34&pytest=2.6.0 .. image:: github.png Visualize your crappy tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py34&pytest=2.6.0 :target: http://github.com/pelme/pytest-poo - `pytest-pycharm-0.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py34&pytest=2.6.0 .. image:: github.png Plugin for py.test to enter PyCharm debugger on uncaught exceptions - :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py34&pytest=2.6.0 :target: https://github.com/jlubcke/pytest-pycharm - `pytest-pydev-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test plugin to connect to a remote debug server with PyDev or PyCharm. - :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/basti/pytest-pydev/ - `pytest-pythonpath-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin for adding to the PYTHONPATH from command line or configs. - :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py34&pytest=2.6.0 :target: https://github.com/bigsassy/pytest-pythonpath - `pytest-qt-1.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest support for PyQt and PySide applications - :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py34&pytest=2.6.0 :target: http://github.com/nicoddemus/pytest-qt - `pytest-quickcheck-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin to generate random data inspired by QuickCheck - :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/t2y/pytest-quickcheck/ - `pytest-rage-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to implement PEP712 - :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py34&pytest=2.6.0 :target: http://github.com/santagada/pytest-rage/ - `pytest-raisesregexp-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py34&pytest=2.6.0 .. image:: github.png Simple pytest plugin to look for regex in Exceptions - :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py34&pytest=2.6.0 :target: https://github.com/Walkman/pytest_raisesregexp - `pytest-random-0.02 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test plugin to randomize tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py34&pytest=2.6.0 :target: https://github.com/klrmn/pytest-random - `pytest-rerunfailures-0.05 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test plugin to re-run tests to eliminate flakey failures - :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py34&pytest=2.6.0 :target: https://github.com/klrmn/pytest-rerunfailures - `pytest-runfailed-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py34&pytest=2.6.0 .. image:: github.png implement a --failed option for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py34&pytest=2.6.0 :target: http://github.com/dmerejkowsky/pytest-runfailed - `pytest-runner-2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png UNKNOWN - :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py34&pytest=2.6.0 :target: https://bitbucket.org/jaraco/pytest-runner - `pytest-sftpserver-1.0.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test plugin to locally test sftp server connections. - :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py34&pytest=2.6.0 :target: http://github.com/ulope/pytest-sftpserver/ - `pytest-spec-0.2.22 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py34&pytest=2.6.0 .. image:: github.png pytest plugin to display test execution output like a SPECIFICATION - :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py34&pytest=2.6.0 :target: https://github.com/pchomik/pytest-spec - `pytest-splinter-1.0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py34&pytest=2.6.0 .. image:: github.png Splinter subplugin for Pytest BDD plugin - :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py34&pytest=2.6.0 :target: https://github.com/paylogic/pytest-splinter - `pytest-stepwise-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py34&pytest=2.6.0 .. image:: github.png Run a test suite one failing test at a time. - :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py34&pytest=2.6.0 :target: https://github.com/nip3o/pytest-stepwise - `pytest-sugar-0.3.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py34&pytest=2.6.0 .. image:: github.png py.test is a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly). - :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py34&pytest=2.6.0 :target: https://github.com/Frozenball/pytest-sugar - `pytest-timeout-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin to abort tests after a timeout - :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/flub/pytest-timeout/ - `pytest-twisted-1.5 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py34&pytest=2.6.0 .. image:: github.png A twisted plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py34&pytest=2.6.0 :target: https://github.com/schmir/pytest-twisted - `pytest-xdist-1.10 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png py.test xdist plugin for distributed testing and loop-on-failing modes - :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hpk42/pytest-xdist - `pytest-xprocess-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py34&pytest=2.6.0 .. image:: bitbucket.png pytest plugin to manage external processes across test runs - :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py34&pytest=2.6.0 :target: http://bitbucket.org/hpk42/pytest-xprocess/ - `pytest-yamlwsgi-0.6 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py34&pytest=2.6.0 ? Run tests against wsgi apps defined in yaml - :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py34&pytest=2.6.0 - `pytest-zap-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py27&pytest=2.6.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py34&pytest=2.6.0 .. image:: github.png OWASP ZAP plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py27&pytest=2.6.0 :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py34&pytest=2.6.0 :target: https://github.com/davehunt/pytest-zap +========================================================================================== ================================================================================================================= ================================================================================================================= ======================================================================================== ============================================================================================================================================= + Name Py27 Py34 Repo Summary +========================================================================================== ================================================================================================================= ================================================================================================================= ======================================================================================== ============================================================================================================================================= + `pytest-allure-adaptor-1.4.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Plugin for py.test to generate allure xml reports + :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/allure-framework/allure-python + `pytest-bdd-2.3.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png BDD for pytest + :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/olegpidsadnyi/pytest-bdd + `pytest-beds-0.0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Fixtures for testing Google Appengine (GAE) apps + :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/kaste/pytest-beds + `pytest-bench-0.3.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Benchmark utility that plugs into pytest. + :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/concordusapps/pytest-bench + `pytest-blockage-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Disable network requests during a test run. + :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/rob-b/pytest-blockage + `pytest-browsermob-proxy-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png BrowserMob proxy plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/davehunt/pytest-browsermob-proxy + `pytest-bugzilla-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test bugzilla integration plugin + :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/nibrahim/pytest_bugzilla + `pytest-cache-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest plugin with mechanisms for caching across test runs + :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hpk42/pytest-cache/ + `pytest-capturelog-0.7 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test plugin to capture log messages + :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/memedough/pytest-capturelog/overview + `pytest-codecheckers-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest plugin to add source code sanity checks (pep8 and friends) + :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/ + `pytest-config-0.0.10 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Base configurations and utilities for developing your Python project test suite with pytest. + :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/buzzfeed/pytest_config + `pytest-contextfixture-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Define pytest fixtures as context managers. + :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/pelme/pytest-contextfixture/ + `pytest-couchdbkit-0.5.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test extension for per-test couchdb databases using couchdbkit + :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-couchdbkit + `pytest-cov-1.8.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/schlamar/pytest-cov + `pytest-cpp-0.3.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cpp-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cpp-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Use pytest's runner to discover and execute C++ tests + :target: http://pytest-plugs.herokuapp.com/output/pytest-cpp-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cpp-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/nicoddemus/pytest-cpp + `pytest-dbfixtures-0.5.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Databases fixtures plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/ClearcodeHQ/pytest-dbfixtures + `pytest-dbus-notification-1.0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png D-BUS notifications for pytest results. + :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/bmathieu33/pytest-dbus-notification + `pytest-diffeo-0.1.8.dev1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Common py.test support for Diffeo packages + :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/diffeo/pytest-diffeo + `pytest-django-2.6.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py34&pytest=2.6.2.dev1 `http://pytest-django.readthedocs.org/ `_ A Django plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py34&pytest=2.6.2.dev1 + `pytest-django-haystack-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Cleanup your Haystack indexes between tests + :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/rouge8/pytest-django-haystack + `pytest-django-lite-0.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png The bare minimum to integrate py.test with Django. + :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/dcramer/pytest-django-lite + `pytest-echo-1.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-echo-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-echo-latest?py=py34&pytest=2.6.2.dev1 `http://pypi.python.org/pypi/pytest-echo/ `_ pytest plugin with mechanisms for echoing environment variables, package version and generic attributes + :target: http://pytest-plugs.herokuapp.com/output/pytest-echo-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-echo-latest?py=py34&pytest=2.6.2.dev1 + `pytest-eradicate-0.0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to check for commented out code + :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/spil-johan/pytest-eradicate + `pytest-figleaf-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test figleaf coverage plugin + :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hpk42/pytest-figleaf + `pytest-fixture-tools-1.0.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-fixture-tools-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-fixture-tools-latest?py=py34&pytest=2.6.2.dev1 ? Plugin for pytest which provides tools for fixtures + :target: http://pytest-plugs.herokuapp.com/output/pytest-fixture-tools-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-fixture-tools-latest?py=py34&pytest=2.6.2.dev1 + `pytest-flakes-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to check source code with pyflakes + :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/fschulze/pytest-flakes + `pytest-greendots-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py34&pytest=2.6.2.dev1 ? Green progress dots + :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py34&pytest=2.6.2.dev1 + `pytest-growl-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py34&pytest=2.6.2.dev1 ? Growl notifications for pytest results. + :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py34&pytest=2.6.2.dev1 + `pytest-httpbin-0.0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Easily test your HTTP library against a local copy of httpbin + :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/kevin1024/pytest-httpbin + `pytest-httpretty-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png A thin wrapper of HTTPretty for pytest + :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/papaeye/pytest-httpretty + `pytest-incremental-0.3.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png an incremental test runner (pytest plugin) + :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py34&pytest=2.6.2.dev1 :target: https://bitbucket.org/schettino72/pytest-incremental + `pytest-instafail-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test plugin to show failures instantly + :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/jpvanhal/pytest-instafail + `pytest-ipdb-0.1-prerelease `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png A py.test plug-in to enable drop to ipdb debugger on test failure. + :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/mverteuil/pytest-ipdb + `pytest-jira-0.01 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test JIRA integration plugin, using markers + :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/jlaska/pytest_jira + `pytest-knows-0.1.5 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png A pytest plugin that can automaticly skip test case based on dependence info calculated by trace + :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/mapix/ptknows + `pytest-konira-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Run Konira DSL tests with py.test + :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/alfredodeza/pytest-konira + `pytest-localserver-0.3.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test plugin to test server connections locally. + :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/basti/pytest-localserver/ + `pytest-marker-bugzilla-0.06 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test bugzilla integration plugin, using markers + :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/eanxgeek/pytest_marker_bugzilla + `pytest-markfiltration-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png UNKNOWN + :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/adamgoucher/pytest-markfiltration + `pytest-marks-0.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png UNKNOWN + :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/adamgoucher/pytest-marks + `pytest-mock-0.3.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Thin-wrapper around the mock package for easier use with py.test + :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/nicoddemus/pytest-mock/ + `pytest-monkeyplus-1.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest's monkeypatch subclass with extra functionalities + :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hsoft/pytest-monkeyplus/ + `pytest-mozwebqa-1.1.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Mozilla WebQA plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/davehunt/pytest-mozwebqa + `pytest-oerp-0.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to test OpenERP modules + :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/santagada/pytest-oerp/ + `pytest-ordering-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to run your tests in a specific order + :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/ftobia/pytest-ordering + `pytest-osxnotify-0.1.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png OS X notifications for py.test results. + :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/dbader/pytest-osxnotify + `pytest-paste-config-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py34&pytest=2.6.2.dev1 ? Allow setting the path to a paste config file + :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py34&pytest=2.6.2.dev1 + `pytest-pep8-1.0.6 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest plugin to check PEP8 requirements + :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hpk42/pytest-pep8/ + `pytest-pipeline-0.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pipeline-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pipeline-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Pytest plugin for functional testing of data analysis pipelines + :target: http://pytest-plugs.herokuapp.com/output/pytest-pipeline-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pipeline-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/bow/pytest_pipeline + `pytest-poo-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Visualize your crappy tests + :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/pelme/pytest-poo + `pytest-pycharm-0.1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Plugin for py.test to enter PyCharm debugger on uncaught exceptions + :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/jlubcke/pytest-pycharm + `pytest-pydev-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test plugin to connect to a remote debug server with PyDev or PyCharm. + :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/basti/pytest-pydev/ + `pytest-pythonpath-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin for adding to the PYTHONPATH from command line or configs. + :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/bigsassy/pytest-pythonpath + `pytest-qt-1.2.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest support for PyQt and PySide applications + :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/nicoddemus/pytest-qt + `pytest-quickcheck-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest plugin to generate random data inspired by QuickCheck + :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/t2y/pytest-quickcheck/ + `pytest-rage-0.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to implement PEP712 + :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/santagada/pytest-rage/ + `pytest-raisesregexp-1.0 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Simple pytest plugin to look for regex in Exceptions + :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/Walkman/pytest_raisesregexp + `pytest-random-0.02 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test plugin to randomize tests + :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/klrmn/pytest-random + `pytest-rerunfailures-0.05 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test plugin to re-run tests to eliminate flakey failures + :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/klrmn/pytest-rerunfailures + `pytest-runfailed-0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png implement a --failed option for pytest + :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/dmerejkowsky/pytest-runfailed + `pytest-runner-2.1 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png UNKNOWN + :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py34&pytest=2.6.2.dev1 :target: https://bitbucket.org/jaraco/pytest-runner + `pytest-sftpserver-1.0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test plugin to locally test sftp server connections. + :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py34&pytest=2.6.2.dev1 :target: http://github.com/ulope/pytest-sftpserver/ + `pytest-spec-0.2.22 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png pytest plugin to display test execution output like a SPECIFICATION + :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/pchomik/pytest-spec + `pytest-splinter-1.0.3 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Splinter subplugin for Pytest BDD plugin + :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/paylogic/pytest-splinter + `pytest-stepwise-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png Run a test suite one failing test at a time. + :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/nip3o/pytest-stepwise + `pytest-sugar-0.3.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png py.test is a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly). + :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/Frozenball/pytest-sugar + `pytest-timeout-0.4 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test plugin to abort hanging tests + :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/flub/pytest-timeout/ + `pytest-twisted-1.5 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png A twisted plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/schmir/pytest-twisted + `pytest-xdist-1.10 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png py.test xdist plugin for distributed testing and loop-on-failing modes + :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hpk42/pytest-xdist + `pytest-xprocess-0.8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py34&pytest=2.6.2.dev1 .. image:: bitbucket.png pytest plugin to manage external processes across test runs + :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py34&pytest=2.6.2.dev1 :target: http://bitbucket.org/hpk42/pytest-xprocess/ + `pytest-yamlwsgi-0.6 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py34&pytest=2.6.2.dev1 ? Run tests against wsgi apps defined in yaml + :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py34&pytest=2.6.2.dev1 + `pytest-zap-0.2 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py27&pytest=2.6.2.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py34&pytest=2.6.2.dev1 .. image:: github.png OWASP ZAP plugin for py.test. + :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py27&pytest=2.6.2.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py34&pytest=2.6.2.dev1 :target: https://github.com/davehunt/pytest-zap -========================================================================================== ============================================================================================================ ============================================================================================================ ========================================================================= ============================================================================================================================================= +========================================================================================== ================================================================================================================= ================================================================================================================= ======================================================================================== ============================================================================================================================================= -*(Updated on 2014-07-18)* +*(Updated on 2014-08-26)* diff -r 9baf836b29b58c72ffccc113bca3ac54c883caf8 -r 5c5f7ef69bcd8586823b839d0abe88d1d72c1110 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -96,7 +96,7 @@ pad_right = ('%-' + str(len(target_markup)) + 's') return pad_right % image_markup, target_markup else: - return '`link <%s>`_' % target, '' + return ('`%s <%s>`_' % (target, target)), '' def sanitize_summary(summary): """Make sure summaries don't break our table formatting. Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Thu Aug 28 22:20:09 2014 From: issues-reply at bitbucket.org (Andreas Pelme) Date: Thu, 28 Aug 2014 20:20:09 -0000 Subject: [Pytest-commit] Issue #574: getcfg's parsing of command line arguments (hpk42/pytest) Message-ID: <20140828202009.14194.94340@app05.ash-private.bitbucket.org> New issue 574: getcfg's parsing of command line arguments https://bitbucket.org/hpk42/pytest/issue/574/getcfgs-parsing-of-command-line-arguments Andreas Pelme: https://bitbucket.org/hpk42/pytest/src/aed87f841a762133588d09f17f2ceb050d726569/_pytest/config.py?at=default#cl-846 getcfg looks at all test directorys (or cwd) and strips command line arguments by removing any arguments that starts with '-'. This leads to that for instance ``` py.test -m foo ``` actually scans for foo/pytest.ini, foo/tox.ini, etc which is not really expected/desired