From notifications at travis-ci.org Tue Dec 3 09:20:07 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 03 Dec 2013 08:20:07 +0000 Subject: [Pytest-commit] [Failed] burrowsa/pytest#1 (master - 072a4f8) Message-ID: <529d9436b6210_211fc9a195532@9f664b38-c16b-43aa-a753-4df712ebc013.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #1 Status: Failed Duration: 9 minutes and 54 seconds Commit: 072a4f8 (master) Author: Andrew Burrows Message: Show my build status too View the changeset: https://github.com/burrowsa/pytest/compare/cd464c69e9b2...072a4f818773 View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14851063 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Dec 3 09:52:01 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 03 Dec 2013 08:52:01 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix importorskip test Message-ID: <20131203085201.23370.94265@app07.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/81afec2afcbf/ Changeset: 81afec2afcbf User: hpk42 Date: 2013-12-03 09:40:40 Summary: fix importorskip test Affected #: 1 file diff -r 7cc1a4514c8e4b8329e28c6de8a7de6174c239ec -r 81afec2afcbf5d2c7e5d31ed3a35a7dd0b654820 testing/test_runner.py --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -469,12 +469,14 @@ assert path.purebasename == "test_runner" pytest.raises(SyntaxError, "py.test.importorskip('x y z')") pytest.raises(SyntaxError, "py.test.importorskip('x=y')") - path = importorskip("py", minversion=py.__version__) mod = py.std.types.ModuleType("hello123") mod.__version__ = "1.3" + sys.modules["hello123"] = mod pytest.raises(pytest.skip.Exception, """ py.test.importorskip("hello123", minversion="1.3.1") """) + mod2 = pytest.importorskip("hello123", minversion="1.3") + assert mod2 == mod except pytest.skip.Exception: print(py.code.ExceptionInfo()) py.test.fail("spurious skip") 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 notifications at travis-ci.org Tue Dec 3 10:40:57 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 03 Dec 2013 09:40:57 +0000 Subject: [Pytest-commit] [Still Failing] burrowsa/pytest#3 (master - 8603eeb) Message-ID: <529da7242c308_240ad4c18026c@690d2e17-2256-4526-b6ab-9b74bdcef1b3.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #3 Status: Still Failing Duration: 14 minutes and 17 seconds Commit: 8603eeb (master) Author: Andrew Burrows Message: Update README.rst View the changeset: https://github.com/burrowsa/pytest/compare/9c39b1337f7a...8603eeb60738 View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14853596 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Tue Dec 3 10:35:09 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 03 Dec 2013 09:35:09 +0000 Subject: [Pytest-commit] [Still Failing] burrowsa/pytest#2 (master - 9c39b13) Message-ID: <529da5cd81e20_211fc9a21153a@9f664b38-c16b-43aa-a753-4df712ebc013.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #2 Status: Still Failing Duration: 11 minutes and 43 seconds Commit: 9c39b13 (master) Author: Andrew Burrows Message: Update README.rst View the changeset: https://github.com/burrowsa/pytest/compare/072a4f818773...9c39b1337f7a View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14853493 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Dec 3 11:23:29 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 03 Dec 2013 10:23:29 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix reporting for @mock'd test functions Message-ID: <20131203102329.12883.95371@app12.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/a6837c60c240/ Changeset: a6837c60c240 User: hpk42 Date: 2013-12-03 11:23:22 Summary: fix reporting for @mock'd test functions Affected #: 3 files diff -r 81afec2afcbf5d2c7e5d31ed3a35a7dd0b654820 -r a6837c60c2409e26e718c20a5e033842afe73a0f CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -88,6 +88,8 @@ - fix issue377 by clarifying in the nose-compat docs that pytest does not duplicate the unittest-API into the "plain" namespace. +- fix verbose reporting for @mock'd test functions + Changes between 2.4.1 and 2.4.2 ----------------------------------- diff -r 81afec2afcbf5d2c7e5d31ed3a35a7dd0b654820 -r a6837c60c2409e26e718c20a5e033842afe73a0f _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -277,10 +277,9 @@ if fspath.endswith(".pyc"): fspath = fspath[:-1] lineno = obj.compat_co_firstlineno - modpath = obj.__module__ else: fspath, lineno = getfslineno(obj) - modpath = self.getmodpath() + modpath = self.getmodpath() assert isinstance(lineno, int) return fspath, lineno, modpath diff -r 81afec2afcbf5d2c7e5d31ed3a35a7dd0b654820 -r a6837c60c2409e26e718c20a5e033842afe73a0f testing/python/integration.py --- a/testing/python/integration.py +++ b/testing/python/integration.py @@ -133,6 +133,10 @@ """) reprec = testdir.inline_run() reprec.assertoutcome(passed=2) + calls = reprec.getcalls("pytest_runtest_logreport") + funcnames = [call.report.location[2] for call in calls + if call.report.when == "call"] + assert funcnames == ["T.test_hello", "test_someting"] def test_mock_sorting(self, testdir): pytest.importorskip("mock", "1.0.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 notifications at travis-ci.org Tue Dec 3 19:32:13 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 03 Dec 2013 18:32:13 +0000 Subject: [Pytest-commit] [Fixed] burrowsa/pytest#5 (master - 2bf39c9) Message-ID: <529e23ad320c8_22335c03271ba@9f664b38-c16b-43aa-a753-4df712ebc013.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #5 Status: Fixed Duration: 12 minutes and 39 seconds Commit: 2bf39c9 (master) Author: Andrew Burrows Message: Remove py25 I don't have it on travis View the changeset: https://github.com/burrowsa/pytest/compare/a02f194a08ac...2bf39c963eb9 View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14878998 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Tue Dec 3 19:25:11 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 03 Dec 2013 18:25:11 +0000 Subject: [Pytest-commit] [Still Failing] burrowsa/pytest#4 (master - a02f194) Message-ID: <529e2206a8f20_23cfd12325594@9f664b38-c16b-43aa-a753-4df712ebc013.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #4 Status: Still Failing Duration: 10 minutes and 27 seconds Commit: a02f194 (master) Author: Andrew Burrows Message: Merge branch 'master' of https://github.com/burrowsa/pytest View the changeset: https://github.com/burrowsa/pytest/compare/8603eeb60738...a02f194a08ac View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14878782 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Dec 3 21:07:18 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 03 Dec 2013 20:07:18 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131203200718.3038.10853@app17.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/4972758f9321/ Changeset: 4972758f9321 Branch: parametrize-hashable User: bubenkoff Date: 2013-12-03 21:05:19 Summary: implement index-based mechanizm for collection of parametrized tests Affected #: 3 files diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r 4972758f932169015f6fe68168f26a8093357a70 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Unreleased ----------------------------------- +- fix issue244 by implementing special index for parameters to only use + indices for paramentrized test ids + - fix issue287 by running all finalizers but saving the exception from the first failing finalizer and re-raising it so teardown will still have failed. We reraise the first failing exception because diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r 4972758f932169015f6fe68168f26a8093357a70 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -594,12 +594,14 @@ self._globalparam = _notexists self._arg2scopenum = {} # used for sorting parametrized resources self.keywords = {} + self.indices = {} def copy(self, metafunc): cs = CallSpec2(self.metafunc) cs.funcargs.update(self.funcargs) cs.params.update(self.params) cs.keywords.update(self.keywords) + cs.indices.update(self.indices) cs._arg2scopenum.update(self._arg2scopenum) cs._idlist = list(self._idlist) cs._globalid = self._globalid @@ -623,7 +625,8 @@ def id(self): return "-".join(map(str, filter(None, self._idlist))) - def setmulti(self, valtype, argnames, valset, id, keywords, scopenum=0): + def setmulti(self, valtype, argnames, valset, id, keywords, scopenum, + param_index): for arg,val in zip(argnames, valset): self._checkargnotcontained(arg) getattr(self, valtype)[arg] = val @@ -631,6 +634,7 @@ # parametrize_sorted() which groups tests by params/scope if valtype == "funcargs": self.params[arg] = id + self.indices[arg] = param_index self._arg2scopenum[arg] = scopenum if val is _notexists: self._emptyparamspecified = True @@ -740,11 +744,12 @@ ids = idmaker(argnames, argvalues) newcalls = [] for callspec in self._calls or [CallSpec2(self)]: - for i, valset in enumerate(argvalues): + for param_index, valset in enumerate(argvalues): assert len(valset) == len(argnames) newcallspec = callspec.copy(self) - newcallspec.setmulti(valtype, argnames, valset, ids[i], - newkeywords.get(i, {}), scopenum) + newcallspec.setmulti(valtype, argnames, valset, ids[param_index], + newkeywords.get(param_index, {}), scopenum, + param_index) newcalls.append(newcallspec) self._calls = newcalls @@ -1862,19 +1867,19 @@ except AttributeError: return [] if scopenum == 0: - argparams = [x for x in cs.params.items() if x not in ignore + argparams = [x for x in cs.indices.items() if x not in ignore and cs._arg2scopenum[x[0]] == scopenum] elif scopenum == 1: # module argparams = [] - for argname, param in cs.params.items(): + for argname, valindex in cs.indices.items(): if cs._arg2scopenum[argname] == scopenum: - key = (argname, param, item.fspath) + key = (argname, valindex, item.fspath) if key in ignore: continue argparams.append(key) elif scopenum == 2: # class argparams = [] - for argname, param in cs.params.items(): + for argname, valindex in cs.indices.items(): if cs._arg2scopenum[argname] == scopenum: l = cache.setdefault(item.fspath, []) try: @@ -1882,13 +1887,13 @@ except ValueError: i = len(l) l.append(item.cls) - key = (argname, param, item.fspath, i) + key = (argname, valindex, item.fspath, i) if key in ignore: continue argparams.append(key) #elif scopenum == 3: # argparams = [] - # for argname, param in cs.params.items(): + # for argname, param in cs.indices.items(): # if cs._arg2scopenum[argname] == scopenum: # key = (argname, param, getfslineno(item.obj)) # if key in ignore: diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r 4972758f932169015f6fe68168f26a8093357a70 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -355,6 +355,35 @@ rec = testdir.inline_run() rec.assertoutcome(passed=2) + + def test_parametrize_with_non_hashable_values_indirect(self, testdir): + """Test parametrization with non-hashable values with indirect parametrization.""" + testdir.makepyfile(""" + archival_mapping = { + '1.0': {'tag': '1.0'}, + '1.2.2a1': {'tag': 'release-1.2.2a1'}, + } + + import pytest + + @pytest.fixture + def key(request): + return request.param + + @pytest.fixture + def value(request): + return request.param + + @pytest.mark.parametrize('key value'.split(), + archival_mapping.items(), indirect=True) + def test_archival_to_version(key, value): + assert key in archival_mapping + assert value == archival_mapping[key] + """) + rec = testdir.inline_run() + rec.assertoutcome(passed=2) + + def test_parametrize_with_mark(selfself, testdir): items = testdir.getitems(""" import pytest https://bitbucket.org/hpk42/pytest/commits/ef64b4405d0c/ Changeset: ef64b4405d0c User: hpk42 Date: 2013-12-03 21:07:15 Summary: Merged in paylogic/pytest/parametrize-hashable (pull request #89) implement index-based mechanizm for collection of parametrized tests Affected #: 3 files diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r ef64b4405d0caf4ba5bb390f591889b99be574a1 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Unreleased ----------------------------------- +- fix issue244 by implementing special index for parameters to only use + indices for paramentrized test ids + - fix issue287 by running all finalizers but saving the exception from the first failing finalizer and re-raising it so teardown will still have failed. We reraise the first failing exception because diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r ef64b4405d0caf4ba5bb390f591889b99be574a1 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -594,12 +594,14 @@ self._globalparam = _notexists self._arg2scopenum = {} # used for sorting parametrized resources self.keywords = {} + self.indices = {} def copy(self, metafunc): cs = CallSpec2(self.metafunc) cs.funcargs.update(self.funcargs) cs.params.update(self.params) cs.keywords.update(self.keywords) + cs.indices.update(self.indices) cs._arg2scopenum.update(self._arg2scopenum) cs._idlist = list(self._idlist) cs._globalid = self._globalid @@ -623,7 +625,8 @@ def id(self): return "-".join(map(str, filter(None, self._idlist))) - def setmulti(self, valtype, argnames, valset, id, keywords, scopenum=0): + def setmulti(self, valtype, argnames, valset, id, keywords, scopenum, + param_index): for arg,val in zip(argnames, valset): self._checkargnotcontained(arg) getattr(self, valtype)[arg] = val @@ -631,6 +634,7 @@ # parametrize_sorted() which groups tests by params/scope if valtype == "funcargs": self.params[arg] = id + self.indices[arg] = param_index self._arg2scopenum[arg] = scopenum if val is _notexists: self._emptyparamspecified = True @@ -740,11 +744,12 @@ ids = idmaker(argnames, argvalues) newcalls = [] for callspec in self._calls or [CallSpec2(self)]: - for i, valset in enumerate(argvalues): + for param_index, valset in enumerate(argvalues): assert len(valset) == len(argnames) newcallspec = callspec.copy(self) - newcallspec.setmulti(valtype, argnames, valset, ids[i], - newkeywords.get(i, {}), scopenum) + newcallspec.setmulti(valtype, argnames, valset, ids[param_index], + newkeywords.get(param_index, {}), scopenum, + param_index) newcalls.append(newcallspec) self._calls = newcalls @@ -1862,19 +1867,19 @@ except AttributeError: return [] if scopenum == 0: - argparams = [x for x in cs.params.items() if x not in ignore + argparams = [x for x in cs.indices.items() if x not in ignore and cs._arg2scopenum[x[0]] == scopenum] elif scopenum == 1: # module argparams = [] - for argname, param in cs.params.items(): + for argname, valindex in cs.indices.items(): if cs._arg2scopenum[argname] == scopenum: - key = (argname, param, item.fspath) + key = (argname, valindex, item.fspath) if key in ignore: continue argparams.append(key) elif scopenum == 2: # class argparams = [] - for argname, param in cs.params.items(): + for argname, valindex in cs.indices.items(): if cs._arg2scopenum[argname] == scopenum: l = cache.setdefault(item.fspath, []) try: @@ -1882,13 +1887,13 @@ except ValueError: i = len(l) l.append(item.cls) - key = (argname, param, item.fspath, i) + key = (argname, valindex, item.fspath, i) if key in ignore: continue argparams.append(key) #elif scopenum == 3: # argparams = [] - # for argname, param in cs.params.items(): + # for argname, param in cs.indices.items(): # if cs._arg2scopenum[argname] == scopenum: # key = (argname, param, getfslineno(item.obj)) # if key in ignore: diff -r a6837c60c2409e26e718c20a5e033842afe73a0f -r ef64b4405d0caf4ba5bb390f591889b99be574a1 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -355,6 +355,35 @@ rec = testdir.inline_run() rec.assertoutcome(passed=2) + + def test_parametrize_with_non_hashable_values_indirect(self, testdir): + """Test parametrization with non-hashable values with indirect parametrization.""" + testdir.makepyfile(""" + archival_mapping = { + '1.0': {'tag': '1.0'}, + '1.2.2a1': {'tag': 'release-1.2.2a1'}, + } + + import pytest + + @pytest.fixture + def key(request): + return request.param + + @pytest.fixture + def value(request): + return request.param + + @pytest.mark.parametrize('key value'.split(), + archival_mapping.items(), indirect=True) + def test_archival_to_version(key, value): + assert key in archival_mapping + assert value == archival_mapping[key] + """) + rec = testdir.inline_run() + rec.assertoutcome(passed=2) + + def test_parametrize_with_mark(selfself, testdir): items = testdir.getitems(""" import pytest 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 Dec 4 07:16:51 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 04 Dec 2013 06:16:51 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: allow to use pytest.fixture decorator on old-style pytest_funcarg__NAME definitions. Message-ID: <20131204061651.12998.34276@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/aa1f0505a315/ Changeset: aa1f0505a315 User: hpk42 Date: 2013-12-04 07:16:34 Summary: allow to use pytest.fixture decorator on old-style pytest_funcarg__NAME definitions. Affected #: 3 files diff -r ef64b4405d0caf4ba5bb390f591889b99be574a1 -r aa1f0505a3156b9feca43cd67c5afc95622b9ac5 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -93,6 +93,9 @@ - fix verbose reporting for @mock'd test functions +- allow @pytest.fixture marked pytest_funcarg__foo functions + so that pylint errors can be avoided. + Changes between 2.4.1 and 2.4.2 ----------------------------------- diff -r ef64b4405d0caf4ba5bb390f591889b99be574a1 -r aa1f0505a3156b9feca43cd67c5afc95622b9ac5 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1660,8 +1660,9 @@ # magic globals with __getattr__ might have got us a wrong # fixture attribute continue - else: - assert not name.startswith(self._argprefix) + elif name.startswith(self._argprefix): + # let's allso fixture-marked pytest_funcarg__ prefixed functions + name = name[len(self._argprefix):] fixturedef = FixtureDef(self, nodeid, name, obj, marker.scope, marker.params, yieldctx=marker.yieldctx, diff -r ef64b4405d0caf4ba5bb390f591889b99be574a1 -r aa1f0505a3156b9feca43cd67c5afc95622b9ac5 testing/python/integration.py --- a/testing/python/integration.py +++ b/testing/python/integration.py @@ -195,3 +195,16 @@ def test_pytestconfig_is_session_scoped(): from _pytest.python import pytestconfig assert pytestconfig._pytestfixturefunction.scope == "session" + +def test_funcarg_prefix_and_marker(testdir): + testdir.makepyfile(""" + import pytest + @pytest.fixture + def pytest_funcarg__foo(): + return 1 + + def test_hello(foo): + assert foo == 1 + """) + 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 notifications at travis-ci.org Thu Dec 5 01:02:59 2013 From: notifications at travis-ci.org (Travis CI) Date: Thu, 05 Dec 2013 00:02:59 +0000 Subject: [Pytest-commit] [Fixed] burrowsa/pytest#12 (pytestmockbug - 6dd2fc4) Message-ID: <529fc2b381a38_2947e2938a@9a818314-8848-477a-b86a-1d9d58b4da0f.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #12 Status: Fixed Duration: 11 minutes and 59 seconds Commit: 6dd2fc4 (pytestmockbug) Author: Andrew Burrows Message: Don't test py25 as travis can't find it View the changeset: https://github.com/burrowsa/pytest/compare/c37200d66116...6dd2fc4028dc View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14954370 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Thu Dec 5 00:42:57 2013 From: notifications at travis-ci.org (Travis CI) Date: Wed, 04 Dec 2013 23:42:57 +0000 Subject: [Pytest-commit] [Still Failing] burrowsa/pytest#10 (pytestmockbug - c37200d) Message-ID: <529fbe015a168_23f9e6106c@530885b8-79f8-434e-9e62-da035452dbbf.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #10 Status: Still Failing Duration: 12 minutes and 31 seconds Commit: c37200d (pytestmockbug) Author: Andrew Burrows Message: Revert "Remove py25 I don't have it on travis" This reverts commit a5ea4e3e1ab0ee2efe7697913b149e7341a2e3e9. View the changeset: https://github.com/burrowsa/pytest/compare/119fcc371ee9...c37200d66116 View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14953412 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Thu Dec 5 00:23:26 2013 From: notifications at travis-ci.org (Travis CI) Date: Wed, 04 Dec 2013 23:23:26 +0000 Subject: [Pytest-commit] [Failed] burrowsa/pytest#8 (pytestmockbug - 0b53bfb) Message-ID: <529fb96df03c0_2767057079@530885b8-79f8-434e-9e62-da035452dbbf.mail> Build Update for burrowsa/pytest ------------------------------------- Build: #8 Status: Failed Duration: 14 minutes and 30 seconds Commit: 0b53bfb (pytestmockbug) Author: Andrew Burrows Message: Fix for https://code.google.com/p/mock/issues/detail?id=203 Fix it so that tests decorated with @mock.patch keep their names in the py.test output View the changeset: https://github.com/burrowsa/pytest/commit/0b53bfb318d2 View the full build log and details: https://travis-ci.org/burrowsa/pytest/builds/14952416 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Thu Dec 5 06:31:56 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 05 Dec 2013 05:31:56 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131205053156.1461.59763@app11.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/20f0da86518e/ Changeset: 20f0da86518e User: hpk42 Date: 2013-12-04 16:09:37 Summary: reopen #246 -- it turns out parametrized finalization ordering is not fully fixed -- i modified the test and marked it xfail for now. Affected #: 1 file diff -r aa1f0505a3156b9feca43cd67c5afc95622b9ac5 -r 20f0da86518e3636726e2880b3b4d761fce56ec2 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1855,6 +1855,7 @@ reprec.assertoutcome(passed=5) + @pytest.mark.xfail @pytest.mark.issue246 @pytest.mark.parametrize("scope", ["session", "function", "module"]) def test_finalizer_order_on_parametrization(self, scope, testdir): @@ -1876,15 +1877,18 @@ def base(request, fix1): def cleanup_base(): l.append("fin_base") + print ("finalizing base") request.addfinalizer(cleanup_base) + def test_begin(): + pass def test_baz(base, fix2): pass def test_other(): pass """ % {"scope": scope}) - reprec = testdir.inline_run() - reprec.assertoutcome(passed=2) + reprec = testdir.inline_run("-lvs") + reprec.assertoutcome(passed=3) def test_parametrize_setup_function(self, testdir): testdir.makepyfile(""" https://bitbucket.org/hpk42/pytest/commits/1338c1ed28ff/ Changeset: 1338c1ed28ff User: hpk42 Date: 2013-12-05 06:09:29 Summary: refactor and document parametrized sorting code. Affected #: 1 file diff -r 20f0da86518e3636726e2880b3b4d761fce56ec2 -r 1338c1ed28ffbeda49a7a9dbf983de8b569f52db _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -631,7 +631,7 @@ self._checkargnotcontained(arg) getattr(self, valtype)[arg] = val # we want self.params to be always set because of - # parametrize_sorted() which groups tests by params/scope + # reorder_items() which groups tests by params/scope if valtype == "funcargs": self.params[arg] = id self.indices[arg] = param_index @@ -1600,7 +1600,7 @@ def pytest_collection_modifyitems(self, items): # separate parametrized setups - items[:] = parametrize_sorted(items, set(), {}, 0) + items[:] = reorder_items(items, set(), {}, 0) @pytest.mark.trylast def pytest_runtest_teardown(self, item, nextitem): @@ -1822,85 +1822,77 @@ return tuple(argnames[startindex:]) # algorithm for sorting on a per-parametrized resource setup basis +# it is called for scopenum==0 (session) first and performs sorting +# down to the lower scopes such as to minimize number of "high scope" +# setups and teardowns -def parametrize_sorted(items, ignore, cache, scopenum): - if scopenum >= 3: +def reorder_items(items, ignore, cache, scopenum): + if scopenum >= scopenum_function: return items + if len(items) < 2: + return items + #print "\nparametrize_Sorted", items, ignore, cache, scopenum - # we pick the first item which has a arg/param combo in the - # requested scope and sort other items with the same combo - # into "newitems" which then is a list of all items using this - # arg/param. + # we pick the first item which uses a fixture instance in the requested scope + # and which we haven't seen yet. We slice the input items list into + # a list of items_nomatch, items_using_same_fixtureinstance and + # items_remaining + slicing_argkey = None + for i, item in enumerate(items): + argkeys = get_parametrized_fixture_keys(item, ignore, scopenum, cache) + if slicing_argkey is None: + if argkeys: + slicing_argkey = argkeys.pop() + items_using_same_fixtureinstance = [item] + items_nomatch = items[:i] + items_remaining = [] + continue + if slicing_argkey in argkeys: + items_using_same_fixtureinstance.append(item) + else: + items_remaining.append(item) - similar_items = [] - other_items = [] - slicing_argparam = None - slicing_index = 0 - for item in items: - argparamlist = getfuncargparams(item, ignore, scopenum, cache) - if slicing_argparam is None and argparamlist: - slicing_argparam = argparamlist[0] - slicing_index = len(other_items) - if slicing_argparam in argparamlist: - similar_items.append(item) - else: - other_items.append(item) + if slicing_argkey is None or len(items_using_same_fixtureinstance) == 1: + # nothing to sort on this level + return reorder_items(items, ignore, cache, scopenum+1) - if (len(similar_items) + slicing_index) > 1: - newignore = ignore.copy() - newignore.add(slicing_argparam) - part2 = parametrize_sorted( - similar_items + other_items[slicing_index:], - newignore, cache, scopenum) - part1 = parametrize_sorted( - other_items[:slicing_index], newignore, - cache, scopenum+1) - return part1 + part2 - else: - other_items = parametrize_sorted(other_items, ignore, cache, scopenum+1) - return other_items + similar_items + items_nomatch = reorder_items(items_nomatch, ignore, cache, scopenum+1) + newignore = ignore.copy() + newignore.add(slicing_argkey) + part2 = reorder_items(items_using_same_fixtureinstance + items_remaining, + newignore, cache, scopenum) + return items_nomatch + part2 -def getfuncargparams(item, ignore, scopenum, cache): - """ return list of (arg,param) tuple, sorted by broader scope first. """ - assert scopenum < 3 # function +def get_parametrized_fixture_keys(item, ignore, scopenum, cache): + """ return list of keys for all parametrized arguments which match + the specified scope. """ + assert scopenum < scopenum_function # function + keys = set() try: cs = item.callspec except AttributeError: - return [] - if scopenum == 0: - argparams = [x for x in cs.indices.items() if x not in ignore - and cs._arg2scopenum[x[0]] == scopenum] - elif scopenum == 1: # module - argparams = [] - for argname, valindex in cs.indices.items(): - if cs._arg2scopenum[argname] == scopenum: - key = (argname, valindex, item.fspath) - if key in ignore: - continue - argparams.append(key) - elif scopenum == 2: # class - argparams = [] - for argname, valindex in cs.indices.items(): - if cs._arg2scopenum[argname] == scopenum: - l = cache.setdefault(item.fspath, []) - try: - i = l.index(item.cls) - except ValueError: - i = len(l) - l.append(item.cls) - key = (argname, valindex, item.fspath, i) - if key in ignore: - continue - argparams.append(key) - #elif scopenum == 3: - # argparams = [] - # for argname, param in cs.indices.items(): - # if cs._arg2scopenum[argname] == scopenum: - # key = (argname, param, getfslineno(item.obj)) - # if key in ignore: - # continue - # argparams.append(key) - return argparams + return keys # no parametrization on this item + # cs.indictes.items() is random order of argnames but + # then again different functions (items) can change order of + # arguments so it doesn't matter much probably + for argname, param_index in cs.indices.items(): + if cs._arg2scopenum[argname] != scopenum: + continue + if scopenum == 0: # session + key = (argname, param_index) + elif scopenum == 1: # module + key = (argname, param_index, item.fspath) + elif scopenum == 2: # class + l = cache.setdefault(item.fspath, []) + try: + i = l.index(item.cls) + except ValueError: + i = len(l) + l.append(item.cls) + key = (argname, param_index, item.fspath, i) + if key not in ignore: + keys.add(key) + return keys def xunitsetup(obj, name): 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 Dec 6 16:00:07 2013 From: issues-reply at bitbucket.org (freeo) Date: Fri, 06 Dec 2013 15:00:07 -0000 Subject: [Pytest-commit] Issue #139: tox 1.6.1 uses default pip 1.3.1 -> bad install_command default (hpk42/tox) Message-ID: <20131206150007.13115.15355@app02.ash-private.bitbucket.org> New issue 139: tox 1.6.1 uses default pip 1.3.1 -> bad install_command default https://bitbucket.org/hpk42/tox/issue/139/tox-161-uses-default-pip-131-bad freeo: Tox 1.6.1 doesn't work out of the box using win32, python33 32bit. The install_command default is `pip install --pre ...`, which is unsupported by `pip 1.3.1` - the version, which gets installed by tox! I didn't find a possibility to set `deps=pip>=1.4.1`, which leads to a circular problem, if I want to avoid changing the default `install_command`! I can't upgrade pip without changing the default. Upgrading itself make the change obsolete. The default pip version for any environment should therefore be `pip>=1.4`, if the `--pre` option is a default! This was annoying to find for a newbie like me... This is my working tox.ini, just in case. ``` #!tox [tox] envlist = py33 [testenv] install_command=pip install {opts} {packages} deps= -rrequirements.txt commands= py.test [testenv:py33] basepython=D:/Python33/python.exe ``` requirements.txt: `pytest` From commits-noreply at bitbucket.org Sat Dec 7 16:37:57 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 15:37:57 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131207153757.11800.99343@app03.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/74c6f671db35/ Changeset: 74c6f671db35 User: hpk42 Date: 2013-12-05 14:40:50 Summary: remove unused line Affected #: 1 file diff -r 1338c1ed28ffbeda49a7a9dbf983de8b569f52db -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1081,8 +1081,6 @@ def __init__(self, pyfuncitem): self._pyfuncitem = pyfuncitem - if hasattr(pyfuncitem, '_requestparam'): - self.param = pyfuncitem._requestparam #: fixture for which this request is being performed self.fixturename = None #: Scope string, one of "function", "cls", "module", "session" https://bitbucket.org/hpk42/pytest/commits/25ca40a219a0/ Changeset: 25ca40a219a0 User: hpk42 Date: 2013-12-07 16:37:46 Summary: refactor internal finalization mechanics such that all fixture arguments in a test invocation will have a corresponding FixtureDef instance. also fixes issue246 (again). simplify parametrized fixture teardown by making it work lazy: during the setup of a parametrized fixture instance any previously setup instance which was setup with a different param is torn down before setting up the new one. Affected #: 7 files diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,19 @@ Unreleased ----------------------------------- +- simplified and fixed implementation for calling finalizers when + parametrized fixtures or function arguments are involved. finalization + is now performed lazily at setup time instead of in the "teardown phase". + While this might sound odd at first, it helps to ensure that we are + correctly handling setup/teardown even in complex code. User-level code + should not be affected unless it's implementing the pytest_runtest_teardown + hook and expecting certain fixture instances are torn down within (very + unlikely and would have been unreliable anyway). + +- fix issue246 (again) fix finalizer order to be LIFO on independent fixtures + depending on a parametrized higher-than-function scoped fixture. + (fix quite some effort so please bear with the complexity of this sentence :) + - fix issue244 by implementing special index for parameters to only use indices for paramentrized test ids diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -230,6 +230,8 @@ #: allow adding of extra keywords to use for matching self.extra_keyword_matches = set() + # used for storing artificial fixturedefs for direct parametrization + self._name2pseudofixturedef = {} #self.extrainit() @property @@ -365,6 +367,8 @@ self.session._setupstate.addfinalizer(fin, self) def getparent(self, cls): + """ get the next parent node (including ourself) + which is an instance of the given class""" current = self while current and not isinstance(current, cls): current = current.parent diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -341,12 +341,72 @@ if not metafunc._calls: yield Function(name, parent=self) else: + # add funcargs() as fixturedefs to fixtureinfo.arg2fixturedefs + add_funcarg_pseudo_fixture_def(self, metafunc, fm) + for callspec in metafunc._calls: subname = "%s[%s]" %(name, callspec.id) yield Function(name=subname, parent=self, callspec=callspec, callobj=funcobj, keywords={callspec.id:True}) +def add_funcarg_pseudo_fixture_def(collector, metafunc, fixturemanager): + # this function will transform all collected calls to a functions + # if they use direct funcargs (i.e. direct parametrization) + # because we want later test execution to be able to rely on + # an existing FixtureDef structure for all arguments. + # XXX we can probably avoid this algorithm if we modify CallSpec2 + # to directly care for creating the fixturedefs within its methods. + if not metafunc._calls[0].funcargs: + return # this function call does not have direct parametrization + # collect funcargs of all callspecs into a list of values + arg2params = {} + arg2scope = {} + arg2fixturedefs = metafunc._arg2fixturedefs + for param_index, callspec in enumerate(metafunc._calls): + for argname, argvalue in callspec.funcargs.items(): + assert argname not in arg2fixturedefs + arg2params.setdefault(argname, []).append(argvalue) + if argname not in arg2scope: + scopenum = callspec._arg2scopenum.get(argname, scopenum_function) + arg2scope[argname] = scopes[scopenum] + callspec.indices[argname] = param_index + + for argname in callspec.funcargs: + assert argname not in callspec.params + callspec.params.update(callspec.funcargs) + callspec.funcargs.clear() + + # register artificial FixtureDef's so that later at test execution + # time we can rely on a proper FixtureDef to exist for fixture setup. + for argname, valuelist in arg2params.items(): + # if we have a scope that is higher than function we need + # to make sure we only ever create an according fixturedef on + # a per-scope basis. We thus store and cache the fixturedef on the + # node related to the scope. + assert argname not in arg2fixturedefs, (argname, arg2fixturedefs) + scope = arg2scope[argname] + node = None + if scope != "function": + node = get_scope_node(collector, scope) + if node is None: + assert scope == "class" and isinstance(collector, Module) + # use module-level collector for class-scope (for now) + node = collector + if node and argname in node._name2pseudofixturedef: + arg2fixturedefs[argname] = [node._name2pseudofixturedef[argname]] + else: + fixturedef = FixtureDef(fixturemanager, '', argname, + get_direct_param_fixture_func, + arg2scope[argname], + valuelist, False, False) + arg2fixturedefs[argname] = [fixturedef] + if node is not None: + node._name2pseudofixturedef[argname] = fixturedef + + +def get_direct_param_fixture_func(request): + return request.param class FuncFixtureInfo: def __init__(self, argnames, names_closure, name2fixturedefs): @@ -560,25 +620,24 @@ def fillfixtures(function): """ fill missing funcargs for a test function. """ - if 1 or getattr(function, "_args", None) is None: # not a yielded function - try: - request = function._request - except AttributeError: - # XXX this special code path is only expected to execute - # with the oejskit plugin. It uses classes with funcargs - # and we thus have to work a bit to allow this. - fm = function.session._fixturemanager - fi = fm.getfixtureinfo(function.parent, function.obj, None) - function._fixtureinfo = fi - request = function._request = FixtureRequest(function) - request._fillfixtures() - # prune out funcargs for jstests - newfuncargs = {} - for name in fi.argnames: - newfuncargs[name] = function.funcargs[name] - function.funcargs = newfuncargs - else: - request._fillfixtures() + try: + request = function._request + except AttributeError: + # XXX this special code path is only expected to execute + # with the oejskit plugin. It uses classes with funcargs + # and we thus have to work a bit to allow this. + fm = function.session._fixturemanager + fi = fm.getfixtureinfo(function.parent, function.obj, None) + function._fixtureinfo = fi + request = function._request = FixtureRequest(function) + request._fillfixtures() + # prune out funcargs for jstests + newfuncargs = {} + for name in fi.argnames: + newfuncargs[name] = function.funcargs[name] + function.funcargs = newfuncargs + else: + request._fillfixtures() _notexists = object() @@ -630,10 +689,6 @@ for arg,val in zip(argnames, valset): self._checkargnotcontained(arg) getattr(self, valtype)[arg] = val - # we want self.params to be always set because of - # reorder_items() which groups tests by params/scope - if valtype == "funcargs": - self.params[arg] = id self.indices[arg] = param_index self._arg2scopenum[arg] = scopenum if val is _notexists: @@ -650,6 +705,8 @@ if param is not _notexists: assert self._globalparam is _notexists self._globalparam = param + for arg in funcargs: + self._arg2scopenum[arg] = scopenum_function class FuncargnamesCompatAttr: @@ -728,7 +785,7 @@ argvalues = [(_notexists,) * len(argnames)] if scope is None: - scope = "subfunction" + scope = "function" scopenum = scopes.index(scope) if not indirect: #XXX should we also check for the opposite case? @@ -971,30 +1028,26 @@ for name, val in keywords.items(): self.keywords[name] = val - fm = self.session._fixturemanager isyield = self._isyieldedfunction() - self._fixtureinfo = fi = fm.getfixtureinfo(self.parent, self.obj, - self.cls, - funcargs=not isyield) + self._fixtureinfo = fi = self.session._fixturemanager.getfixtureinfo( + self.parent, self.obj, self.cls, funcargs=not isyield) self.fixturenames = fi.names_closure if callspec is not None: self.callspec = callspec self._initrequest() def _initrequest(self): + self.funcargs = {} if self._isyieldedfunction(): assert not hasattr(self, "callspec"), ( "yielded functions (deprecated) cannot have funcargs") - self.funcargs = {} else: if hasattr(self, "callspec"): callspec = self.callspec - self.funcargs = callspec.funcargs.copy() + assert not callspec.funcargs self._genid = callspec.id if hasattr(callspec, "param"): self.param = callspec.param - else: - self.funcargs = {} self._request = FixtureRequest(self) @property @@ -1085,9 +1138,10 @@ self.fixturename = None #: Scope string, one of "function", "cls", "module", "session" self.scope = "function" - self._funcargs = self._pyfuncitem.funcargs.copy() + self._funcargs = {} + self._fixturedefs = {} fixtureinfo = pyfuncitem._fixtureinfo - self._arg2fixturedefs = fixtureinfo.name2fixturedefs + self._arg2fixturedefs = fixtureinfo.name2fixturedefs.copy() self._arg2index = {} self.fixturenames = fixtureinfo.names_closure self._fixturemanager = pyfuncitem.session._fixturemanager @@ -1097,15 +1151,17 @@ """ underlying collection node (depends on current request scope)""" return self._getscopeitem(self.scope) + def _getnextfixturedef(self, argname): fixturedefs = self._arg2fixturedefs.get(argname, None) if fixturedefs is None: - # we arrive here because of a getfuncargvalue(argname) usage which - # was naturally not knowable at parsing/collection time + # we arrive here because of a a dynamic call to + # getfuncargvalue(argname) usage which was naturally + # not known at parsing/collection time fixturedefs = self._fixturemanager.getfixturedefs( argname, self._pyfuncitem.parent.nodeid) self._arg2fixturedefs[argname] = fixturedefs - # fixturedefs is immutable so we maintain a decreasing index + # fixturedefs list is immutable so we maintain a decreasing index index = self._arg2index.get(argname, 0) - 1 if fixturedefs is None or (-index > len(fixturedefs)): raise FixtureLookupError(argname, self) @@ -1137,7 +1193,9 @@ try: return self._pyfuncitem._testcase except AttributeError: - return py.builtin._getimself(self.function) + function = getattr(self, "function", None) + if function is not None: + return py.builtin._getimself(function) @scopeproperty() def module(self): @@ -1167,12 +1225,7 @@ self._addfinalizer(finalizer, scope=self.scope) def _addfinalizer(self, finalizer, scope): - if scope != "function" and hasattr(self, "param"): - # parametrized resources are sorted by param - # so we rather store finalizers per (argname, param) - colitem = (self.fixturename, self.param) - else: - colitem = self._getscopeitem(scope) + colitem = self._getscopeitem(scope) self._pyfuncitem.session._setupstate.addfinalizer( finalizer=finalizer, colitem=colitem) @@ -1246,19 +1299,24 @@ setup time, you may use this function to retrieve it inside a fixture function body. """ + return self._get_active_fixturedef(argname).cached_result[0] + + def _get_active_fixturedef(self, argname): try: - return self._funcargs[argname] + return self._fixturedefs[argname] except KeyError: - pass - try: - fixturedef = self._getnextfixturedef(argname) - except FixtureLookupError: - if argname == "request": - return self - raise - result = self._getfuncargvalue(fixturedef) - self._funcargs[argname] = result - return result + try: + fixturedef = self._getnextfixturedef(argname) + except FixtureLookupError: + if argname == "request": + class PseudoFixtureDef: + cached_result = (self, [0]) + return PseudoFixtureDef + raise + result = self._getfuncargvalue(fixturedef) + self._funcargs[argname] = result + self._fixturedefs[argname] = fixturedef + return fixturedef def _get_fixturestack(self): current = self @@ -1272,28 +1330,26 @@ current = current._parent_request def _getfuncargvalue(self, fixturedef): - try: - return fixturedef.cached_result # set by fixturedef.execute() - except AttributeError: - pass # prepare a subrequest object before calling fixture function # (latter managed by fixturedef) argname = fixturedef.argname - node = self._pyfuncitem + funcitem = self._pyfuncitem scope = fixturedef.scope try: - param = node.callspec.getparam(argname) + param = funcitem.callspec.getparam(argname) except (AttributeError, ValueError): param = NOTSET + param_index = 0 else: + # indices might not be set if old-style metafunc.addcall() was used + param_index = funcitem.callspec.indices.get(argname, 0) # if a parametrize invocation set a scope it will override # the static scope defined with the fixture function - paramscopenum = node.callspec._arg2scopenum.get(argname) - if paramscopenum is not None and \ - paramscopenum != scopenum_subfunction: + paramscopenum = funcitem.callspec._arg2scopenum.get(argname) + if paramscopenum is not None: scope = scopes[paramscopenum] - subrequest = SubRequest(self, scope, param, fixturedef) + subrequest = SubRequest(self, scope, param, param_index, fixturedef) # check if a higher-level scoped fixture accesses a lower level one if scope is not None: @@ -1308,19 +1364,12 @@ __tracebackhide__ = False try: - # perform the fixture call + # call the fixture function val = fixturedef.execute(request=subrequest) finally: - # if the fixture function failed it might still have - # registered finalizers so we can register - # prepare finalization according to scope - # (XXX analyse exact finalizing mechanics / cleanup) + # if fixture function failed it might have registered finalizers self.session._setupstate.addfinalizer(fixturedef.finish, subrequest.node) - self._fixturemanager.addargfinalizer(fixturedef.finish, argname) - for subargname in fixturedef.argnames: # XXX all deps? - self._fixturemanager.addargfinalizer(fixturedef.finish, - subargname) return val def _factorytraceback(self): @@ -1336,18 +1385,14 @@ def _getscopeitem(self, scope): if scope == "function": + # this might also be a non-function Item despite its attribute name return self._pyfuncitem - elif scope == "session": - return self.session - elif scope == "class": - x = self._pyfuncitem.getparent(pytest.Class) - if x is not None: - return x - # fallback to function - return self._pyfuncitem - if scope == "module": - return self._pyfuncitem.getparent(pytest.Module) - raise ValueError("unknown finalization scope %r" %(scope,)) + node = get_scope_node(self._pyfuncitem, scope) + if node is None and scope == "class": + # fallback to function item itself + node = self._pyfuncitem + assert node + return node def __repr__(self): return "" %(self.node) @@ -1356,16 +1401,18 @@ class SubRequest(FixtureRequest): """ a sub request for handling getting a fixture from a test function/fixture. """ - def __init__(self, request, scope, param, fixturedef): + def __init__(self, request, scope, param, param_index, fixturedef): self._parent_request = request self.fixturename = fixturedef.argname if param is not NOTSET: self.param = param + self.param_index = param_index self.scope = scope self._fixturedef = fixturedef self.addfinalizer = fixturedef.addfinalizer self._pyfuncitem = request._pyfuncitem self._funcargs = request._funcargs + self._fixturedefs = request._fixturedefs self._arg2fixturedefs = request._arg2fixturedefs self._arg2index = request._arg2index self.fixturenames = request.fixturenames @@ -1380,8 +1427,7 @@ which has a lower scope (e.g. a Session one calls a function one) """ -scopes = "session module class function subfunction".split() -scopenum_subfunction = scopes.index("subfunction") +scopes = "session module class function".split() scopenum_function = scopes.index("function") def scopemismatch(currentscope, newscope): return scopes.index(newscope) > scopes.index(currentscope) @@ -1581,14 +1627,14 @@ if argname in arg2fixturedefs: continue fixturedefs = self.getfixturedefs(argname, parentid) - arg2fixturedefs[argname] = fixturedefs if fixturedefs: + arg2fixturedefs[argname] = fixturedefs merge(fixturedefs[-1].argnames) return fixturenames_closure, arg2fixturedefs def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: - faclist = metafunc._arg2fixturedefs[argname] + faclist = metafunc._arg2fixturedefs.get(argname) if faclist is None: continue # will raise FixtureLookupError at setup time for fixturedef in faclist: @@ -1600,38 +1646,6 @@ # separate parametrized setups items[:] = reorder_items(items, set(), {}, 0) - @pytest.mark.trylast - def pytest_runtest_teardown(self, item, nextitem): - # XXX teardown needs to be normalized for parametrized and - # no-parametrized functions - try: - cs1 = item.callspec - except AttributeError: - return - - # determine which fixtures are not needed anymore for the next test - keylist = [] - for name in cs1.params: - try: - if name in nextitem.callspec.params and \ - cs1.params[name] == nextitem.callspec.params[name]: - continue - except AttributeError: - pass - key = (-cs1._arg2scopenum[name], name, cs1.params[name]) - keylist.append(key) - - # sort by scope (function scope first, then higher ones) - keylist.sort() - for (scopenum, name, param) in keylist: - #if -scopenum >= scopenum_function: - # continue # handled by runner.pytest_runtest_teardown - item.session._setupstate._callfinalizers((name, param)) - l = self._arg2finish.pop(name, None) - if l is not None: - for fin in reversed(l): - fin() - def parsefactories(self, node_or_obj, nodeid=NOTSET, unittest=False): if nodeid is not NOTSET: holderobj = node_or_obj @@ -1693,16 +1707,6 @@ if nodeid.startswith(fixturedef.baseid): yield fixturedef - def addargfinalizer(self, finalizer, argname): - l = self._arg2finish.setdefault(argname, []) - l.append(finalizer) - - def removefinalizer(self, finalizer): - for l in self._arg2finish.values(): - try: - l.remove(finalizer) - except ValueError: - pass def fail_fixturefunc(fixturefunc, msg): fs, lineno = getfslineno(fixturefunc) @@ -1764,41 +1768,56 @@ while self._finalizer: func = self._finalizer.pop() func() - # check neccesity of next commented call - self._fixturemanager.removefinalizer(self.finish) try: del self.cached_result except AttributeError: pass def execute(self, request): + # get required arguments and register our own finish() + # with their finalization kwargs = {} - for newname in self.argnames: - kwargs[newname] = request.getfuncargvalue(newname) + for argname in self.argnames: + fixturedef = request._get_active_fixturedef(argname) + result, arg_cache_key = fixturedef.cached_result + kwargs[argname] = result + if argname != "request": + fixturedef.addfinalizer(self.finish) + + my_cache_key = request.param_index + cached_result = getattr(self, "cached_result", None) + if cached_result is not None: + #print argname, "Found cached_result", cached_result + #print argname, "param_index", param_index + result, cache_key = cached_result + if my_cache_key == cache_key: + #print request.fixturename, "CACHE HIT", repr(my_cache_key) + return result + #print request.fixturename, "CACHE MISS" + # we have a previous but differently parametrized fixture instance + # so we need to tear it down before creating a new one + self.finish() + assert not hasattr(self, "cached_result") + if self.unittest: result = self.func(request.instance, **kwargs) else: fixturefunc = self.func # the fixture function needs to be bound to the actual # request.instance so that code working with "self" behaves - # as expected. XXX request.instance should maybe return None - # instead of raising AttributeError - try: - if request.instance is not None: - fixturefunc = getimfunc(self.func) - if fixturefunc != self.func: - fixturefunc = fixturefunc.__get__(request.instance) - except AttributeError: - pass + # as expected. + if request.instance is not None: + fixturefunc = getimfunc(self.func) + if fixturefunc != self.func: + fixturefunc = fixturefunc.__get__(request.instance) result = call_fixture_func(fixturefunc, request, kwargs, self.yieldctx) - assert not hasattr(self, "cached_result") - self.cached_result = result + self.cached_result = (result, my_cache_key) return result def __repr__(self): - return ("" % - (self.argname, self.scope, self.baseid, self.func.__module__)) + return ("" % + (self.argname, self.scope, self.baseid)) def getfuncargnames(function, startindex=None): # XXX merge with main.py's varnames @@ -1910,3 +1929,15 @@ # we don't expect them to be fixture functions return None +scopename2class = { + 'class': Class, + 'module': Module, + 'function': pytest.Item, +} +def get_scope_node(node, scope): + cls = scopename2class.get(scope) + if cls is None: + if scope == "session": + return node.session + raise ValueError("unknown scope") + return node.getparent(cls) diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -334,7 +334,7 @@ def test_function(arg): assert arg.__class__.__name__ == "A" """) - reprec = testdir.inline_run() + reprec = testdir.inline_run("--fulltrace") reprec.assertoutcome(passed=1) def test_parametrize_with_non_hashable_values(self, testdir): diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1315,6 +1315,7 @@ l.append("step2-%d" % item) def test_finish(): + print (l) assert l == ["setup-1", "step1-1", "step2-1", "teardown-1", "setup-2", "step1-2", "step2-2", "teardown-2",] """) @@ -1683,23 +1684,22 @@ l.append("test3") def test_4(modarg, arg): l.append("test4") - def test_5(): - assert len(l) == 12 * 3 - expected = [ - 'create:1', 'test1', 'fin:1', 'create:2', 'test1', - 'fin:2', 'create:mod1', 'test2', 'create:1', 'test3', - 'fin:1', 'create:2', 'test3', 'fin:2', 'create:1', - 'test4', 'fin:1', 'create:2', 'test4', 'fin:2', - 'fin:mod1', 'create:mod2', 'test2', 'create:1', 'test3', - 'fin:1', 'create:2', 'test3', 'fin:2', 'create:1', - 'test4', 'fin:1', 'create:2', 'test4', 'fin:2', - 'fin:mod2'] - import pprint - pprint.pprint(list(zip(l, expected))) - assert l == expected """) reprec = testdir.inline_run("-v") - reprec.assertoutcome(passed=12+1) + reprec.assertoutcome(passed=12) + l = reprec.getcalls("pytest_runtest_call")[0].item.module.l + expected = [ + 'create:1', 'test1', 'fin:1', 'create:2', 'test1', + 'fin:2', 'create:mod1', 'test2', 'create:1', 'test3', + 'fin:1', 'create:2', 'test3', 'fin:2', 'create:1', + 'test4', 'fin:1', 'create:2', 'test4', 'fin:2', + 'fin:mod1', 'create:mod2', 'test2', 'create:1', 'test3', + 'fin:1', 'create:2', 'test3', 'fin:2', 'create:1', + 'test4', 'fin:1', 'create:2', 'test4', 'fin:2', + 'fin:mod2'] + import pprint + pprint.pprint(list(zip(l, expected))) + assert l == expected def test_parametrized_fixture_teardown_order(self, testdir): testdir.makepyfile(""" @@ -1855,7 +1855,6 @@ reprec.assertoutcome(passed=5) - @pytest.mark.xfail @pytest.mark.issue246 @pytest.mark.parametrize("scope", ["session", "function", "module"]) def test_finalizer_order_on_parametrization(self, scope, testdir): diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -193,8 +193,8 @@ metafunc.parametrize('y', [2]) def pytest_funcarg__x(request): return request.param * 10 - def pytest_funcarg__y(request): - return request.param + #def pytest_funcarg__y(request): + # return request.param def test_simple(x,y): assert x in (10,20) diff -r 74c6f671db35765fd4bfe51685a8ac015fd9ede7 -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 tox.ini --- a/tox.ini +++ b/tox.ini @@ -115,7 +115,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxs +addopts= -rxsX rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance 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 Sat Dec 7 16:41:52 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 15:41:52 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: radically simplify eq/neq with nodes by just using Pythons builtin "is" relationship. Message-ID: <20131207154152.28275.83868@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/852419a495f8/ Changeset: 852419a495f8 User: hpk42 Date: 2013-12-07 16:39:53 Summary: radically simplify eq/neq with nodes by just using Pythons builtin "is" relationship. The need for comparing two separately instantiated nodes seems to be historic (related to an already-gone mode of pytest-xdist which would re-collect nodes) and not actually needed anymore. Affected #: 3 files diff -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -272,21 +272,11 @@ self._nodeid = x = self._makeid() return x - def _makeid(self): return self.parent.nodeid + "::" + self.name - def __eq__(self, other): - if not isinstance(other, Node): - return False - return (self.__class__ == other.__class__ and - self.name == other.name and self.parent == other.parent) - - def __ne__(self, other): - return not self == other - def __hash__(self): - return hash((self.name, self.parent)) + return hash(self.nodeid) def setup(self): pass diff -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1087,24 +1087,6 @@ super(Function, self).setup() fillfixtures(self) - def __eq__(self, other): - try: - return (self.name == other.name and - self._args == other._args and - self.parent == other.parent and - self.obj == other.obj and - getattr(self, '_genid', None) == - getattr(other, '_genid', None) - ) - except AttributeError: - pass - return False - - def __ne__(self, other): - return not self == other - - def __hash__(self): - return hash((self.parent, self.name)) scope2props = dict(session=()) scope2props["module"] = ("fspath", "module") diff -r 25ca40a219a02a9451e7f9cb4c3273a41499f331 -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -287,22 +287,10 @@ pass f1 = pytest.Function(name="name", parent=session, config=config, args=(1,), callobj=func1) + assert f1 == f1 f2 = pytest.Function(name="name",config=config, - args=(1,), callobj=func2, parent=session) - assert not f1 == f2 + callobj=func2, parent=session) assert f1 != f2 - f3 = pytest.Function(name="name", parent=session, config=config, - args=(1,2), callobj=func2) - assert not f3 == f2 - assert f3 != f2 - - assert not f3 == f1 - assert f3 != f1 - - f1_b = pytest.Function(name="name", parent=session, config=config, - args=(1,), callobj=func1) - assert f1 == f1_b - assert not f1 != f1_b def test_issue197_parametrize_emptyset(self, testdir): testdir.makepyfile(""" 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 notifications at travis-ci.org Sat Dec 7 16:55:02 2013 From: notifications at travis-ci.org (Travis CI) Date: Sat, 07 Dec 2013 15:55:02 +0000 Subject: [Pytest-commit] [Broken] hpk42/pytest#54 (master - f0a52c7) Message-ID: <52a344d659d8_22a121798ae@21a039f9-066f-41ba-8d01-d51182a43584.mail> Build Update for hpk42/pytest ------------------------------------- Build: #54 Status: Broken Duration: 11 minutes and 53 seconds Commit: f0a52c7 (master) Author: holger krekel Message: radically simplify eq/neq with nodes by just using Pythons builtin "is" relationship. The need for comparing two separately instantiated nodes seems to be historic (related to an already-gone mode of pytest-xdist which would re-collect nodes) and not actually needed anymore. View the changeset: https://github.com/hpk42/pytest/compare/cd464c69e9b2...f0a52c71ed78 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15089575 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sat Dec 7 19:11:51 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 18:11:51 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: add a skip benchmark file (from issue400). Message-ID: <20131207181151.31848.29910@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/feedfaa045da/ Changeset: feedfaa045da User: hpk42 Date: 2013-12-07 19:11:37 Summary: add a skip benchmark file (from issue400). Affected #: 3 files diff -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 -r feedfaa045da026e0a382081bcf6b3a9a4120d47 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -193,7 +193,6 @@ outcome = "passed" longrepr = None else: - excinfo = call.excinfo if not isinstance(excinfo, py.code.ExceptionInfo): outcome = "failed" longrepr = excinfo diff -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 -r feedfaa045da026e0a382081bcf6b3a9a4120d47 bench/bench.py --- a/bench/bench.py +++ b/bench/bench.py @@ -3,8 +3,8 @@ import cProfile import py import pstats - stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof') + stats = cProfile.run('py.test.cmdline.main(["skip.py", ])', 'prof') p = pstats.Stats("prof") p.strip_dirs() p.sort_stats('cumulative') - print(p.print_stats(50)) + print(p.print_stats(250)) diff -r 852419a495f8de5bd75a5e486c6b1a5815f4cde1 -r feedfaa045da026e0a382081bcf6b3a9a4120d47 bench/skip.py --- /dev/null +++ b/bench/skip.py @@ -0,0 +1,10 @@ + +import pytest + + +SKIP = True + + at pytest.mark.parametrize("x", xrange(5000)) +def test_foo(x): + if SKIP: + pytest.skip("heh") 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 Sat Dec 7 19:31:38 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 18:31:38 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: refactor sorting wrt class-scopes. This fixes issue396 and also simplifies Message-ID: <20131207183138.16579.16404@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/2c3cb44dc734/ Changeset: 2c3cb44dc734 User: hpk42 Date: 2013-12-07 19:31:27 Summary: refactor sorting wrt class-scopes. This fixes issue396 and also simplifies the internal sorting algorithm a bit. Affected #: 2 files diff -r feedfaa045da026e0a382081bcf6b3a9a4120d47 -r 2c3cb44dc7349346c87353ced3c5dc4add769803 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,10 @@ hook and expecting certain fixture instances are torn down within (very unlikely and would have been unreliable anyway). +- fix issue290 - there is preliminary support now for parametrizing + with repeated same values (sometimes useful to to test if calling + a second time works as with the first time). + - fix issue246 (again) fix finalizer order to be LIFO on independent fixtures depending on a parametrized higher-than-function scoped fixture. (fix quite some effort so please bear with the complexity of this sentence :) diff -r feedfaa045da026e0a382081bcf6b3a9a4120d47 -r 2c3cb44dc7349346c87353ced3c5dc4add769803 testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -814,7 +814,7 @@ reprec.assertoutcome(passed=2, skipped=2) - @pytest.mark.xfail(reason="issue 290") + @pytest.mark.issue290 def test_parametrize_ID_generation_string_int_works(self, testdir): testdir.makepyfile(""" import pytest 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 Sat Dec 7 20:59:12 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 19:59:12 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix issue396 -- properly sort tests using class-scoped parametrization Message-ID: <20131207195912.10267.90771@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/2d6050084698/ Changeset: 2d6050084698 User: hpk42 Date: 2013-12-07 20:55:17 Summary: fix issue396 -- properly sort tests using class-scoped parametrization also refix issue323 in a better way to avoid recursion for the fixture-grouping algorithm alltogether. Affected #: 4 files diff -r 2c3cb44dc7349346c87353ced3c5dc4add769803 -r 2d60500846988334a64c2abe6f80ac44a0ea0085 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,15 @@ hook and expecting certain fixture instances are torn down within (very unlikely and would have been unreliable anyway). +- fix issue396 - correctly sort and finalize class-scoped parametrized + tests independently from number of methods on the class. + +- refix issue323 in a better way -- parametrization should now never + cause Runtime Recursion errors because the underlying algorithm + for re-ordering tests per-scope/per-fixture is not recursive + anymore (it was tail-call recursive before which could lead + to problems for more than >966 non-function scoped parameters). + - fix issue290 - there is preliminary support now for parametrizing with repeated same values (sometimes useful to to test if calling a second time works as with the first time). diff -r 2c3cb44dc7349346c87353ced3c5dc4add769803 -r 2d60500846988334a64c2abe6f80ac44a0ea0085 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1826,41 +1826,45 @@ # setups and teardowns def reorder_items(items, ignore, cache, scopenum): - if scopenum >= scopenum_function: + if scopenum >= scopenum_function or len(items) < 3: return items - if len(items) < 2: - return items - #print "\nparametrize_Sorted", items, ignore, cache, scopenum + items_done = [] + while 1: + items_before, items_same, items_other, newignore = \ + slice_items(items, ignore, cache, scopenum) + items_before = reorder_items(items_before, ignore, cache, scopenum+1) + if items_same is None: + # nothing to reorder in this scope + assert items_other is None + return items_done + items_before + items_done.extend(items_before) + items = items_same + items_other + ignore = newignore + +def slice_items(items, ignore, cache, scopenum): # we pick the first item which uses a fixture instance in the requested scope # and which we haven't seen yet. We slice the input items list into - # a list of items_nomatch, items_using_same_fixtureinstance and - # items_remaining + # a list of items_nomatch, items_same and items_other slicing_argkey = None for i, item in enumerate(items): argkeys = get_parametrized_fixture_keys(item, ignore, scopenum, cache) if slicing_argkey is None: if argkeys: slicing_argkey = argkeys.pop() - items_using_same_fixtureinstance = [item] - items_nomatch = items[:i] - items_remaining = [] + items_before = items[:i] + items_same = [item] + items_other = [] continue if slicing_argkey in argkeys: - items_using_same_fixtureinstance.append(item) + items_same.append(item) else: - items_remaining.append(item) - - if slicing_argkey is None or len(items_using_same_fixtureinstance) == 1: - # nothing to sort on this level - return reorder_items(items, ignore, cache, scopenum+1) - - items_nomatch = reorder_items(items_nomatch, ignore, cache, scopenum+1) + items_other.append(item) + if slicing_argkey is None: + return items, None, None, None newignore = ignore.copy() newignore.add(slicing_argkey) - part2 = reorder_items(items_using_same_fixtureinstance + items_remaining, - newignore, cache, scopenum) - return items_nomatch + part2 + return (items_before, items_same, items_other, newignore) def get_parametrized_fixture_keys(item, ignore, scopenum, cache): """ return list of keys for all parametrized arguments which match @@ -1882,13 +1886,14 @@ elif scopenum == 1: # module key = (argname, param_index, item.fspath) elif scopenum == 2: # class + # enumerate classes per fspath l = cache.setdefault(item.fspath, []) try: - i = l.index(item.cls) + numclass = l.index(item.cls) except ValueError: - i = len(l) + numclass = len(l) l.append(item.cls) - key = (argname, param_index, item.fspath, i) + key = (argname, param_index, item.fspath, item.cls) if key not in ignore: keys.add(key) return keys diff -r 2c3cb44dc7349346c87353ced3c5dc4add769803 -r 2d60500846988334a64c2abe6f80ac44a0ea0085 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1889,6 +1889,34 @@ reprec = testdir.inline_run("-lvs") reprec.assertoutcome(passed=3) + @pytest.mark.issue396 + def test_class_scope_parametrization_ordering(self, testdir): + testdir.makepyfile(""" + import pytest + l = [] + @pytest.fixture(params=["John", "Doe"], scope="class") + def human(request): + request.addfinalizer(lambda: l.append("fin %s" % request.param)) + return request.param + + class TestGreetings: + def test_hello(self, human): + l.append("test_hello") + + class TestMetrics: + def test_name(self, human): + l.append("test_name") + + def test_population(self, human): + l.append("test_population") + """) + reprec = testdir.inline_run() + reprec.assertoutcome(passed=6) + l = reprec.getcalls("pytest_runtest_call")[0].item.module.l + assert l == ["test_hello", "fin John", "test_hello", "fin Doe", + "test_name", "test_population", "fin John", + "test_name", "test_population", "fin Doe"] + def test_parametrize_setup_function(self, testdir): testdir.makepyfile(""" import pytest diff -r 2c3cb44dc7349346c87353ced3c5dc4add769803 -r 2d60500846988334a64c2abe6f80ac44a0ea0085 testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -592,6 +592,8 @@ def test_it(foo): pass + def test_it2(foo): + pass """) reprec = testdir.inline_run("--collect-only") assert not reprec.getcalls("pytest_internalerror") 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 Sat Dec 7 21:00:40 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 07 Dec 2013 20:00:40 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: remove unused cache argument for re-ordering items. Message-ID: <20131207200040.7449.79402@app18.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/fb2e642e27d1/ Changeset: fb2e642e27d1 User: hpk42 Date: 2013-12-07 21:00:33 Summary: remove unused cache argument for re-ordering items. Affected #: 1 file diff -r 2d60500846988334a64c2abe6f80ac44a0ea0085 -r fb2e642e27d18b1aadfda9500742711f0feb6001 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1626,7 +1626,7 @@ def pytest_collection_modifyitems(self, items): # separate parametrized setups - items[:] = reorder_items(items, set(), {}, 0) + items[:] = reorder_items(items, set(), 0) def parsefactories(self, node_or_obj, nodeid=NOTSET, unittest=False): if nodeid is not NOTSET: @@ -1825,14 +1825,14 @@ # down to the lower scopes such as to minimize number of "high scope" # setups and teardowns -def reorder_items(items, ignore, cache, scopenum): +def reorder_items(items, ignore, scopenum): if scopenum >= scopenum_function or len(items) < 3: return items items_done = [] while 1: items_before, items_same, items_other, newignore = \ - slice_items(items, ignore, cache, scopenum) - items_before = reorder_items(items_before, ignore, cache, scopenum+1) + slice_items(items, ignore, scopenum) + items_before = reorder_items(items_before, ignore, scopenum+1) if items_same is None: # nothing to reorder in this scope assert items_other is None @@ -1842,13 +1842,13 @@ ignore = newignore -def slice_items(items, ignore, cache, scopenum): +def slice_items(items, ignore, scopenum): # we pick the first item which uses a fixture instance in the requested scope # and which we haven't seen yet. We slice the input items list into # a list of items_nomatch, items_same and items_other slicing_argkey = None for i, item in enumerate(items): - argkeys = get_parametrized_fixture_keys(item, ignore, scopenum, cache) + argkeys = get_parametrized_fixture_keys(item, ignore, scopenum) if slicing_argkey is None: if argkeys: slicing_argkey = argkeys.pop() @@ -1866,7 +1866,7 @@ newignore.add(slicing_argkey) return (items_before, items_same, items_other, newignore) -def get_parametrized_fixture_keys(item, ignore, scopenum, cache): +def get_parametrized_fixture_keys(item, ignore, scopenum): """ return list of keys for all parametrized arguments which match the specified scope. """ assert scopenum < scopenum_function # function @@ -1886,13 +1886,6 @@ elif scopenum == 1: # module key = (argname, param_index, item.fspath) elif scopenum == 2: # class - # enumerate classes per fspath - l = cache.setdefault(item.fspath, []) - try: - numclass = l.index(item.cls) - except ValueError: - numclass = len(l) - l.append(item.cls) key = (argname, param_index, item.fspath, item.cls) if key not in ignore: keys.add(key) 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 Sun Dec 8 20:19:41 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 08 Dec 2013 19:19:41 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20131208191941.25071.27137@app18.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/d271a9134e66/ Changeset: d271a9134e66 Branch: color_option User: Marc Abramowitz Date: 2013-12-06 20:49:48 Summary: Add option: --color=(yes/no/auto) Affected #: 2 files diff -r 1338c1ed28ffbeda49a7a9dbf983de8b569f52db -r d271a9134e660c05565df8715adefa85d8282a24 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -29,6 +29,10 @@ group._addoption('--fulltrace', '--full-trace', action="store_true", default=False, help="don't cut any tracebacks (default is to cut).") + group._addoption('--color', metavar="color", + action="store", dest="color", default='auto', + choices=['yes', 'no', 'auto'], + help="color output (yes/no/auto).") def pytest_configure(config): config.option.verbose -= config.option.quiet @@ -85,6 +89,10 @@ if file is None: file = py.std.sys.stdout self._tw = self.writer = py.io.TerminalWriter(file) + if self.config.option.color == 'yes': + self._tw.hasmarkup = True + if self.config.option.color == 'no': + self._tw.hasmarkup = False self.currentfspath = None self.reportchars = getreportopt(config) self.hasmarkup = self._tw.hasmarkup diff -r 1338c1ed28ffbeda49a7a9dbf983de8b569f52db -r d271a9134e660c05565df8715adefa85d8282a24 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1,6 +1,7 @@ """ terminal reporting of the full testing process. """ +import os import pytest, py import sys @@ -497,6 +498,18 @@ result = testdir.runpytest('-rf') assert 'short test summary' not in result.stdout.str() +def test_color_yes(testdir, monkeypatch): + testdir.makepyfile("def test_this(): assert 1") + result = testdir.runpytest('--color=yes') + assert 'short test summary' not in result.stdout.str() + assert u'\x1b[1m' in result.stdout.str() + +def test_color_no(testdir): + testdir.makepyfile("def test_this(): assert 1") + result = testdir.runpytest('--color=no') + assert 'short test summary' not in result.stdout.str() + assert u'\x1b[1m' not in result.stdout.str() + def test_getreportopt(): class config: class option: https://bitbucket.org/hpk42/pytest/commits/2cd2f8396739/ Changeset: 2cd2f8396739 Branch: color_option User: Marc Abramowitz Date: 2013-12-06 20:58:04 Summary: Assert 'test session starts' in output for test_color_{yes,no} Affected #: 1 file diff -r d271a9134e660c05565df8715adefa85d8282a24 -r 2cd2f83967394c3c8b99a305b48510a24a9927c0 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -501,13 +501,13 @@ def test_color_yes(testdir, monkeypatch): testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=yes') - assert 'short test summary' not in result.stdout.str() + assert 'test session starts' in result.stdout.str() assert u'\x1b[1m' in result.stdout.str() def test_color_no(testdir): testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=no') - assert 'short test summary' not in result.stdout.str() + assert 'test session starts' in result.stdout.str() assert u'\x1b[1m' not in result.stdout.str() def test_getreportopt(): https://bitbucket.org/hpk42/pytest/commits/f3943e55acb4/ Changeset: f3943e55acb4 Branch: color_option User: Marc Abramowitz Date: 2013-12-07 21:04:23 Summary: Remove superfluous `monkeypatch` arg to test_color_yes Affected #: 1 file diff -r 2cd2f83967394c3c8b99a305b48510a24a9927c0 -r f3943e55acb475af23150b573b9af79eace4d859 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -498,7 +498,7 @@ result = testdir.runpytest('-rf') assert 'short test summary' not in result.stdout.str() -def test_color_yes(testdir, monkeypatch): +def test_color_yes(testdir): testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=yes') assert 'test session starts' in result.stdout.str() https://bitbucket.org/hpk42/pytest/commits/29c532557679/ Changeset: 29c532557679 User: hpk42 Date: 2013-12-08 20:19:37 Summary: Merged in msabramo/pytest/color_option (pull request #90) Add option: --color=(yes/no/auto) Affected #: 2 files diff -r fb2e642e27d18b1aadfda9500742711f0feb6001 -r 29c532557679f99a52a8702ad7543c79747b2c0c _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -29,6 +29,10 @@ group._addoption('--fulltrace', '--full-trace', action="store_true", default=False, help="don't cut any tracebacks (default is to cut).") + group._addoption('--color', metavar="color", + action="store", dest="color", default='auto', + choices=['yes', 'no', 'auto'], + help="color output (yes/no/auto).") def pytest_configure(config): config.option.verbose -= config.option.quiet @@ -85,6 +89,10 @@ if file is None: file = py.std.sys.stdout self._tw = self.writer = py.io.TerminalWriter(file) + if self.config.option.color == 'yes': + self._tw.hasmarkup = True + if self.config.option.color == 'no': + self._tw.hasmarkup = False self.currentfspath = None self.reportchars = getreportopt(config) self.hasmarkup = self._tw.hasmarkup diff -r fb2e642e27d18b1aadfda9500742711f0feb6001 -r 29c532557679f99a52a8702ad7543c79747b2c0c testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1,6 +1,7 @@ """ terminal reporting of the full testing process. """ +import os import pytest, py import sys @@ -497,6 +498,18 @@ result = testdir.runpytest('-rf') assert 'short test summary' not in result.stdout.str() +def test_color_yes(testdir): + testdir.makepyfile("def test_this(): assert 1") + result = testdir.runpytest('--color=yes') + assert 'test session starts' in result.stdout.str() + assert u'\x1b[1m' in result.stdout.str() + +def test_color_no(testdir): + testdir.makepyfile("def test_this(): assert 1") + result = testdir.runpytest('--color=no') + assert 'test session starts' in result.stdout.str() + assert u'\x1b[1m' not in result.stdout.str() + def test_getreportopt(): class config: class option: 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 Sun Dec 8 20:25:42 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 08 Dec 2013 19:25:42 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: add changelog entry: PR90: add --color=yes|no|auto option to force terminal coloring Message-ID: <20131208192542.1466.53@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/31f89c6b25d6/ Changeset: 31f89c6b25d6 User: hpk42 Date: 2013-12-08 20:25:36 Summary: add changelog entry: PR90: add --color=yes|no|auto option to force terminal coloring mode ("auto" is default). Thanks Marc Abramowitz. Affected #: 3 files diff -r 29c532557679f99a52a8702ad7543c79747b2c0c -r 31f89c6b25d63db5e81582529e787f8b93838260 AUTHORS --- a/AUTHORS +++ b/AUTHORS @@ -35,3 +35,4 @@ Katarzyna Jachim Christian Theunert Anthon van der Neut +Mark Abramowitz diff -r 29c532557679f99a52a8702ad7543c79747b2c0c -r 31f89c6b25d63db5e81582529e787f8b93838260 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,9 @@ hook and expecting certain fixture instances are torn down within (very unlikely and would have been unreliable anyway). +- PR90: add --color=yes|no|auto option to force terminal coloring + mode ("auto" is default). Thanks Marc Abramowitz. + - fix issue396 - correctly sort and finalize class-scoped parametrized tests independently from number of methods on the class. diff -r 29c532557679f99a52a8702ad7543c79747b2c0c -r 31f89c6b25d63db5e81582529e787f8b93838260 _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -32,7 +32,7 @@ group._addoption('--color', metavar="color", action="store", dest="color", default='auto', choices=['yes', 'no', 'auto'], - help="color output (yes/no/auto).") + help="color terminal output (yes/no/auto).") def pytest_configure(config): config.option.verbose -= config.option.quiet 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 Sun Dec 8 20:56:25 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 08 Dec 2013 19:56:25 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131208195625.31944.20946@app03.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/7c523d635448/ Changeset: 7c523d635448 Branch: color_option User: Marc Abramowitz Date: 2013-12-08 20:39:55 Summary: Remove u'' literal in test_color_{yes,no} for Python 3.2 compat Affected #: 1 file diff -r f3943e55acb475af23150b573b9af79eace4d859 -r 7c523d63544881cabcf94ad28a8f04c80350bcda testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -502,13 +502,13 @@ testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=yes') assert 'test session starts' in result.stdout.str() - assert u'\x1b[1m' in result.stdout.str() + assert '\x1b[1m' in result.stdout.str() def test_color_no(testdir): testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=no') assert 'test session starts' in result.stdout.str() - assert u'\x1b[1m' not in result.stdout.str() + assert '\x1b[1m' not in result.stdout.str() def test_getreportopt(): class config: https://bitbucket.org/hpk42/pytest/commits/cb8469dd75dd/ Changeset: cb8469dd75dd User: hpk42 Date: 2013-12-08 20:56:21 Summary: Merged in msabramo/pytest/color_option (pull request #91) Remove u'' literal in test_color_{yes,no} for Python 3.2 compat Affected #: 1 file diff -r 31f89c6b25d63db5e81582529e787f8b93838260 -r cb8469dd75ddbd0556e0b5454e81cef9b77bb47b testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -502,13 +502,13 @@ testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=yes') assert 'test session starts' in result.stdout.str() - assert u'\x1b[1m' in result.stdout.str() + assert '\x1b[1m' in result.stdout.str() def test_color_no(testdir): testdir.makepyfile("def test_this(): assert 1") result = testdir.runpytest('--color=no') assert 'test session starts' in result.stdout.str() - assert u'\x1b[1m' not in result.stdout.str() + assert '\x1b[1m' not in result.stdout.str() def test_getreportopt(): class config: 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 Mon Dec 9 10:06:06 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Dec 2013 09:06:06 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20131209090606.10193.29817@app03.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/24d0a5d5a75e/ Changeset: 24d0a5d5a75e User: hpk42 Date: 2013-12-09 07:07:47 Summary: backout allowing @pytest.fixture in front of pytest_funcarg__NAME functions. It was introduced because of pylint warnings and it's probably better to go for a pylint-pytest plugin that avoids also other warnings/issues. Affected #: 3 files diff -r cb8469dd75ddbd0556e0b5454e81cef9b77bb47b -r 24d0a5d5a75eed225817178fb48fde78f9537854 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -122,9 +122,6 @@ - fix verbose reporting for @mock'd test functions -- allow @pytest.fixture marked pytest_funcarg__foo functions - so that pylint errors can be avoided. - Changes between 2.4.1 and 2.4.2 ----------------------------------- diff -r cb8469dd75ddbd0556e0b5454e81cef9b77bb47b -r 24d0a5d5a75eed225817178fb48fde78f9537854 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1654,9 +1654,8 @@ # magic globals with __getattr__ might have got us a wrong # fixture attribute continue - elif name.startswith(self._argprefix): - # let's allso fixture-marked pytest_funcarg__ prefixed functions - name = name[len(self._argprefix):] + else: + assert not name.startswith(self._argprefix) fixturedef = FixtureDef(self, nodeid, name, obj, marker.scope, marker.params, yieldctx=marker.yieldctx, diff -r cb8469dd75ddbd0556e0b5454e81cef9b77bb47b -r 24d0a5d5a75eed225817178fb48fde78f9537854 testing/python/integration.py --- a/testing/python/integration.py +++ b/testing/python/integration.py @@ -195,16 +195,3 @@ def test_pytestconfig_is_session_scoped(): from _pytest.python import pytestconfig assert pytestconfig._pytestfixturefunction.scope == "session" - -def test_funcarg_prefix_and_marker(testdir): - testdir.makepyfile(""" - import pytest - @pytest.fixture - def pytest_funcarg__foo(): - return 1 - - def test_hello(foo): - assert foo == 1 - """) - reprec = testdir.inline_run() - reprec.assertoutcome(passed=1) https://bitbucket.org/hpk42/pytest/commits/b164af9ab582/ Changeset: b164af9ab582 User: hpk42 Date: 2013-12-09 08:14:39 Summary: speed up a test Affected #: 1 file diff -r 24d0a5d5a75eed225817178fb48fde78f9537854 -r b164af9ab582b7db2884d7edf9520ccfc4cc0d37 testing/test_core.py --- a/testing/test_core.py +++ b/testing/test_core.py @@ -340,10 +340,8 @@ assert hello == "world" assert 'hello' in py.test.__all__ """) - result = testdir.runpytest(p) - result.stdout.fnmatch_lines([ - "*1 passed*" - ]) + reprec = testdir.inline_run(p) + reprec.assertoutcome(passed=1) def test_do_option_postinitialize(self, testdir): config = testdir.parseconfigure() https://bitbucket.org/hpk42/pytest/commits/f5b569604b07/ Changeset: f5b569604b07 User: hpk42 Date: 2013-12-09 08:14:58 Summary: make bench.py accept an optional script name and add a slow "manyparam" test Affected #: 2 files diff -r b164af9ab582b7db2884d7edf9520ccfc4cc0d37 -r f5b569604b076759be36b9a57a623d1a9080178d bench/bench.py --- a/bench/bench.py +++ b/bench/bench.py @@ -1,9 +1,11 @@ +import sys if __name__ == '__main__': import cProfile import py import pstats - stats = cProfile.run('py.test.cmdline.main(["skip.py", ])', 'prof') + script = sys.argv[1] if len(sys.argv) > 1 else "empty.py" + stats = cProfile.run('py.test.cmdline.main([%r])' % script, 'prof') p = pstats.Stats("prof") p.strip_dirs() p.sort_stats('cumulative') diff -r b164af9ab582b7db2884d7edf9520ccfc4cc0d37 -r f5b569604b076759be36b9a57a623d1a9080178d bench/manyparam.py --- /dev/null +++ b/bench/manyparam.py @@ -0,0 +1,12 @@ + +import pytest + + at pytest.fixture(scope='module', params=range(966)) +def foo(request): + return request.param + +def test_it(foo): + pass +def test_it2(foo): + pass + https://bitbucket.org/hpk42/pytest/commits/0017064cd599/ Changeset: 0017064cd599 User: hpk42 Date: 2013-12-09 10:05:44 Summary: speed up reorder for large higher-than-function-scoped parametrizations Affected #: 1 file diff -r f5b569604b076759be36b9a57a623d1a9080178d -r 0017064cd59995049af1ea0b8ae166527cea9720 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1626,7 +1626,7 @@ def pytest_collection_modifyitems(self, items): # separate parametrized setups - items[:] = reorder_items(items, set(), 0) + items[:] = reorder_items(items) def parsefactories(self, node_or_obj, nodeid=NOTSET, unittest=False): if nodeid is not NOTSET: @@ -1824,14 +1824,25 @@ # down to the lower scopes such as to minimize number of "high scope" # setups and teardowns -def reorder_items(items, ignore, scopenum): +def reorder_items(items): + argkeys_cache = {} + for scopenum in range(0, scopenum_function): + argkeys_cache[scopenum] = d = {} + for item in items: + keys = set(get_parametrized_fixture_keys(item, scopenum)) + if keys: + d[item] = keys + return reorder_items_atscope(items, set(), argkeys_cache, 0) + +def reorder_items_atscope(items, ignore, argkeys_cache, scopenum): if scopenum >= scopenum_function or len(items) < 3: return items items_done = [] while 1: items_before, items_same, items_other, newignore = \ - slice_items(items, ignore, scopenum) - items_before = reorder_items(items_before, ignore, scopenum+1) + slice_items(items, ignore, argkeys_cache[scopenum]) + items_before = reorder_items_atscope( + items_before, ignore, argkeys_cache,scopenum+1) if items_same is None: # nothing to reorder in this scope assert items_other is None @@ -1841,54 +1852,58 @@ ignore = newignore -def slice_items(items, ignore, scopenum): - # we pick the first item which uses a fixture instance in the requested scope - # and which we haven't seen yet. We slice the input items list into - # a list of items_nomatch, items_same and items_other - slicing_argkey = None - for i, item in enumerate(items): - argkeys = get_parametrized_fixture_keys(item, ignore, scopenum) - if slicing_argkey is None: - if argkeys: - slicing_argkey = argkeys.pop() - items_before = items[:i] - items_same = [item] - items_other = [] - continue - if slicing_argkey in argkeys: - items_same.append(item) - else: - items_other.append(item) - if slicing_argkey is None: - return items, None, None, None - newignore = ignore.copy() - newignore.add(slicing_argkey) - return (items_before, items_same, items_other, newignore) +def slice_items(items, ignore, scoped_argkeys_cache): + # we pick the first item which uses a fixture instance in the + # requested scope and which we haven't seen yet. We slice the input + # items list into a list of items_nomatch, items_same and + # items_other + if scoped_argkeys_cache: # do we need to do work at all? + it = iter(items) + # first find a slicing key + for i, item in enumerate(it): + argkeys = scoped_argkeys_cache.get(item) + if argkeys is not None: + argkeys = argkeys.difference(ignore) + if argkeys: # found a slicing key + slicing_argkey = argkeys.pop() + items_before = items[:i] + items_same = [item] + items_other = [] + # now slice the remainder of the list + for item in it: + argkeys = scoped_argkeys_cache.get(item) + if argkeys and slicing_argkey in argkeys and \ + slicing_argkey not in ignore: + items_same.append(item) + else: + items_other.append(item) + newignore = ignore.copy() + newignore.add(slicing_argkey) + return (items_before, items_same, items_other, newignore) + return items, None, None, None -def get_parametrized_fixture_keys(item, ignore, scopenum): +def get_parametrized_fixture_keys(item, scopenum): """ return list of keys for all parametrized arguments which match the specified scope. """ assert scopenum < scopenum_function # function - keys = set() try: cs = item.callspec except AttributeError: - return keys # no parametrization on this item - # cs.indictes.items() is random order of argnames but - # then again different functions (items) can change order of - # arguments so it doesn't matter much probably - for argname, param_index in cs.indices.items(): - if cs._arg2scopenum[argname] != scopenum: - continue - if scopenum == 0: # session - key = (argname, param_index) - elif scopenum == 1: # module - key = (argname, param_index, item.fspath) - elif scopenum == 2: # class - key = (argname, param_index, item.fspath, item.cls) - if key not in ignore: - keys.add(key) - return keys + pass + else: + # cs.indictes.items() is random order of argnames but + # then again different functions (items) can change order of + # arguments so it doesn't matter much probably + for argname, param_index in cs.indices.items(): + if cs._arg2scopenum[argname] != scopenum: + continue + if scopenum == 0: # session + key = (argname, param_index) + elif scopenum == 1: # module + key = (argname, param_index, item.fspath) + elif scopenum == 2: # class + key = (argname, param_index, item.fspath, item.cls) + yield key def xunitsetup(obj, name): 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 Mon Dec 9 10:50:16 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Dec 2013 09:50:16 -0000 Subject: [Pytest-commit] commit/pytest: 3 new changesets Message-ID: <20131209095016.15306.6814@app03.ash-private.bitbucket.org> 3 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/afe429ed8605/ Changeset: afe429ed8605 User: hpk42 Date: 2013-12-09 10:38:40 Summary: fix changelog Affected #: 1 file diff -r 0017064cd59995049af1ea0b8ae166527cea9720 -r afe429ed860586910bbb1d166ac6a71bdf9418e5 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -26,9 +26,10 @@ with repeated same values (sometimes useful to to test if calling a second time works as with the first time). -- fix issue246 (again) fix finalizer order to be LIFO on independent fixtures +- fix issue246 fix finalizer order to be LIFO on independent fixtures depending on a parametrized higher-than-function scoped fixture. - (fix quite some effort so please bear with the complexity of this sentence :) + (was quite some effort so please bear with the complexity of this sentence :) + Thanks Ralph Schmitt for the precise failure example. - fix issue244 by implementing special index for parameters to only use indices for paramentrized test ids @@ -54,10 +55,6 @@ since the unittest compat enhancements allow trial to handle it on its own -- fix ordering of finalizers of parametrized interdependent fixtures. - This fixes issue246 as reported. Thanks Ralph Schmitt for the - precise failure example. - - don't hide an ImportError when importing a plugin produces one. fixes issue375. https://bitbucket.org/hpk42/pytest/commits/2b93666c0e22/ Changeset: 2b93666c0e22 User: hpk42 Date: 2013-12-09 10:40:39 Summary: some minor internal cleanup Affected #: 2 files diff -r afe429ed860586910bbb1d166ac6a71bdf9418e5 -r 2b93666c0e22329a93acb4afd5b324f6e3136a86 _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -16,8 +16,7 @@ initialization. """ config = _prepareconfig(args, plugins) - exitstatus = config.hook.pytest_cmdline_main(config=config) - return exitstatus + return config.hook.pytest_cmdline_main(config=config) class cmdline: # compatibility namespace main = staticmethod(main) diff -r afe429ed860586910bbb1d166ac6a71bdf9418e5 -r 2b93666c0e22329a93acb4afd5b324f6e3136a86 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1661,15 +1661,15 @@ yieldctx=marker.yieldctx, unittest=unittest) faclist = self._arg2fixturedefs.setdefault(name, []) - if not fixturedef.has_location: - # All fixturedefs with no location are at the front + if fixturedef.has_location: + faclist.append(fixturedef) + else: + # fixturedefs with no location are at the front # so this inserts the current fixturedef after the # existing fixturedefs from external plugins but # before the fixturedefs provided in conftests. i = len([f for f in faclist if not f.has_location]) - else: - i = len(faclist) # append - faclist.insert(i, fixturedef) + faclist.insert(i, fixturedef) if marker.autouse: autousenames.append(name) if autousenames: https://bitbucket.org/hpk42/pytest/commits/e2bfc7bfd1a2/ Changeset: e2bfc7bfd1a2 User: hpk42 Date: 2013-12-09 10:48:15 Summary: address issue122 -- explode "params" into a list in fixture function decorators Affected #: 3 files diff -r 2b93666c0e22329a93acb4afd5b324f6e3136a86 -r e2bfc7bfd1a2e5509d064a26383fb5b0fbfe643c CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -64,6 +64,9 @@ - fix issue380 by making --resultlog only rely on longrepr instead of the "reprcrash" attribute which only exists sometimes. +- address issue122: allow @pytest.fixture(params=iterator) by exploding + into a list early on. + - fix pexpect-3.0 compatibility for pytest's own tests. (fixes issue386) diff -r 2b93666c0e22329a93acb4afd5b324f6e3136a86 -r e2bfc7bfd1a2e5509d064a26383fb5b0fbfe643c _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -76,8 +76,9 @@ # direct decoration return FixtureFunctionMarker( "function", params, autouse)(scope) - else: - return FixtureFunctionMarker(scope, params, autouse) + if params is not None and not isinstance(params, (list, tuple)): + params = list(params) + return FixtureFunctionMarker(scope, params, autouse) def yield_fixture(scope="function", params=None, autouse=False): """ (return a) decorator to mark a yield-fixture factory function diff -r 2b93666c0e22329a93acb4afd5b324f6e3136a86 -r e2bfc7bfd1a2e5509d064a26383fb5b0fbfe643c testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -914,6 +914,34 @@ reprec = testdir.inline_run() reprec.assertoutcome(passed=1) + def test_fixture_parametrized_with_iterator(self, testdir): + testdir.makepyfile(""" + import pytest + + l = [] + def f(): + yield 1 + yield 2 + dec = pytest.fixture(scope="module", params=f()) + + @dec + def arg(request): + return request.param + @dec + def arg2(request): + return request.param + + def test_1(arg): + l.append(arg) + def test_2(arg2): + l.append(arg2*10) + """) + reprec = testdir.inline_run("-v") + reprec.assertoutcome(passed=4) + l = reprec.getcalls("pytest_runtest_call")[0].item.module.l + assert l == [1,2, 10,20] + + class TestFixtureManagerParseFactories: def pytest_funcarg__testdir(self, request): testdir = request.getfuncargvalue("testdir") 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 Mon Dec 9 14:02:35 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Dec 2013 13:02:35 -0000 Subject: [Pytest-commit] commit/tox: 3 new changesets Message-ID: <20131209130235.9007.442@app03.ash-private.bitbucket.org> 3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/9e2e759d7f1e/ Changeset: 9e2e759d7f1e Branch: bug/period_pkg_name User: mattjeffery Date: 2013-12-09 13:17:58 Summary: Created new branch bug/period_pkg_name Affected #: 0 files https://bitbucket.org/hpk42/tox/commits/b1292f426a70/ Changeset: b1292f426a70 Branch: bug/period_pkg_name User: mattjeffery Date: 2013-12-09 13:20:04 Summary: Correctly determine the package version if the package file name contains a period before the version number. Affected #: 1 file diff -r 9e2e759d7f1e2ff555bc8fd2150e29761d6eab86 -r b1292f426a70e89c764def0bc9dbe76dedefd6b1 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -557,7 +557,7 @@ return candidates[0] -_rex_getversion = py.std.re.compile("[\w_\-\+]+-(.*)(\.zip|\.tar.gz)") +_rex_getversion = py.std.re.compile("[\w_\-\+\.]+-(.*)(\.zip|\.tar.gz)") def getversion(basename): m = _rex_getversion.match(basename) if m is None: https://bitbucket.org/hpk42/tox/commits/90f72914b4fe/ Changeset: 90f72914b4fe User: hpk42 Date: 2013-12-09 14:02:31 Summary: Merged in mattjeffery/tox/bug/period_pkg_name (pull request #82) Correctly determine the package version if the package file name contains a period before the version number. Affected #: 1 file diff -r 7d8976da0b000e0d36ef61545c0f779bb9fe4c09 -r 90f72914b4fed54a33cb1784ca3b8f9876c8cabe tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -557,7 +557,7 @@ return candidates[0] -_rex_getversion = py.std.re.compile("[\w_\-\+]+-(.*)(\.zip|\.tar.gz)") +_rex_getversion = py.std.re.compile("[\w_\-\+\.]+-(.*)(\.zip|\.tar.gz)") def getversion(basename): m = _rex_getversion.match(basename) if m is None: 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 Mon Dec 9 14:47:13 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Dec 2013 13:47:13 -0000 Subject: [Pytest-commit] commit/tox: 3 new changesets Message-ID: <20131209134713.7966.21840@app03.ash-private.bitbucket.org> 3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/1decacf80bc9/ Changeset: 1decacf80bc9 User: hpk42 Date: 2013-11-27 17:16:28 Summary: clarify we want test dependencies, not app dependencies. Affected #: 1 file diff -r 7d8976da0b000e0d36ef61545c0f779bb9fe4c09 -r 1decacf80bc97c2f177a10439b5c1c95964fcef5 tox/_quickstart.py --- a/tox/_quickstart.py +++ b/tox/_quickstart.py @@ -56,7 +56,7 @@ term_input = input -all_envs = ['py24', 'py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 'pypy', 'jython'] +all_envs = ['py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 'pypy', 'jython'] PROMPT_PREFIX = '> ' @@ -191,7 +191,7 @@ default_deps = 'twisted' print(''' -What dependencies does your project have?''') +What extra dependencies do your tests have?''') do_prompt(d, 'deps', 'Comma-separated list of dependencies', default_deps) https://bitbucket.org/hpk42/tox/commits/7744bc22f8e4/ Changeset: 7744bc22f8e4 User: hpk42 Date: 2013-12-09 14:02:49 Summary: merge Affected #: 1 file diff -r 1decacf80bc97c2f177a10439b5c1c95964fcef5 -r 7744bc22f8e499fa984d572bcfcf26462a83e037 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -557,7 +557,7 @@ return candidates[0] -_rex_getversion = py.std.re.compile("[\w_\-\+]+-(.*)(\.zip|\.tar.gz)") +_rex_getversion = py.std.re.compile("[\w_\-\+\.]+-(.*)(\.zip|\.tar.gz)") def getversion(basename): m = _rex_getversion.match(basename) if m is None: https://bitbucket.org/hpk42/tox/commits/df22328d1c85/ Changeset: df22328d1c85 User: hpk42 Date: 2013-12-09 14:33:46 Summary: drop Python2.5 compatibility because it became too hard due to the setuptools-2.0 dropping support. tox now has no support for creating python2.5 virtualenv environments anymore. Affected #: 10 files diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ 1.6.2.dev --------- +- drop Python2.5 compatibility because it became too hard due + to the setuptools-2.0 dropping support. tox now has no + support for creating python2.5 virtualenv environments anymore. + - merged PR81: new option --force-dep which allows to override tox.ini specified dependencies in setuptools-style. For example "--force-dep 'django<1.6'" will make sure diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -546,36 +546,6 @@ assert envconfig.changedir.basename == "abc" assert envconfig.changedir == config.setupdir.join("abc") - def test_install_command_defaults_py25(self, newconfig, monkeypatch): - from tox.interpreters import Interpreters - def get_info(self, name): - if "x25" in name: - class I: - runnable = True - executable = "python2.5" - version_info = (2,5) - else: - class I: - runnable = False - executable = "python" - return I - monkeypatch.setattr(Interpreters, "get_info", get_info) - config = newconfig(""" - [testenv:x25] - basepython = x25 - [testenv:py25-x] - basepython = x25 - [testenv:py26] - basepython = "python" - """) - for name in ("x25", "py25-x"): - env = config.envconfigs[name] - assert env.install_command == \ - "pip install {opts} {packages}".split() - env = config.envconfigs["py26"] - assert env.install_command == \ - "pip install --pre {opts} {packages}".split() - def test_install_command_setting(self, newconfig): config = newconfig(""" [testenv] @@ -629,14 +599,14 @@ def test_simple(tmpdir, newconfig): config = newconfig(""" - [testenv:py24] - basepython=python2.4 - [testenv:py25] - basepython=python2.5 + [testenv:py26] + basepython=python2.6 + [testenv:py27] + basepython=python2.7 """) assert len(config.envconfigs) == 2 - assert "py24" in config.envconfigs - assert "py25" in config.envconfigs + assert "py26" in config.envconfigs + assert "py27" in config.envconfigs def test_substitution_error(tmpdir, newconfig): py.test.raises(tox.exception.ConfigError, newconfig, """ diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tests/test_quickstart.py --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -23,10 +23,12 @@ return mock_term_input - def test_quickstart_main_choose_individual_pythons_and_pytest(self, monkeypatch): + def test_quickstart_main_choose_individual_pythons_and_pytest(self, + monkeypatch): monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'N', 'py.test', 'pytest'])) + self.get_mock_term_input( + ['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'py.test', 'pytest'])) tox._quickstart.main(argv=['tox-quickstart']) @@ -37,7 +39,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py26, py27, py32, py33, pypy [testenv] commands = py.test @@ -50,7 +52,8 @@ def test_quickstart_main_choose_individual_pythons_and_nose_adds_deps(self, monkeypatch): monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'N', 'nosetests', ''])) + self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', + 'nosetests', ''])) tox._quickstart.main(argv=['tox-quickstart']) @@ -61,7 +64,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py26, py27, py32, py33, pypy [testenv] commands = nosetests @@ -74,7 +77,8 @@ def test_quickstart_main_choose_individual_pythons_and_trial_adds_deps(self, monkeypatch): monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'N', 'trial', ''])) + self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', + 'trial', ''])) tox._quickstart.main(argv=['tox-quickstart']) @@ -85,7 +89,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py26, py27, py32, py33, pypy [testenv] commands = trial @@ -98,8 +102,8 @@ def test_quickstart_main_choose_individual_pythons_and_pytest_adds_deps(self, monkeypatch): monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 'Y', 'Y', 'N', 'py.test', ''])) - + self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', + 'py.test', ''])) tox._quickstart.main(argv=['tox-quickstart']) expected_tox_ini = """ @@ -109,7 +113,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py26, py27, py32, py33, pypy [testenv] commands = py.test @@ -181,7 +185,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython +envlist = py26, py27, py32, py33, pypy, jython [testenv] commands = py.test @@ -194,7 +198,7 @@ def test_quickstart_main_choose_individual_pythons_and_defaults(self, monkeypatch): monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', '', '', ''])) + self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', ''])) tox._quickstart.main(argv=['tox-quickstart']) @@ -205,7 +209,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython +envlist = py26, py27, py32, py33, pypy, jython [testenv] commands = {envpython} setup.py test @@ -224,7 +228,7 @@ monkeypatch.setattr( tox._quickstart, 'term_input', - self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', '', '', '', ''])) + self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', '', ''])) tox._quickstart.main(argv=['tox-quickstart']) @@ -235,7 +239,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython +envlist = py26, py27, py32, py33, pypy, jython [testenv] commands = {envpython} setup.py test @@ -249,8 +253,6 @@ class TestToxQuickstart(object): def test_pytest(self): d = { - 'py24': True, - 'py25': True, 'py26': True, 'py27': True, 'py32': True, @@ -266,7 +268,7 @@ # and then run "tox" from this directory. [tox] -envlist = py24, py25, py26, py27, py32, py33, pypy +envlist = py26, py27, py32, py33, pypy [testenv] commands = py.test diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py25,py27,py26,py32,py33,pypy +envlist=py27,py33,py26,py32,pypy [testenv:X] commands=echo {posargs} diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -183,6 +183,9 @@ info = self.config.interpreters.get_info(self.basepython) if not info.executable: raise tox.exception.InterpreterNotFound(self.basepython) + if info.version_info < (2,6): + raise tox.exception.UnsupportedInterpreter( + "python2.5 is not supported anymore, sorry") return info.executable testenvprefix = "testenv:" @@ -360,13 +363,7 @@ downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", downloadcache) vc.downloadcache = py.path.local(downloadcache) - # on pip-1.3.1/python 2.5 we can't use "--pre". - pip_default_opts = ["{opts}", "{packages}"] - info = vc._basepython_info - if info.runnable and info.version_info < (2,6): - pass - else: - pip_default_opts.insert(0, "--pre") + pip_default_opts = ["--pre", "{opts}", "{packages}"] vc.install_command = reader.getargv( section, "install_command", diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -19,7 +19,8 @@ def pytest_report_header(): return "tox comes from: %r" % (tox.__file__) -def pytest_funcarg__newconfig(request, tmpdir): + at pytest.fixture +def newconfig(request, tmpdir): def newconfig(args, source=None): if source is None: source = args @@ -34,7 +35,8 @@ old.chdir() return newconfig -def pytest_funcarg__cmd(request): + at pytest.fixture +def cmd(request): return Cmd(request) class ReportExpectMock: @@ -113,7 +115,8 @@ def wait(self): pass -def pytest_funcarg__mocksession(request): + at pytest.fixture +def mocksession(request): from tox._cmdline import Session class MockSession(Session): def __init__(self): @@ -137,7 +140,8 @@ return pm return MockSession() -def pytest_funcarg__newmocksession(request): + at pytest.fixture +def newmocksession(request): mocksession = request.getfuncargvalue("mocksession") newconfig = request.getfuncargvalue("newconfig") def newmocksession(args, source): diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox/_quickstart.py --- a/tox/_quickstart.py +++ b/tox/_quickstart.py @@ -56,7 +56,7 @@ term_input = input -all_envs = ['py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 'pypy', 'jython'] +all_envs = ['py26', 'py27', 'py32', 'py33', 'pypy', 'jython'] PROMPT_PREFIX = '> ' diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -181,14 +181,9 @@ interpreters = self.envconfig.config.interpreters config_interpreter = self.getsupportedinterpreter() info = interpreters.get_info(executable=config_interpreter) - use_venv191 = use_pip13 = info.version_info < (2,6) - if not use_venv191: - f, path, _ = py.std.imp.find_module("virtualenv") - f.close() - venvscript = path.rstrip("co") - else: - venvscript = py.path.local(tox.__file__).dirpath( - "vendor", "virtualenv.py") + f, path, _ = py.std.imp.find_module("virtualenv") + f.close() + venvscript = path.rstrip("co") args = [config_interpreter, str(venvscript)] if self.envconfig.distribute: args.append("--distribute") @@ -210,14 +205,7 @@ args.append(self.path.basename) self._pcall(args, venv=False, action=action, cwd=basepath) self.just_created = True - if use_pip13: - indexserver = self.envconfig.config.indexserver['default'].url - action = self.session.newaction(self, "pip_downgrade") - action.setactivity('pip-downgrade', 'pip<1.4') - argv = ["easy_install"] + \ - self._installopts(indexserver) + ['pip<1.4'] - self._pcall(argv, cwd=self.envconfig.config.toxinidir, - action=action) + def finish(self): self._getliveconfig().writeconfig(self.path_config) diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r df22328d1c854b0529f461d7813b443ee108aa35 tox/interpreters.py --- a/tox/interpreters.py +++ b/tox/interpreters.py @@ -12,7 +12,7 @@ def get_executable(self, name): """ return path object to the executable for the given - name (e.g. python2.5, python2.7, python etc.) + name (e.g. python2.6, python2.7, python etc.) if name is already an existing path, return name. If an interpreter cannot be found, return None. """ This diff is so big that we needed to truncate the remainder. 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 Mon Dec 9 16:31:00 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Dec 2013 15:31:00 -0000 Subject: [Pytest-commit] commit/tox: 6 new changesets Message-ID: <20131209153100.20152.34650@app06.ash-private.bitbucket.org> 6 new commits in tox: https://bitbucket.org/hpk42/tox/commits/cc81cfe2aaa2/ Changeset: cc81cfe2aaa2 User: hpk42 Date: 2013-12-09 15:28:06 Summary: remove training note Affected #: 3 files diff -r df22328d1c854b0529f461d7813b443ee108aa35 -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,7 @@ - drop Python2.5 compatibility because it became too hard due to the setuptools-2.0 dropping support. tox now has no - support for creating python2.5 virtualenv environments anymore. + support for creating python2.5 based environments anymore. - merged PR81: new option --force-dep which allows to override tox.ini specified dependencies in setuptools-style. diff -r df22328d1c854b0529f461d7813b443ee108aa35 -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da doc/index.txt --- a/doc/index.txt +++ b/doc/index.txt @@ -1,8 +1,6 @@ Welcome to the tox automation project =============================================== -.. note:: second training: `professional testing with Python `_ , 25-27th November 2013, Leipzig. - vision: standardize testing in Python --------------------------------------------- diff -r df22328d1c854b0529f461d7813b443ee108aa35 -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -868,7 +868,7 @@ assert str(env.basepython) == sys.executable def test_default_environments(self, tmpdir, newconfig, monkeypatch): - envs = "py24,py25,py26,py27,py31,py32,jython,pypy" + envs = "py26,py27,py31,py32,py33,jython,pypy" inisource = """ [tox] envlist = %s https://bitbucket.org/hpk42/tox/commits/86efef4769cb/ Changeset: 86efef4769cb User: hpk42 Date: 2013-12-09 15:54:19 Summary: introduce --no-network switch for running tests Affected #: 4 files diff -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da -r 86efef4769cbbf7b823d87c08cce92238d3b67fd CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -3,7 +3,8 @@ - drop Python2.5 compatibility because it became too hard due to the setuptools-2.0 dropping support. tox now has no - support for creating python2.5 based environments anymore. + support for creating python2.5 based environments anymore + and all internal special-handling has been removed. - merged PR81: new option --force-dep which allows to override tox.ini specified dependencies in setuptools-style. @@ -23,8 +24,7 @@ - fix issue126: depend on virtualenv>=1.10.1 so that we can rely (hopefully) on a pip version which supports --pre. (tox by default - uses to --pre). Note that tox also vendors an older virtualenv - for supporting python2.5 -- although the latter will be dropped at some point. + uses to --pre). - fix issue130: you can now set install_command=easy_install {opts} {packages} and expect it to work for repeated tox runs (previously it only worked @@ -44,6 +44,9 @@ - make sure that the --installpkg option trumps any usedevelop settings in tox.ini or +- introduce --no-network to tox's own test suite to skip tests + requiring networks + 1.6.1 ----- diff -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da -r 86efef4769cbbf7b823d87c08cce92238d3b67fd tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -307,11 +307,11 @@ def test_install_python3(tmpdir, newmocksession): - if not py.path.local.sysfind('python3.1'): - py.test.skip("needs python3.1") + if not py.path.local.sysfind('python3.3'): + pytest.skip("needs python3.3") mocksession = newmocksession([], """ [testenv:py123] - basepython=python3.1 + basepython=python3.3 deps= dep1 dep2 diff -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da -r 86efef4769cbbf7b823d87c08cce92238d3b67fd tox.ini --- a/tox.ini +++ b/tox.ini @@ -23,4 +23,4 @@ [pytest] rsyncdirs=tests tox - +addopts = -rsxXf diff -r cc81cfe2aaa2f02d8b1c71bfa8c180c172fd24da -r 86efef4769cbbf7b823d87c08cce92238d3b67fd tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -16,6 +16,12 @@ if 'HUDSON_URL' in os.environ: del os.environ['HUDSON_URL'] + +def pytest_addoption(parser): + parser.addoption("--no-network", action="store_true", + dest="no_network", + help="don't run tests requiring network") + def pytest_report_header(): return "tox comes from: %r" % (tox.__file__) @@ -37,6 +43,8 @@ @pytest.fixture def cmd(request): + if request.config.option.no_network: + pytest.skip("--no-network was specified, test cannot run") return Cmd(request) class ReportExpectMock: @@ -156,6 +164,7 @@ self.request = request current = py.path.local() self.request.addfinalizer(current.chdir) + def chdir(self, target): target.chdir() https://bitbucket.org/hpk42/tox/commits/fa1bd914f24f/ Changeset: fa1bd914f24f User: hpk42 Date: 2013-12-09 16:06:00 Summary: introduce --sitepackages to force sitepackages=True in all environments. Was wanted by Debian maintainer Barry Warsaw. Affected #: 3 files diff -r 86efef4769cbbf7b823d87c08cce92238d3b67fd -r fa1bd914f24f3d45677ee97d93256820675667c5 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -47,6 +47,9 @@ - introduce --no-network to tox's own test suite to skip tests requiring networks +- introduce --sitepackages to force sitepackages=True in all + environments. + 1.6.1 ----- diff -r 86efef4769cbbf7b823d87c08cce92238d3b67fd -r fa1bd914f24f3d45677ee97d93256820675667c5 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -451,6 +451,11 @@ # hashseed is random by default, so we can't assert a specific value. assert int_hashseed > 0 + def test_sitepackages_switch(self, tmpdir, newconfig): + config = newconfig(["--sitepackages"], "") + envconfig = config.envconfigs['python'] + assert envconfig.sitepackages == True + def test_installpkg_tops_develop(self, newconfig): config = newconfig(["--installpkg=abc"], """ [testenv] diff -r 86efef4769cbbf7b823d87c08cce92238d3b67fd -r fa1bd914f24f3d45677ee97d93256820675667c5 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -129,7 +129,10 @@ metavar="REQ", default=None, help="Forces a certain version of one of the dependencies " "when configuring the virtual environment. REQ Examples " - "'pytest<2.4' or 'django>=1.6'.") + "'pytest<2.7' or 'django>=1.6'.") + parser.add_argument("--sitepackages", action="store_true", + help="override sitepackages setting to True in all envs") + parser.add_argument("args", nargs="*", help="additional arguments available to command positional substitution") return parser @@ -355,7 +358,9 @@ name = self._replace_forced_dep(name, config) vc.deps.append(DepConfig(name, ixserver)) vc.distribute = reader.getbool(section, "distribute", False) - vc.sitepackages = reader.getbool(section, "sitepackages", False) + vc.sitepackages = self.config.option.sitepackages or \ + reader.getbool(section, "sitepackages", False) + vc.downloadcache = None downloadcache = reader.getdefault(section, "downloadcache") if downloadcache: https://bitbucket.org/hpk42/tox/commits/1265c6c42428/ Changeset: 1265c6c42428 User: hpk42 Date: 2013-12-09 16:11:33 Summary: also remove py25calls special handling in tests Affected #: 1 file diff -r fa1bd914f24f3d45677ee97d93256820675667c5 -r 1265c6c42428761172118a3d36a853826997405f tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -5,8 +5,6 @@ import tox._config from tox._venv import * -py25calls = int(sys.version_info[:2] == (2,5)) - #def test_global_virtualenv(capfd): # v = VirtualEnv() # l = v.list() @@ -126,13 +124,13 @@ venv = mocksession.getenv("py123") venv.create() l = mocksession._pcalls - assert len(l) == 1 + py25calls + assert len(l) == 1 distshare = venv.session.config.distshare distshare.ensure("dep1-1.0.zip") distshare.ensure("dep1-1.1.zip") venv.install_deps() - assert len(l) == 2 + py25calls + assert len(l) == 2 args = l[-1].args assert l[-1].cwd == venv.envconfig.config.toxinidir assert "pip" in str(args[0]) @@ -159,10 +157,10 @@ venv = mocksession.getenv("py123") venv.create() l = mocksession._pcalls - assert len(l) == 1 + py25calls + assert len(l) == 1 venv.install_deps() - assert len(l) == 2 + py25calls + assert len(l) == 2 args = l[-1].args assert l[-1].cwd == venv.envconfig.config.toxinidir assert "pip" in str(args[0]) @@ -187,7 +185,7 @@ venv = mocksession.getenv('py123') venv.create() l = mocksession._pcalls - assert len(l) == 1 + py25calls + assert len(l) == 1 l[:] = [] venv.install_deps() https://bitbucket.org/hpk42/tox/commits/5b8c3c2998de/ Changeset: 5b8c3c2998de User: hpk42 Date: 2013-12-09 16:16:36 Summary: bump to 1.7.0.dev1 Affected #: 2 files diff -r 1265c6c42428761172118a3d36a853826997405f -r 5b8c3c2998de37c0773613666c88beb92a2cd740 setup.py --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.6.2.dev2', + version='1.7.0.dev1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 1265c6c42428761172118a3d36a853826997405f -r 5b8c3c2998de37c0773613666c88beb92a2cd740 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.6.2.dev2' +__version__ = '1.7.0.dev1' class exception: class Error(Exception): https://bitbucket.org/hpk42/tox/commits/d67bd930dc69/ Changeset: d67bd930dc69 User: hpk42 Date: 2013-12-09 16:28:27 Summary: fix issue105 -- don't depend on an existing HOME directory from tox tests. Affected #: 3 files diff -r 5b8c3c2998de37c0773613666c88beb92a2cd740 -r d67bd930dc6962861a361c220c665d22096d9af8 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -50,6 +50,8 @@ - introduce --sitepackages to force sitepackages=True in all environments. +- fix issue105 -- don't depend on an existing HOME directory from tox tests. + 1.6.1 ----- diff -r 5b8c3c2998de37c0773613666c88beb92a2cd740 -r d67bd930dc6962861a361c220c665d22096d9af8 tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -117,6 +117,8 @@ def test_install_deps_wildcard(newmocksession): mocksession = newmocksession([], """ + [tox] + distshare = {toxworkdir}/distshare [testenv:py123] deps= {distshare}/dep1-* diff -r 5b8c3c2998de37c0773613666c88beb92a2cd740 -r d67bd930dc6962861a361c220c665d22096d9af8 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -417,8 +417,13 @@ if sdistfile != sdist_path: self.report.info("copying new sdistfile to %r" % str(sdistfile)) - sdistfile.dirpath().ensure(dir=1) - sdist_path.copy(sdistfile) + try: + sdistfile.dirpath().ensure(dir=1) + except py.error.Error: + self.report.warning("could not copy distfile to %s" % + sdistfile.dirpath()) + else: + sdist_path.copy(sdistfile) return sdist_path def subcommand_test(self): 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 Tue Dec 10 10:16:39 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 10 Dec 2013 09:16:39 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: clarify that pytest.mark.parametrize() takes a list of argvalues and not just Message-ID: <20131210091639.6764.61496@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/4c16e1c06b5d/ Changeset: 4c16e1c06b5d User: hpk42 Date: 2013-12-10 10:16:27 Summary: clarify that pytest.mark.parametrize() takes a list of argvalues and not just arbitrary iterators. Addresses issue122. Affected #: 1 file diff -r e2bfc7bfd1a2e5509d064a26383fb5b0fbfe643c -r 4c16e1c06b5d0bcad11840fba22bc7604c1f1fbd _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -140,10 +140,12 @@ def pytest_configure(config): config.addinivalue_line("markers", "parametrize(argnames, argvalues): call a test function multiple " - "times passing in multiple different argument value sets. 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 " + "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." ) config.addinivalue_line("markers", 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 Dec 10 14:54:42 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 10 Dec 2013 13:54:42 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: close issue240 - rework "good practises" document and discuss Message-ID: <20131210135442.13231.77587@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/23152b79f1dc/ Changeset: 23152b79f1dc User: hpk42 Date: 2013-12-10 14:54:13 Summary: close issue240 - rework "good practises" document and discuss discuss the two common test directory layouts in more detail, including an explicit note on how it interacts with PEP420-namespace packages. Affected #: 2 files diff -r 4c16e1c06b5d0bcad11840fba22bc7604c1f1fbd -r 23152b79f1dc6ad64a2e6a73a327b770352ca6f7 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -26,6 +26,10 @@ with repeated same values (sometimes useful to to test if calling a second time works as with the first time). +- close issue240 - document precisely how pytest module importing + works, discuss the two common test directory layouts, and how it + interacts with PEP420-namespace packages. + - fix issue246 fix finalizer order to be LIFO on independent fixtures depending on a parametrized higher-than-function scoped fixture. (was quite some effort so please bear with the complexity of this sentence :) diff -r 4c16e1c06b5d0bcad11840fba22bc7604c1f1fbd -r 23152b79f1dc6ad64a2e6a73a327b770352ca6f7 doc/en/goodpractises.txt --- a/doc/en/goodpractises.txt +++ b/doc/en/goodpractises.txt @@ -8,24 +8,151 @@ Work with virtual environments ----------------------------------------------------------- -We recommend to use virtualenv_ environments and use easy_install_ -(or pip_) for installing your application dependencies as well as -the ``pytest`` package itself. This way you will get a much more reproducible -environment. A good tool to help you automate test runs against multiple -dependency configurations or Python interpreters is `tox`_. +We recommend to use virtualenv_ environments and use pip_ +(or easy_install_) for installing your application and any dependencies +as well as the ``pytest`` package itself. This way you will get an isolated +and reproducible environment. Given you have installed virtualenv_ +and execute it from the command line, here is an example session for unix +or windows:: + + virtualenv . # create a virtualenv directory in the current directory + + source bin/activate # on unix + + scripts/activate # on Windows + +We can now install pytest:: + + pip install pytest + +Due to the ``activate`` step above the ``pip`` will come from +the virtualenv directory and install any package into the isolated +virtual environment. + +Choosing a test layout / import rules +------------------------------------------ + +py.test supports two common test layouts: + +* putting tests into an extra directory outside your actual application + code, useful if you have many functional tests or for other reasons + want to keep tests separate from actual application code (often a good + idea):: + + setup.py # your distutils/setuptools Python package metadata + mypkg/ + __init__.py + appmodule.py + tests/ + test_app.py + ... + + +* inlining test directories into your application package, useful if you + have direct relation between (unit-)test and application modules and + want to distribute your tests along with your application:: + + setup.py # your distutils/setuptools Python package metadata + mypkg/ + __init__.py + appmodule.py + ... + test/ + test_app.py + ... + +Important notes relating to both schemes: + +- **make sure that "mypkg" is importable**, for example by typing once:: + + pip install -e . # install package using setup.py in editable mode + +- **avoid "__init__.py" files in your test directories**. + This way your tests can run easily against an installed version + of ``mypkg``, independently from if the installed version contains + the tests or not. + +- With inlined tests you might put ``__init__.py`` into test + directories and make them installable as part of your application. + Using the ``py.test --pyargs mypkg`` invocation pytest will + discover where mypkg is installed and collect tests from there. + With the "external" test you can still distribute tests but they + will not be installed or become importable. + +Typically you can run tests by pointing to test directories or modules:: + + py.test tests/test_app.py # for external test dirs + py.test mypkg/test/test_app.py # for inlined test dirs + py.test mypkg # run tests in all below test directories + py.test # run all tests below current dir + ... + +Because of the above ``editable install`` mode you can change your +source code (both tests and the app) and rerun tests at will. +Once you are done with your work, you can `use tox`_ to make sure +that the package is really correct and tests pass in all +required configurations. + +.. note:: + + You can use Python3 namespace packages (PEP420) for your application + but pytest will still perform `package name`_ discovery based on the + presence of ``__init__.py`` files. If you use one of the above + two recommended file system layouts but leave away the ``__init__.py`` + files it should just work on Python3.3 and above. When using + "inlined tests", however, you will need to use absolute imports for + getting at your application code because the test modules will be + imported directly, without any application context. The latter allows + your tests to run against an installed version of your package. + +.. _`package name`: + +.. note:: + + If py.test finds a "a/b/test_module.py" test file while + recursing into the filesystem it determines the import name + as follows: + + * determine ``basedir``: this is the first "upward" (towards the root) + directory not containing an ``__init__.py``. If e.g. both ``a`` + and ``b`` contain an ``__init__.py`` file then the parent directory + of ``a`` will become the ``basedir``. + + * perform ``sys.path.insert(0, basedir)`` to make the test module + importable under the fully qualified import name. + + * ``import a.b.test_module`` where the path is determined + by converting path separators ``/`` into "." characters. This means + you must follow the convention of having directory and file + names map directly to the import names. + + The reason for this somewhat evolved importing technique is + that in larger projects multiple test modules might import + from each other and thus deriving a canonical import name helps + to avoid surprises such as a test modules getting imported twice. + .. _`virtualenv`: http://pypi.python.org/pypi/virtualenv .. _`buildout`: http://www.buildout.org/ .. _pip: http://pypi.python.org/pypi/pip +.. _`use tox`: + Use tox and Continuous Integration servers ------------------------------------------------- -If you frequently release code to the public you -may want to look into `tox`_, the virtualenv test automation -tool and its `pytest support `_. -The basic idea is to generate a JUnitXML file through the ``--junitxml=PATH`` option and have a continuous integration server like Jenkins_ pick it up -and generate reports. +If you frequently release code and want to make sure that your actual +package passes all tests you may want to look into `tox`_, the +virtualenv test automation tool and its `pytest support +`_. +Tox helps you to setup virtualenv environments with pre-defined +dependencies and then executing a pre-configured test command with +options. It will run tests against the installed package and not +against your source code checkout, helping to detect packaging +glitches. + +If you want to use Jenkins_ you can use the ``--junitxml=PATH`` option +to create a JUnitXML file that Jenkins_ can pick up and generate reports. .. _standalone: .. _`genscript method`: @@ -33,21 +160,19 @@ Create a py.test standalone script ------------------------------------------- -If you are a maintainer or application developer and want others -to easily run tests you can generate a completely standalone "py.test" -script:: +If you are a maintainer or application developer and want people +who don't deal with python much to easily run tests you may generate +a standalone "py.test" script:: py.test --genscript=runtests.py -generates a ``runtests.py`` script which is a fully functional basic +This generates a ``runtests.py`` script which is a fully functional basic ``py.test`` script, running unchanged under Python2 and Python3. You can tell people to download the script and then e.g. run it like this:: python runtests.py - - Integrating with distutils / ``python setup.py test`` -------------------------------------------------------- @@ -93,8 +218,9 @@ Integration with setuptools test commands ---------------------------------------------------- -Setuptools supports writing our own Test command for invoking -pytest:: +Setuptools supports writing our own Test command for invoking pytest. +Most often it is better to use tox_ instead, but here is how you can +get started with setuptools integration:: from setuptools.command.test import test as TestCommand import sys @@ -143,69 +269,4 @@ Within Python modules, py.test also discovers tests using the standard :ref:`unittest.TestCase ` subclassing technique. -Choosing a test layout / import rules ------------------------------------------- - -py.test supports common test layouts: - -* inlining test directories into your application package, useful if you want to - keep (unit) tests and actually tested code close together:: - - mypkg/ - __init__.py - appmodule.py - ... - test/ - test_app.py - ... - -* putting tests into an extra directory outside your actual application - code, useful if you have many functional tests or want to keep - tests separate from actual application code:: - - mypkg/ - __init__.py - appmodule.py - tests/ - test_app.py - ... - -In both cases you usually need to make sure that ``mypkg`` is importable, -for example by using the setuptools ``python setup.py develop`` method. - -You can run your tests by pointing to it:: - - py.test tests/test_app.py # for external test dirs - py.test mypkg/test/test_app.py # for inlined test dirs - py.test mypkg # run tests in all below test directories - py.test # run all tests below current dir - ... - -.. _`package name`: - -.. note:: - - If py.test finds a "a/b/test_module.py" test file while - recursing into the filesystem it determines the import name - as follows: - - * find ``basedir`` -- this is the first "upward" (towards the root) - directory not containing an ``__init__.py``. If both the ``a`` - and ``b`` directories contain an ``__init__.py`` the basedir will - be the parent dir of ``a``. - - * perform ``sys.path.insert(0, basedir)`` to make the test module - importable under the fully qualified import name. - - * ``import a.b.test_module`` where the path is determined - by converting path separators ``/`` into "." characters. This means - you must follow the convention of having directory and file - names map directly to the import names. - - The reason for this somewhat evolved importing technique is - that in larger projects multiple test modules might import - from each other and thus deriving a canonical import name helps - to avoid surprises such as a test modules getting imported twice. - - .. include:: links.inc 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 Dec 10 14:59:15 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 10 Dec 2013 13:59:15 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131210135915.27515.84631@app03.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/9ba85a8955da/ Changeset: 9ba85a8955da Branch: override-fixture-via-parametrization User: bubenkoff Date: 2013-12-10 14:27:29 Summary: Paratrization overrides existing fixtures. Affected #: 2 files diff -r 4c16e1c06b5d0bcad11840fba22bc7604c1f1fbd -r 9ba85a8955daaa5d0b040fb2143c196bc90d3e54 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -368,7 +368,6 @@ arg2fixturedefs = metafunc._arg2fixturedefs for param_index, callspec in enumerate(metafunc._calls): for argname, argvalue in callspec.funcargs.items(): - assert argname not in arg2fixturedefs arg2params.setdefault(argname, []).append(argvalue) if argname not in arg2scope: scopenum = callspec._arg2scopenum.get(argname, scopenum_function) @@ -387,7 +386,6 @@ # to make sure we only ever create an according fixturedef on # a per-scope basis. We thus store and cache the fixturedef on the # node related to the scope. - assert argname not in arg2fixturedefs, (argname, arg2fixturedefs) scope = arg2scope[argname] node = None if scope != "function": diff -r 4c16e1c06b5d0bcad11840fba22bc7604c1f1fbd -r 9ba85a8955daaa5d0b040fb2143c196bc90d3e54 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -372,6 +372,24 @@ rec.assertoutcome(passed=2) + def test_parametrize_overrides_fixture(self, testdir): + """Test parametrization when parameter overrides existing fixture with same name.""" + testdir.makepyfile(""" + import pytest + + @pytest.fixture + def value(): + return 'value' + + @pytest.mark.parametrize('value', + ['overrided']) + def test_overrided_via_param(value): + assert value == 'overrided' + """) + rec = testdir.inline_run() + rec.assertoutcome(passed=1) + + def test_parametrize_with_mark(selfself, testdir): items = testdir.getitems(""" import pytest https://bitbucket.org/hpk42/pytest/commits/6bc51574e761/ Changeset: 6bc51574e761 User: hpk42 Date: 2013-12-10 14:59:10 Summary: Merged in paylogic/pytest/override-fixture-via-parametrization (pull request #92) Paratrization overrides existing fixtures. Affected #: 2 files diff -r 23152b79f1dc6ad64a2e6a73a327b770352ca6f7 -r 6bc51574e761e06bae5975cb51914a679bd4f60e _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -368,7 +368,6 @@ arg2fixturedefs = metafunc._arg2fixturedefs for param_index, callspec in enumerate(metafunc._calls): for argname, argvalue in callspec.funcargs.items(): - assert argname not in arg2fixturedefs arg2params.setdefault(argname, []).append(argvalue) if argname not in arg2scope: scopenum = callspec._arg2scopenum.get(argname, scopenum_function) @@ -387,7 +386,6 @@ # to make sure we only ever create an according fixturedef on # a per-scope basis. We thus store and cache the fixturedef on the # node related to the scope. - assert argname not in arg2fixturedefs, (argname, arg2fixturedefs) scope = arg2scope[argname] node = None if scope != "function": diff -r 23152b79f1dc6ad64a2e6a73a327b770352ca6f7 -r 6bc51574e761e06bae5975cb51914a679bd4f60e testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -372,6 +372,24 @@ rec.assertoutcome(passed=2) + def test_parametrize_overrides_fixture(self, testdir): + """Test parametrization when parameter overrides existing fixture with same name.""" + testdir.makepyfile(""" + import pytest + + @pytest.fixture + def value(): + return 'value' + + @pytest.mark.parametrize('value', + ['overrided']) + def test_overrided_via_param(value): + assert value == 'overrided' + """) + rec = testdir.inline_run() + rec.assertoutcome(passed=1) + + def test_parametrize_with_mark(selfself, testdir): items = testdir.getitems(""" import pytest 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 Dec 10 15:58:59 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 10 Dec 2013 14:58:59 -0000 Subject: [Pytest-commit] commit/tox: hpk42: small updates to tox/pytest section Message-ID: <20131210145859.32080.13124@app06.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/cec6988e5dbd/ Changeset: cec6988e5dbd User: hpk42 Date: 2013-12-10 15:57:30 Summary: small updates to tox/pytest section Affected #: 1 file diff -r d67bd930dc6962861a361c220c665d22096d9af8 -r cec6988e5dbd7b63bd61fd50394a7f8c007450f2 doc/example/pytest.txt --- a/doc/example/pytest.txt +++ b/doc/example/pytest.txt @@ -23,7 +23,7 @@ deps=pytest # PYPI package providing py.test commands= py.test \ - [] # substitute with tox' positional arguments + {posargs} # substitute with tox' positional arguments you can now invoke ``tox`` in the directory where your ``tox.ini`` resides. ``tox`` will sdist-package your project, create two virtualenv environments @@ -49,7 +49,7 @@ commands= py.test \ --basetemp={envtmpdir} \ # py.test tempdir setting - [] # substitute with tox' positional arguments + {posargs} # substitute with tox' positional arguments you can invoke ``tox`` in the directory where your ``tox.ini`` resides. Differently than in the previous example the ``py.test`` command @@ -73,7 +73,7 @@ --basetemp={envtmpdir} \ --confcutdir=.. \ -n 3 \ # use three sub processes - [] + {posargs} .. _`listed as a known issue`: @@ -99,16 +99,13 @@ files are outside the import path, then pass ``--pyargs mypkg`` to pytest. -Installed tests are particularly convenient when combined with -`Distribute's 2to3 support` (``use_2to3``). - -With tests that won't be installed, the simplest way is to avoid -``__init__.py`` files in test directories; pytest will still find them -but they won't be copied to other places or be found by Python's import -system. +With tests that won't be installed, the simplest way to run them +against your installed package is to avoid ``__init__.py`` files in test +directories; pytest will still find and import them by adding their +parent directory to ``sys.path`` but they won't be copied to +other places or be found by Python's import system outside of pytest. .. _`fully qualified name`: http://pytest.org/latest/goodpractises.html#package-name -.. _`Distribute's 2to3 support`: http://packages.python.org/distribute/python3.html .. include:: ../links.txt 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 notifications at travis-ci.org Tue Dec 10 16:40:05 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 10 Dec 2013 15:40:05 +0000 Subject: [Pytest-commit] [Still Failing] hpk42/pytest#55 (master - 732d672) Message-ID: <52a735d567458_2ab502482b7@0dd46a64-b822-4ef4-858d-0cae764e4ba0.mail> Build Update for hpk42/pytest ------------------------------------- Build: #55 Status: Still Failing Duration: 10 minutes and 53 seconds Commit: 732d672 (master) Author: holger krekel Message: Merged in paylogic/pytest/override-fixture-via-parametrization (pull request #92) Paratrization overrides existing fixtures. View the changeset: https://github.com/hpk42/pytest/compare/f0a52c71ed78...732d67262a21 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15231305 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Wed Dec 11 11:34:10 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Dec 2013 10:34:10 -0000 Subject: [Pytest-commit] commit/pytest: 5 new changesets Message-ID: <20131211103410.8442.98448@app18.ash-private.bitbucket.org> 5 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/0a824a82b71d/ Changeset: 0a824a82b71d User: flub Date: 2013-11-22 13:27:34 Summary: Correct comment Affected #: 1 file diff -r 4951204afadcc1070e0d478c7ba4e8bdd29cd8fd -r 0a824a82b71ddc93965f84fd0835a4d651607611 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -655,7 +655,7 @@ res_expr = ast.Compare(left_res, [op], [next_res]) self.statements.append(ast.Assign([store_names[i]], res_expr)) left_res, left_expl = next_res, next_expl - # Use py.code._reprcompare if that's available. + # Use pytest.assertion.util._reprcompare if that's available. expl_call = self.helper("call_reprcompare", ast.Tuple(syms, ast.Load()), ast.Tuple(load_names, ast.Load()), https://bitbucket.org/hpk42/pytest/commits/1106c3f79880/ Changeset: 1106c3f79880 User: flub Date: 2013-11-22 13:28:59 Summary: Ensure the long descriptions and formatting preserve unicode correctly This is the first stage towards fixing issue319, at least py.io.saferepr and py.code.ExceptionInfo need to be addressed as well. Affected #: 2 files diff -r 0a824a82b71ddc93965f84fd0835a4d651607611 -r 1106c3f79880b30e6a8ddfff56a4d8ecca5ff40b _pytest/assertion/__init__.py --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -78,10 +78,13 @@ for new_expl in hook_result: if new_expl: - # Don't include pageloads of data unless we are very verbose (-vv) - if len(''.join(new_expl[1:])) > 80*8 and item.config.option.verbose < 2: - new_expl[1:] = ['Detailed information truncated, use "-vv" to see'] - res = '\n~'.join(new_expl) + # Don't include pageloads of data unless we are very + # verbose (-vv) + if (len(py.builtin._totext('').join(new_expl[1:])) > 80*8 + and item.config.option.verbose < 2): + new_expl[1:] = [py.builtin._totext( + 'Detailed information truncated, use "-vv" to see')] + res = py.builtin._totext('\n~').join(new_expl) if item.config.getvalue("assertmode") == "rewrite": # The result will be fed back a python % formatting # operation, which will fail if there are extraneous diff -r 0a824a82b71ddc93965f84fd0835a4d651607611 -r 1106c3f79880b30e6a8ddfff56a4d8ecca5ff40b _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -11,6 +11,7 @@ BuiltinAssertionError = py.builtin.builtins.AssertionError +u = py.builtin._totext # The _reprcompare attribute on the util module is used by the new assertion # interpretation code and assertion rewriter to detect this plugin was @@ -29,7 +30,18 @@ for when one explanation needs to span multiple lines, e.g. when displaying diffs. """ - # simplify 'assert False where False = ...' + explanation = _collapse_false(explanation) + lines = _split_explanation(explanation) + result = _format_lines(lines) + return u('\n').join(result) + + +def _collapse_false(explanation): + """Collapse expansions of False + + So this strips out any "assert False\n{where False = ...\n}" + blocks. + """ where = 0 while True: start = where = explanation.find("False\n{False = ", where) @@ -51,28 +63,48 @@ explanation = (explanation[:start] + explanation[start+15:end-1] + explanation[end+1:]) where -= 17 - raw_lines = (explanation or '').split('\n') - # escape newlines not followed by {, } and ~ + return explanation + + +def _split_explanation(explanation): + """Return a list of individual lines in the explanation + + This will return a list of lines split on '\n{', '\n}' and '\n~'. + Any other newlines will be escaped and appear in the line as the + literal '\n' characters. + """ + raw_lines = (explanation or u('')).split('\n') lines = [raw_lines[0]] for l in raw_lines[1:]: if l.startswith('{') or l.startswith('}') or l.startswith('~'): lines.append(l) else: lines[-1] += '\\n' + l + return lines + +def _format_lines(lines): + """Format the individual lines + + This will replace the '{', '}' and '~' characters of our mini + formatting language with the proper 'where ...', 'and ...' and ' + + ...' text, taking care of indentation along the way. + + Return a list of formatted lines. + """ result = lines[:1] stack = [0] stackcnt = [0] for line in lines[1:]: if line.startswith('{'): if stackcnt[-1]: - s = 'and ' + s = u('and ') else: - s = 'where ' + s = u('where ') stack.append(len(result)) stackcnt[-1] += 1 stackcnt.append(0) - result.append(' +' + ' '*(len(stack)-1) + s + line[1:]) + result.append(u(' +') + u(' ')*(len(stack)-1) + s + line[1:]) elif line.startswith('}'): assert line.startswith('}') stack.pop() @@ -80,9 +112,9 @@ result[stack[-1]] += line[1:] else: assert line.startswith('~') - result.append(' '*len(stack) + line[1:]) + result.append(u(' ')*len(stack) + line[1:]) assert len(stack) == 1 - return '\n'.join(result) + return result # Provide basestring in python3 @@ -95,9 +127,9 @@ def assertrepr_compare(config, op, left, right): """Return specialised explanations for some operators/operands""" width = 80 - 15 - len(op) - 2 # 15 chars indentation, 1 space around op - left_repr = py.io.saferepr(left, maxsize=int(width/2)) + left_repr = py.io.saferepr(left, maxsize=int(width/2)) # XXX mangles unicode right_repr = py.io.saferepr(right, maxsize=width-len(left_repr)) - summary = '%s %s %s' % (left_repr, op, right_repr) + summary = u('%s %s %s') % (left_repr, op, right_repr) issequence = lambda x: (isinstance(x, (list, tuple, Sequence)) and not isinstance(x, basestring)) @@ -120,13 +152,12 @@ elif op == 'not in': if istext(left) and istext(right): explanation = _notin_text(left, right, verbose) - except py.builtin._sysex: - raise - except: + except Exception: excinfo = py.code.ExceptionInfo() explanation = [ - '(pytest_assertion plugin: representation of details failed. ' - 'Probably an object has a faulty __repr__.)', str(excinfo)] + u('(pytest_assertion plugin: representation of details failed. ' + 'Probably an object has a faulty __repr__.)'), + u(excinfo)] if not explanation: return None @@ -148,8 +179,8 @@ break if i > 42: i -= 10 # Provide some context - explanation = ['Skipping %s identical leading ' - 'characters in diff, use -v to show' % i] + explanation = [u('Skipping %s identical leading ' + 'characters in diff, use -v to show') % i] left = left[i:] right = right[i:] if len(left) == len(right): @@ -158,8 +189,8 @@ break if i > 42: i -= 10 # Provide some context - explanation += ['Skipping %s identical trailing ' - 'characters in diff, use -v to show' % i] + explanation += [u('Skipping %s identical trailing ' + 'characters in diff, use -v to show') % i] left = left[:-i] right = right[:-i] explanation += [line.strip('\n') @@ -172,16 +203,15 @@ explanation = [] for i in range(min(len(left), len(right))): if left[i] != right[i]: - explanation += ['At index %s diff: %r != %r' % - (i, left[i], right[i])] + explanation += [u('At index %s diff: %r != %r') + % (i, left[i], right[i])] break if len(left) > len(right): - explanation += [ - 'Left contains more items, first extra item: %s' % - py.io.saferepr(left[len(right)],)] + explanation += [u('Left contains more items, first extra item: %s') + % py.io.saferepr(left[len(right)],)] elif len(left) < len(right): explanation += [ - 'Right contains more items, first extra item: %s' % + 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)) @@ -192,11 +222,11 @@ diff_left = left - right diff_right = right - left if diff_left: - explanation.append('Extra items in the left set:') + explanation.append(u('Extra items in the left set:')) for item in diff_left: explanation.append(py.io.saferepr(item)) if diff_right: - explanation.append('Extra items in the right set:') + explanation.append(u('Extra items in the right set:')) for item in diff_right: explanation.append(py.io.saferepr(item)) return explanation @@ -207,25 +237,25 @@ common = set(left).intersection(set(right)) same = dict((k, left[k]) for k in common if left[k] == right[k]) if same and not verbose: - explanation += ['Omitting %s identical items, use -v to show' % + explanation += [u('Omitting %s identical items, use -v to show') % len(same)] elif same: - explanation += ['Common items:'] + explanation += [u('Common items:')] explanation += py.std.pprint.pformat(same).splitlines() diff = set(k for k in common if left[k] != right[k]) if diff: - explanation += ['Differing items:'] + explanation += [u('Differing items:')] for k in diff: explanation += [py.io.saferepr({k: left[k]}) + ' != ' + py.io.saferepr({k: right[k]})] extra_left = set(left) - set(right) if extra_left: - explanation.append('Left contains more items:') + explanation.append(u('Left contains more items:')) explanation.extend(py.std.pprint.pformat( dict((k, left[k]) for k in extra_left)).splitlines()) extra_right = set(right) - set(left) if extra_right: - explanation.append('Right contains more items:') + explanation.append(u('Right contains more items:')) explanation.extend(py.std.pprint.pformat( dict((k, right[k]) for k in extra_right)).splitlines()) return explanation @@ -237,14 +267,14 @@ tail = text[index+len(term):] correct_text = head + tail diff = _diff_text(correct_text, text, verbose) - newdiff = ['%s is contained here:' % py.io.saferepr(term, maxsize=42)] + newdiff = [u('%s is contained here:') % py.io.saferepr(term, maxsize=42)] for line in diff: - if line.startswith('Skipping'): + if line.startswith(u('Skipping')): continue - if line.startswith('- '): + if line.startswith(u('- ')): continue - if line.startswith('+ '): - newdiff.append(' ' + line[2:]) + if line.startswith(u('+ ')): + newdiff.append(u(' ') + line[2:]) else: newdiff.append(line) return newdiff https://bitbucket.org/hpk42/pytest/commits/eebaac396f1f/ Changeset: eebaac396f1f User: flub Date: 2013-11-24 18:45:48 Summary: Respect unicode in AssertionError argument This is related to issue319 Affected #: 1 file diff -r 1106c3f79880b30e6a8ddfff56a4d8ecca5ff40b -r eebaac396f1f9c769268c89ea615afec16abcb62 _pytest/assertion/reinterpret.py --- a/_pytest/assertion/reinterpret.py +++ b/_pytest/assertion/reinterpret.py @@ -2,17 +2,17 @@ import py from _pytest.assertion.util import BuiltinAssertionError + class AssertionError(BuiltinAssertionError): def __init__(self, *args): BuiltinAssertionError.__init__(self, *args) if args: try: - self.msg = str(args[0]) - except py.builtin._sysex: - raise - except: - self.msg = "<[broken __repr__] %s at %0xd>" %( - args[0].__class__, id(args[0])) + self.msg = py.builtin._totext(args[0]) + except Exception: + self.msg = py.builtin._totext( + "<[broken __repr__] %s at %0xd> %s" + % (args[0].__class__, id(args[0]))) else: f = py.code.Frame(sys._getframe(1)) try: https://bitbucket.org/hpk42/pytest/commits/e98bfdcae5ea/ Changeset: e98bfdcae5ea User: flub Date: 2013-11-29 01:29:14 Summary: Add test for unicode assertion descriptions Also clean up a few debugging leftovers. Affected #: 3 files diff -r eebaac396f1f9c769268c89ea615afec16abcb62 -r e98bfdcae5ea7b6ffe1c47fd99c8d686d6581e08 _pytest/assertion/reinterpret.py --- a/_pytest/assertion/reinterpret.py +++ b/_pytest/assertion/reinterpret.py @@ -11,7 +11,7 @@ self.msg = py.builtin._totext(args[0]) except Exception: self.msg = py.builtin._totext( - "<[broken __repr__] %s at %0xd> %s" + "<[broken __repr__] %s at %0xd>" % (args[0].__class__, id(args[0]))) else: f = py.code.Frame(sys._getframe(1)) diff -r eebaac396f1f9c769268c89ea615afec16abcb62 -r e98bfdcae5ea7b6ffe1c47fd99c8d686d6581e08 _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -127,7 +127,7 @@ def assertrepr_compare(config, op, left, right): """Return specialised explanations for some operators/operands""" width = 80 - 15 - len(op) - 2 # 15 chars indentation, 1 space around op - left_repr = py.io.saferepr(left, maxsize=int(width/2)) # XXX mangles unicode + left_repr = py.io.saferepr(left, maxsize=int(width/2)) right_repr = py.io.saferepr(right, maxsize=width-len(left_repr)) summary = u('%s %s %s') % (left_repr, op, right_repr) diff -r eebaac396f1f9c769268c89ea615afec16abcb62 -r e98bfdcae5ea7b6ffe1c47fd99c8d686d6581e08 testing/test_assertion.py --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import sys import py, pytest @@ -176,6 +177,15 @@ expl = ' '.join(callequal('foo', 'bar')) assert 'raised in repr()' not in expl + def test_unicode(self): + left = py.builtin._totext('??', 'utf-8') + right = py.builtin._totext('?', 'utf-8') + expl = callequal(left, right) + assert expl[0] == py.builtin._totext("'??' == '?'", 'utf-8') + assert expl[1] == py.builtin._totext('- ??', 'utf-8') + assert expl[2] == py.builtin._totext('+ ?', 'utf-8') + + def test_python25_compile_issue257(testdir): testdir.makepyfile(""" def test_rewritten(): https://bitbucket.org/hpk42/pytest/commits/3d74d1564b1b/ Changeset: 3d74d1564b1b User: hpk42 Date: 2013-12-11 11:28:06 Summary: add changelog: fix issue319 - correctly show unicode in assertion errors. Many thanks to Floris Bruynooghe for the complete PR. Also means we depend on py>=1.4.19 now. Affected #: 8 files diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,10 @@ - PR90: add --color=yes|no|auto option to force terminal coloring mode ("auto" is default). Thanks Marc Abramowitz. +- fix issue319 - correctly show unicode in assertion errors. Many + thanks to Floris Bruynooghe for the complete PR. Also means + we depend on py>=1.4.19 now. + - fix issue396 - correctly sort and finalize class-scoped parametrized tests independently from number of methods on the class. diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.4.3.dev2' +__version__ = '2.5.0.dev1' diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 _pytest/assertion/__init__.py --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -78,10 +78,13 @@ for new_expl in hook_result: if new_expl: - # Don't include pageloads of data unless we are very verbose (-vv) - if len(''.join(new_expl[1:])) > 80*8 and item.config.option.verbose < 2: - new_expl[1:] = ['Detailed information truncated, use "-vv" to see'] - res = '\n~'.join(new_expl) + # Don't include pageloads of data unless we are very + # verbose (-vv) + if (len(py.builtin._totext('').join(new_expl[1:])) > 80*8 + and item.config.option.verbose < 2): + new_expl[1:] = [py.builtin._totext( + 'Detailed information truncated, use "-vv" to see')] + res = py.builtin._totext('\n~').join(new_expl) if item.config.getvalue("assertmode") == "rewrite": # The result will be fed back a python % formatting # operation, which will fail if there are extraneous diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 _pytest/assertion/reinterpret.py --- a/_pytest/assertion/reinterpret.py +++ b/_pytest/assertion/reinterpret.py @@ -2,17 +2,17 @@ import py from _pytest.assertion.util import BuiltinAssertionError + class AssertionError(BuiltinAssertionError): def __init__(self, *args): BuiltinAssertionError.__init__(self, *args) if args: try: - self.msg = str(args[0]) - except py.builtin._sysex: - raise - except: - self.msg = "<[broken __repr__] %s at %0xd>" %( - args[0].__class__, id(args[0])) + self.msg = py.builtin._totext(args[0]) + except Exception: + self.msg = py.builtin._totext( + "<[broken __repr__] %s at %0xd>" + % (args[0].__class__, id(args[0]))) else: f = py.code.Frame(sys._getframe(1)) try: diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -655,7 +655,7 @@ res_expr = ast.Compare(left_res, [op], [next_res]) self.statements.append(ast.Assign([store_names[i]], res_expr)) left_res, left_expl = next_res, next_expl - # Use py.code._reprcompare if that's available. + # Use pytest.assertion.util._reprcompare if that's available. expl_call = self.helper("call_reprcompare", ast.Tuple(syms, ast.Load()), ast.Tuple(load_names, ast.Load()), diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -11,6 +11,7 @@ BuiltinAssertionError = py.builtin.builtins.AssertionError +u = py.builtin._totext # The _reprcompare attribute on the util module is used by the new assertion # interpretation code and assertion rewriter to detect this plugin was @@ -29,7 +30,18 @@ for when one explanation needs to span multiple lines, e.g. when displaying diffs. """ - # simplify 'assert False where False = ...' + explanation = _collapse_false(explanation) + lines = _split_explanation(explanation) + result = _format_lines(lines) + return u('\n').join(result) + + +def _collapse_false(explanation): + """Collapse expansions of False + + So this strips out any "assert False\n{where False = ...\n}" + blocks. + """ where = 0 while True: start = where = explanation.find("False\n{False = ", where) @@ -51,28 +63,48 @@ explanation = (explanation[:start] + explanation[start+15:end-1] + explanation[end+1:]) where -= 17 - raw_lines = (explanation or '').split('\n') - # escape newlines not followed by {, } and ~ + return explanation + + +def _split_explanation(explanation): + """Return a list of individual lines in the explanation + + This will return a list of lines split on '\n{', '\n}' and '\n~'. + Any other newlines will be escaped and appear in the line as the + literal '\n' characters. + """ + raw_lines = (explanation or u('')).split('\n') lines = [raw_lines[0]] for l in raw_lines[1:]: if l.startswith('{') or l.startswith('}') or l.startswith('~'): lines.append(l) else: lines[-1] += '\\n' + l + return lines + +def _format_lines(lines): + """Format the individual lines + + This will replace the '{', '}' and '~' characters of our mini + formatting language with the proper 'where ...', 'and ...' and ' + + ...' text, taking care of indentation along the way. + + Return a list of formatted lines. + """ result = lines[:1] stack = [0] stackcnt = [0] for line in lines[1:]: if line.startswith('{'): if stackcnt[-1]: - s = 'and ' + s = u('and ') else: - s = 'where ' + s = u('where ') stack.append(len(result)) stackcnt[-1] += 1 stackcnt.append(0) - result.append(' +' + ' '*(len(stack)-1) + s + line[1:]) + result.append(u(' +') + u(' ')*(len(stack)-1) + s + line[1:]) elif line.startswith('}'): assert line.startswith('}') stack.pop() @@ -80,9 +112,9 @@ result[stack[-1]] += line[1:] else: assert line.startswith('~') - result.append(' '*len(stack) + line[1:]) + result.append(u(' ')*len(stack) + line[1:]) assert len(stack) == 1 - return '\n'.join(result) + return result # Provide basestring in python3 @@ -97,7 +129,7 @@ width = 80 - 15 - len(op) - 2 # 15 chars indentation, 1 space around op left_repr = py.io.saferepr(left, maxsize=int(width/2)) right_repr = py.io.saferepr(right, maxsize=width-len(left_repr)) - summary = '%s %s %s' % (left_repr, op, right_repr) + summary = u('%s %s %s') % (left_repr, op, right_repr) issequence = lambda x: (isinstance(x, (list, tuple, Sequence)) and not isinstance(x, basestring)) @@ -120,13 +152,12 @@ elif op == 'not in': if istext(left) and istext(right): explanation = _notin_text(left, right, verbose) - except py.builtin._sysex: - raise - except: + except Exception: excinfo = py.code.ExceptionInfo() explanation = [ - '(pytest_assertion plugin: representation of details failed. ' - 'Probably an object has a faulty __repr__.)', str(excinfo)] + u('(pytest_assertion plugin: representation of details failed. ' + 'Probably an object has a faulty __repr__.)'), + u(excinfo)] if not explanation: return None @@ -148,8 +179,8 @@ break if i > 42: i -= 10 # Provide some context - explanation = ['Skipping %s identical leading ' - 'characters in diff, use -v to show' % i] + explanation = [u('Skipping %s identical leading ' + 'characters in diff, use -v to show') % i] left = left[i:] right = right[i:] if len(left) == len(right): @@ -158,8 +189,8 @@ break if i > 42: i -= 10 # Provide some context - explanation += ['Skipping %s identical trailing ' - 'characters in diff, use -v to show' % i] + explanation += [u('Skipping %s identical trailing ' + 'characters in diff, use -v to show') % i] left = left[:-i] right = right[:-i] explanation += [line.strip('\n') @@ -172,16 +203,15 @@ explanation = [] for i in range(min(len(left), len(right))): if left[i] != right[i]: - explanation += ['At index %s diff: %r != %r' % - (i, left[i], right[i])] + explanation += [u('At index %s diff: %r != %r') + % (i, left[i], right[i])] break if len(left) > len(right): - explanation += [ - 'Left contains more items, first extra item: %s' % - py.io.saferepr(left[len(right)],)] + explanation += [u('Left contains more items, first extra item: %s') + % py.io.saferepr(left[len(right)],)] elif len(left) < len(right): explanation += [ - 'Right contains more items, first extra item: %s' % + 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)) @@ -192,11 +222,11 @@ diff_left = left - right diff_right = right - left if diff_left: - explanation.append('Extra items in the left set:') + explanation.append(u('Extra items in the left set:')) for item in diff_left: explanation.append(py.io.saferepr(item)) if diff_right: - explanation.append('Extra items in the right set:') + explanation.append(u('Extra items in the right set:')) for item in diff_right: explanation.append(py.io.saferepr(item)) return explanation @@ -207,25 +237,25 @@ common = set(left).intersection(set(right)) same = dict((k, left[k]) for k in common if left[k] == right[k]) if same and not verbose: - explanation += ['Omitting %s identical items, use -v to show' % + explanation += [u('Omitting %s identical items, use -v to show') % len(same)] elif same: - explanation += ['Common items:'] + explanation += [u('Common items:')] explanation += py.std.pprint.pformat(same).splitlines() diff = set(k for k in common if left[k] != right[k]) if diff: - explanation += ['Differing items:'] + explanation += [u('Differing items:')] for k in diff: explanation += [py.io.saferepr({k: left[k]}) + ' != ' + py.io.saferepr({k: right[k]})] extra_left = set(left) - set(right) if extra_left: - explanation.append('Left contains more items:') + explanation.append(u('Left contains more items:')) explanation.extend(py.std.pprint.pformat( dict((k, left[k]) for k in extra_left)).splitlines()) extra_right = set(right) - set(left) if extra_right: - explanation.append('Right contains more items:') + explanation.append(u('Right contains more items:')) explanation.extend(py.std.pprint.pformat( dict((k, right[k]) for k in extra_right)).splitlines()) return explanation @@ -237,14 +267,14 @@ tail = text[index+len(term):] correct_text = head + tail diff = _diff_text(correct_text, text, verbose) - newdiff = ['%s is contained here:' % py.io.saferepr(term, maxsize=42)] + newdiff = [u('%s is contained here:') % py.io.saferepr(term, maxsize=42)] for line in diff: - if line.startswith('Skipping'): + if line.startswith(u('Skipping')): continue - if line.startswith('- '): + if line.startswith(u('- ')): continue - if line.startswith('+ '): - newdiff.append(' ' + line[2:]) + if line.startswith(u('+ ')): + newdiff.append(u(' ') + line[2:]) else: newdiff.append(line) return newdiff diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 setup.py --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ long_description = open("README.rst").read() def main(): - install_requires = ["py>=1.4.17"] + install_requires = ["py>=1.4.19"] if sys.version_info < (2,7): install_requires.append("argparse") if sys.platform == "win32": @@ -27,7 +27,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.4.3.dev2', + version='2.5.0.dev1', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff -r 6bc51574e761e06bae5975cb51914a679bd4f60e -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 testing/test_assertion.py --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import sys import py, pytest @@ -176,6 +177,15 @@ expl = ' '.join(callequal('foo', 'bar')) assert 'raised in repr()' not in expl + def test_unicode(self): + left = py.builtin._totext('??', 'utf-8') + right = py.builtin._totext('?', 'utf-8') + expl = callequal(left, right) + assert expl[0] == py.builtin._totext("'??' == '?'", 'utf-8') + assert expl[1] == py.builtin._totext('- ??', 'utf-8') + assert expl[2] == py.builtin._totext('+ ?', 'utf-8') + + def test_python25_compile_issue257(testdir): testdir.makepyfile(""" def test_rewritten(): 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 notifications at travis-ci.org Wed Dec 11 11:37:02 2013 From: notifications at travis-ci.org (Travis CI) Date: Wed, 11 Dec 2013 10:37:02 +0000 Subject: [Pytest-commit] [Still Failing] hpk42/pytest#56 (master - 1b92e96) Message-ID: <52a8404dc11d8_249bc42119294@bdeb9bee-1d15-4010-9113-8423ac2713f9.mail> Build Update for hpk42/pytest ------------------------------------- Build: #56 Status: Still Failing Duration: 39 seconds Commit: 1b92e96 (master) Author: holger krekel Message: add changelog: fix issue319 - correctly show unicode in assertion errors. Many thanks to Floris Bruynooghe for the complete PR. Also means we depend on py>=1.4.19 now. View the changeset: https://github.com/hpk42/pytest/compare/732d67262a21...1b92e96b9a5a View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15276585 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Wed Dec 11 12:12:10 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Dec 2013 11:12:10 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: preparing 2.5.0 release announcement Message-ID: <20131211111210.7299.49964@app18.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/5105a08e9aa2/ Changeset: 5105a08e9aa2 User: hpk42 Date: 2013-12-11 12:12:01 Summary: preparing 2.5.0 release announcement Affected #: 3 files diff -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 -r 5105a08e9aa24fafd7898e85b06295636d12367c CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ -Unreleased +2.5.0 ----------------------------------- +- dropped python2.5 from automated release testing of pytest itself + which means it's probably going to break soon (but still works + with this release we believe). + - simplified and fixed implementation for calling finalizers when parametrized fixtures or function arguments are involved. finalization is now performed lazily at setup time instead of in the "teardown phase". diff -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 -r 5105a08e9aa24fafd7898e85b06295636d12367c doc/en/announce/index.txt --- a/doc/en/announce/index.txt +++ b/doc/en/announce/index.txt @@ -5,6 +5,7 @@ .. toctree:: :maxdepth: 2 + release-2.5.0 release-2.4.2 release-2.4.1 release-2.4.0 diff -r 3d74d1564b1bda43484a129dea8f9442b3a18f11 -r 5105a08e9aa24fafd7898e85b06295636d12367c doc/en/announce/release-2.5.0.txt --- /dev/null +++ b/doc/en/announce/release-2.5.0.txt @@ -0,0 +1,177 @@ +pytest-2.5.0: now down to ZERO reported bugs! +=========================================================================== + +pytest-2.5.0 is a big fixing release, the result of two community bug +fixing days plus numerous additional works from many people and +reporters. The release should be fully compatible to 2.4.2, existing +plugins and test suites. We aim at maintaining this level of ZERO reported +bugs because it's no fun if your testing tool has bugs, is it? Under a +condition, though: when submitting a bug report please provide +clear information about the circumstances and a simple example which +reproduces the problem. + +The issue tracker is of course not empty now. We have many remaining +"enhacement" issues which we'll hopefully can tackle in 2014 with your +help. + +For those who use older Python versions, please note that pytest is not +automatically tested on python2.5 due to virtualenv, setuptools and tox +not supporting it anymore. Manual verification shows that it mostly +works fine but it's not going to be part of the automated release +process and thus likely to break in the future. + +As usual, current docs are at + + http://pytest.org + +and you can upgrade from pypi via:: + + pip install -U pytest + +Particular thanks for helping with this release go to Anatoly Bubenkoff, +Floris Bruynooghe, Marc Abramowitz, Ralph Schmitt, Ronny Pfannschmidt, +Donald Stufft, James Lan, Rob Dennis, Jason R. Coombs, Mathieu Agopian, +Virgil Dupras, Bruno Oliveira, Alex Gaynor and others. + +have fun, +holger krekel + + +2.5.0 +----------------------------------- + +- dropped python2.5 from automated release testing of pytest itself + which means it's probably going to break soon (but still works + with this release we believe). + +- simplified and fixed implementation for calling finalizers when + +- simplified and fixed implementation for calling finalizers when + parametrized fixtures or function arguments are involved. finalization + is now performed lazily at setup time instead of in the "teardown phase". + While this might sound odd at first, it helps to ensure that we are + correctly handling setup/teardown even in complex code. User-level code + should not be affected unless it's implementing the pytest_runtest_teardown + hook and expecting certain fixture instances are torn down within (very + unlikely and would have been unreliable anyway). + +- PR90: add --color=yes|no|auto option to force terminal coloring + mode ("auto" is default). Thanks Marc Abramowitz. + +- fix issue319 - correctly show unicode in assertion errors. Many + thanks to Floris Bruynooghe for the complete PR. Also means + we depend on py>=1.4.19 now. + +- fix issue396 - correctly sort and finalize class-scoped parametrized + tests independently from number of methods on the class. + +- refix issue323 in a better way -- parametrization should now never + cause Runtime Recursion errors because the underlying algorithm + for re-ordering tests per-scope/per-fixture is not recursive + anymore (it was tail-call recursive before which could lead + to problems for more than >966 non-function scoped parameters). + +- fix issue290 - there is preliminary support now for parametrizing + with repeated same values (sometimes useful to to test if calling + a second time works as with the first time). + +- close issue240 - document precisely how pytest module importing + works, discuss the two common test directory layouts, and how it + interacts with PEP420-namespace packages. + +- fix issue246 fix finalizer order to be LIFO on independent fixtures + depending on a parametrized higher-than-function scoped fixture. + (was quite some effort so please bear with the complexity of this sentence :) + Thanks Ralph Schmitt for the precise failure example. + +- fix issue244 by implementing special index for parameters to only use + indices for paramentrized test ids + +- fix issue287 by running all finalizers but saving the exception + from the first failing finalizer and re-raising it so teardown will + still have failed. We reraise the first failing exception because + it might be the cause for other finalizers to fail. + +- fix ordering when mock.patch or other standard decorator-wrappings + are used with test methods. This fixues issue346 and should + help with random "xdist" collection failures. Thanks to + Ronny Pfannschmidt and Donald Stufft for helping to isolate it. + +- fix issue357 - special case "-k" expressions to allow for + filtering with simple strings that are not valid python expressions. + Examples: "-k 1.3" matches all tests parametrized with 1.3. + "-k None" filters all tests that have "None" in their name + and conversely "-k 'not None'". + Previously these examples would raise syntax errors. + +- fix issue384 by removing the trial support code + since the unittest compat enhancements allow + trial to handle it on its own + +- don't hide an ImportError when importing a plugin produces one. + fixes issue375. + +- fix issue275 - allow usefixtures and autouse fixtures + for running doctest text files. + +- fix issue380 by making --resultlog only rely on longrepr instead + of the "reprcrash" attribute which only exists sometimes. + +- address issue122: allow @pytest.fixture(params=iterator) by exploding + into a list early on. + +- fix pexpect-3.0 compatibility for pytest's own tests. + (fixes issue386) + +- allow nested parametrize-value markers, thanks James Lan for the PR. + +- fix unicode handling with new monkeypatch.setattr(import_path, value) + API. Thanks Rob Dennis. Fixes issue371. + +- fix unicode handling with junitxml, fixes issue368. + +- In assertion rewriting mode on Python 2, fix the detection of coding + cookies. See issue #330. + +- make "--runxfail" turn imperative pytest.xfail calls into no ops + (it already did neutralize pytest.mark.xfail markers) + +- refine pytest / pkg_resources interactions: The AssertionRewritingHook + PEP302 compliant loader now registers itself with setuptools/pkg_resources + properly so that the pkg_resources.resource_stream method works properly. + Fixes issue366. Thanks for the investigations and full PR to Jason R. Coombs. + +- pytestconfig fixture is now session-scoped as it is the same object during the + whole test run. Fixes issue370. + +- avoid one surprising case of marker malfunction/confusion:: + + @pytest.mark.some(lambda arg: ...) + def test_function(): + + would not work correctly because pytest assumes @pytest.mark.some + gets a function to be decorated already. We now at least detect if this + arg is an lambda and thus the example will work. Thanks Alex Gaynor + for bringing it up. + +- xfail a test on pypy that checks wrong encoding/ascii (pypy does + not error out). fixes issue385. + +- internally make varnames() deal with classes's __init__, + although it's not needed by pytest itself atm. Also + fix caching. Fixes issue376. + +- fix issue221 - handle importing of namespace-package with no + __init__.py properly. + +- refactor internal FixtureRequest handling to avoid monkeypatching. + One of the positive user-facing effects is that the "request" object + can now be used in closures. + +- fixed version comparison in pytest.importskip(modname, minverstring) + +- fix issue377 by clarifying in the nose-compat docs that pytest + does not duplicate the unittest-API into the "plain" namespace. + +- fix verbose reporting for @mock'd test functions + 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 Dec 11 12:20:27 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Dec 2013 11:20:27 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: regen docs and bump version to 2.5.0 Message-ID: <20131211112027.19811.63719@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/1cc371f91516/ Changeset: 1cc371f91516 User: hpk42 Date: 2013-12-11 12:20:19 Summary: regen docs and bump version to 2.5.0 Affected #: 17 files diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.5.0.dev1' +__version__ = '2.5.0' diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_assert1.py F @@ -116,7 +116,7 @@ $ py.test test_assert2.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_assert2.py F diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_module.py .F @@ -78,7 +78,7 @@ test_module.py:9: AssertionError ----------------------------- Captured stdout ------------------------------ - setting up + setting up ==================== 1 failed, 1 passed in 0.01 seconds ==================== Accessing captured output from a test function diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 doc/en/doctest.txt --- a/doc/en/doctest.txt +++ b/doc/en/doctest.txt @@ -44,7 +44,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items mymodule.py . diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 doc/en/example/markers.txt --- a/doc/en/example/markers.txt +++ b/doc/en/example/markers.txt @@ -28,7 +28,7 @@ $ py.test -v -m webtest =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -40,7 +40,7 @@ $ py.test -v -m "not webtest" =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:6: test_something_quick PASSED @@ -61,7 +61,7 @@ $ py.test -v -k http # running with the above defined example module =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -73,7 +73,7 @@ $ py.test -k "not send_http" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:6: test_something_quick PASSED @@ -86,7 +86,7 @@ $ py.test -k "http or quick" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -129,7 +129,7 @@ @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.parametrize(argnames, argvalues): call a test function multiple times passing in multiple different argument value sets. 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. + @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. @pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see http://pytest.org/latest/fixture.html#usefixtures @@ -266,7 +266,7 @@ $ py.test -E stage2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_someenv.py s @@ -277,7 +277,7 @@ $ py.test -E stage1 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_someenv.py . @@ -293,7 +293,7 @@ @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.parametrize(argnames, argvalues): call a test function multiple times passing in multiple different argument value sets. 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. + @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. @pytest.mark.usefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see http://pytest.org/latest/fixture.html#usefixtures @@ -395,12 +395,12 @@ $ py.test -rs # this option reports skip reasons =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 4 items test_plat.py s.s. ========================= short test summary info ========================== - SKIP [2] /tmp/doc-exec-598/conftest.py:12: cannot run on platform linux2 + SKIP [2] /tmp/doc-exec-62/conftest.py:12: cannot run on platform linux2 =================== 2 passed, 2 skipped in 0.01 seconds ==================== @@ -408,7 +408,7 @@ $ py.test -m linux2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 4 items test_plat.py . @@ -459,7 +459,7 @@ $ py.test -m interface --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 4 items test_module.py FF @@ -480,7 +480,7 @@ $ py.test -m "interface or event" --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 4 items test_module.py FFF @@ -499,4 +499,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 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_simple.yml .F @@ -56,7 +56,7 @@ nonpython $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 2 items test_simple.yml:1: usecase: ok PASSED @@ -74,7 +74,7 @@ nonpython $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 4 items @@ -182,7 +182,7 @@ $ py.test test_backends.py --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items @@ -197,7 +197,7 @@ ================================= FAILURES ================================= _________________________ test_db_initialized[d2] __________________________ - db = + db = def test_db_initialized(db): # a dummy test @@ -253,14 +253,14 @@ ================================= FAILURES ================================= ________________________ TestClass.test_equals[1-2] ________________________ - self = , a = 1, b = 2 + self = , a = 1, b = 2 def test_equals(self, a, b): > assert a == b E assert 1 == 2 test_parametrize.py:18: AssertionError - 1 failed, 2 passed in 0.02 seconds + 1 failed, 2 passed in 0.01 seconds Indirect parametrization with multiple fixtures -------------------------------------------------------------- @@ -282,7 +282,7 @@ ............sss............sss............sss............ssssssssssssssssss ========================= short test summary info ========================== SKIP [27] /home/hpk/p/pytest/doc/en/example/multipython.py:21: 'python2.8' not found - 48 passed, 27 skipped in 1.37 seconds + 48 passed, 27 skipped in 1.41 seconds Indirect parametrization of optional implementations/imports -------------------------------------------------------------------- @@ -329,12 +329,12 @@ $ py.test -rs test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items - test_module.py s. + test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-600/conftest.py:10: could not import 'opt2' + SKIP [1] /tmp/doc-exec-64/conftest.py:10: could not import 'opt2' =================== 1 passed, 1 skipped in 0.01 seconds ==================== diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items @@ -88,7 +88,7 @@ . $ py.test --collect-only pythoncollection.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 3 items @@ -141,7 +141,7 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 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 = () + E + and 43 = () 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 = () 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 = .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 = .b + E + where = () failure_demo.py:107: AssertionError __________________________ test_attribute_failure __________________________ @@ -319,7 +319,7 @@ failure_demo.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - self = + self = 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 = .b + E + where = () + E + and 2 = .b + E + where = () 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:905>:1: ValueError + <0-codegen /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:976>: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,7 +398,7 @@ l is [1, 2, 3] ________________________ TestRaises.test_some_error ________________________ - self = + self = def test_some_error(self): > if namenotexi: @@ -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(): @@ -455,7 +455,7 @@ failure_demo.py:5: AssertionError ___________________ TestMoreErrors.test_z1_unpack_error ____________________ - self = + self = def test_z1_unpack_error(self): l = [] @@ -465,7 +465,7 @@ failure_demo.py:179: ValueError ____________________ TestMoreErrors.test_z2_type_error _____________________ - self = + self = def test_z2_type_error(self): l = 3 @@ -475,19 +475,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(): @@ -495,15 +495,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' = () + E + and '456' = () failure_demo.py:195: AssertionError _____________________ TestMoreErrors.test_global_func ______________________ - self = + self = def test_global_func(self): > assert isinstance(globf(42), float) @@ -513,18 +513,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 @@ -534,7 +534,7 @@ failure_demo.py:205: AssertionError _____________________ TestMoreErrors.test_try_finally ______________________ - self = + self = def test_try_finally(self): x = 1 @@ -543,4 +543,4 @@ E assert 1 == 0 failure_demo.py:210: AssertionError - ======================== 39 failed in 0.26 seconds ========================= + ======================== 39 failed in 0.23 seconds ========================= diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-603/conftest.py:9: need --runslow option to run + SKIP [1] /tmp/doc-exec-67/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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_module.py .. @@ -256,7 +256,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 project deps: mylib-1.1 collected 0 items @@ -279,7 +279,7 @@ $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 0 items ============================= in 0.00 seconds ============================= @@ -322,7 +322,7 @@ $ py.test --durations=3 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 3 items test_some_are_slow.py ... @@ -383,7 +383,7 @@ $ py.test -rx =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 7 items test_step.py .Fx. @@ -463,17 +463,17 @@ ================================== ERRORS ================================== _______________________ ERROR at setup of test_root ________________________ - file /tmp/doc-exec-603/b/test_error.py, line 1 + file /tmp/doc-exec-67/b/test_error.py, line 1 def test_root(db): # no db here, will error out fixture 'db' not found - available fixtures: pytestconfig, recwarn, monkeypatch, capfd, capsys, tmpdir + available fixtures: monkeypatch, capsys, tmpdir, capfd, pytestconfig, recwarn use 'py.test --fixtures [testpath]' for help on them. - /tmp/doc-exec-603/b/test_error.py:1 + /tmp/doc-exec-67/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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_module.py FF @@ -561,7 +561,7 @@ ================================= FAILURES ================================= ________________________________ test_fail1 ________________________________ - tmpdir = local('/tmp/pytest-190/test_fail10') + tmpdir = local('/tmp/pytest-281/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-190/test_fail10) + test_module.py::test_fail1 (/tmp/pytest-281/test_fail10) test_module.py::test_fail2 Making test result information available in fixtures @@ -643,7 +643,7 @@ $ py.test -s test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 3 items test_module.py Esetting up a test failed! test_module.py::test_setup_fails @@ -676,7 +676,7 @@ E assert 0 test_module.py:15: AssertionError - ==================== 2 failed, 1 error in 0.02 seconds ===================== + ==================== 2 failed, 1 error in 0.01 seconds ===================== You'll see that the fixture finalizers could use the precise reporting information. diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_smtpsimple.py F @@ -84,7 +84,7 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response, msg = smtp.ehlo() @@ -94,7 +94,7 @@ E assert 0 test_smtpsimple.py:12: AssertionError - ========================= 1 failed in 0.18 seconds ========================= + ========================= 1 failed in 0.21 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 +194,7 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 2 items test_module.py FF @@ -202,7 +202,7 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -214,7 +214,7 @@ test_module.py:6: AssertionError ________________________________ test_noop _________________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -223,7 +223,7 @@ E assert 0 test_module.py:11: AssertionError - ========================= 2 failed in 0.16 seconds ========================= + ========================= 2 failed in 0.19 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 +271,7 @@ $ py.test -s -q --tb=no FFteardown smtp - 2 failed in 0.15 seconds + 2 failed in 0.24 seconds We see that the ``smtp`` instance is finalized after the two tests finished execution. Note that if we decorated our fixture @@ -312,7 +312,7 @@ $ py.test -s -q --tb=no FF - 2 failed in 0.16 seconds + 2 failed in 0.23 seconds Let's quickly create another test module that actually sets the server URL in its module namespace:: @@ -379,7 +379,7 @@ ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -391,7 +391,7 @@ test_module.py:6: AssertionError __________________________ test_noop[merlinux.eu] __________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -402,7 +402,7 @@ test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -411,9 +411,11 @@ E assert 'merlinux' in 'mail.python.org\nSIZE 25600000\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN' test_module.py:5: AssertionError + ----------------------------- Captured stdout ------------------------------ + finalizing ________________________ test_noop[mail.python.org] ________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -422,7 +424,7 @@ E assert 0 test_module.py:11: AssertionError - 4 failed in 6.32 seconds + 4 failed in 6.30 seconds We see that our two test functions each ran twice, against the different ``smtp`` instances. Note also, that with the ``mail.python.org`` @@ -462,13 +464,13 @@ $ py.test -v test_appsetup.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 2 items + test_appsetup.py:12: test_smtp_exists[merlinux.eu] PASSED test_appsetup.py:12: test_smtp_exists[mail.python.org] PASSED - test_appsetup.py:12: test_smtp_exists[merlinux.eu] PASSED - ========================= 2 passed in 5.75 seconds ========================= + ========================= 2 passed in 5.63 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two different ``App`` instances and respective smtp servers. There is no @@ -526,7 +528,7 @@ $ py.test -v -s test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 8 items test_module.py:15: test_0[1] test0 1 diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 doc/en/getting-started.txt --- a/doc/en/getting-started.txt +++ b/doc/en/getting-started.txt @@ -23,7 +23,7 @@ To check your installation has installed the correct version:: $ py.test --version - This is py.test version 2.4.2, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc + This is py.test version 2.5.0, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc If you get an error checkout :ref:`installation issues`. @@ -45,7 +45,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_sample.py F @@ -123,7 +123,7 @@ ================================= FAILURES ================================= ____________________________ TestClass.test_two ____________________________ - self = + self = def test_two(self): x = "hello" @@ -159,7 +159,7 @@ ================================= FAILURES ================================= _____________________________ test_needsfiles ______________________________ - tmpdir = local('/tmp/pytest-186/test_needsfiles0') + tmpdir = local('/tmp/pytest-277/test_needsfiles0') def test_needsfiles(tmpdir): print tmpdir @@ -168,7 +168,7 @@ test_tmpdir.py:3: AssertionError ----------------------------- Captured stdout ------------------------------ - /tmp/pytest-186/test_needsfiles0 + /tmp/pytest-277/test_needsfiles0 1 failed in 0.01 seconds Before the test runs, a unique-per-test-invocation temporary directory diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 doc/en/parametrize.txt --- a/doc/en/parametrize.txt +++ b/doc/en/parametrize.txt @@ -53,8 +53,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.3.dev1 - plugins: xdist, cov, pep8, xprocess, capturelog, cache, flakes, instafail + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 3 items test_expectation.py ..F @@ -75,7 +74,7 @@ E + where 54 = eval('6*9') test_expectation.py:8: AssertionError - ==================== 1 failed, 2 passed in 0.04 seconds ==================== + ==================== 1 failed, 2 passed in 0.01 seconds ==================== As designed in this example, only one pair of input/output values fails the simple test function. And as usual with test function arguments, @@ -101,13 +100,12 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.3.dev1 - plugins: xdist, cov, pep8, xprocess, capturelog, cache, flakes, instafail + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 3 items test_expectation.py ..x - =================== 2 passed, 1 xfailed in 0.02 seconds ==================== + =================== 2 passed, 1 xfailed in 0.01 seconds ==================== The one parameter set which caused a failure previously now shows up as an "xfailed (expected to fail)" test. @@ -172,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 @@ -187,7 +185,7 @@ $ py.test -q -rs test_strings.py s ========================= short test summary info ========================== - SKIP [1] /home/hpk/p/pytest/_pytest/python.py:1019: got empty parameter set, function test_valid_string at /tmp/doc-exec-686/test_strings.py:1 + SKIP [1] /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:1087: got empty parameter set, function test_valid_string at /tmp/doc-exec-24/test_strings.py:1 1 skipped in 0.01 seconds For further examples, you might want to look at :ref:`more diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 doc/en/skipping.txt --- a/doc/en/skipping.txt +++ b/doc/en/skipping.txt @@ -159,7 +159,7 @@ example $ py.test -rx xfail_demo.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 6 items xfail_demo.py xxxxxx @@ -176,7 +176,7 @@ XFAIL xfail_demo.py::test_hello6 reason: reason - ======================== 6 xfailed in 0.05 seconds ========================= + ======================== 6 xfailed in 0.06 seconds ========================= .. _`skip/xfail with parametrize`: diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 collected 1 items test_tmpdir.py F @@ -37,7 +37,7 @@ ================================= FAILURES ================================= _____________________________ test_create_file _____________________________ - tmpdir = local('/tmp/pytest-187/test_create_file0') + tmpdir = local('/tmp/pytest-278/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 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 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.3 -- pytest-2.4.2 + platform linux2 -- Python 2.7.3 -- pytest-2.5.0 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: test_unittest_db.py:9: AssertionError ___________________________ MyTest.test_method2 ____________________________ @@ -110,7 +110,7 @@ def test_method2(self): > assert 0, self.db # fail for demo purposes - E AssertionError: + E AssertionError: test_unittest_db.py:12: AssertionError ========================= 2 failed in 0.02 seconds ========================= diff -r 5105a08e9aa24fafd7898e85b06295636d12367c -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.5.0.dev1', + version='2.5.0', 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 Wed Dec 11 20:30:57 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Dec 2013 19:30:57 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131211193057.5048.93421@app03.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/a7ce35bd131a/ Changeset: a7ce35bd131a Branch: plugins-index User: nicoddemus Date: 2013-10-14 22:31:48 Summary: Closed branch plugins-index Affected #: 0 files https://bitbucket.org/hpk42/pytest/commits/4b3ab8c3b715/ Changeset: 4b3ab8c3b715 User: nicoddemus Date: 2013-12-11 20:28:08 Summary: Updated plugins_index.txt with latest plugins Affected #: 1 file diff -r 1cc371f915168249b0db38d2c3e2b95453f7c9c3 -r 4b3ab8c3b715d5bb76ee347885607977cf400ccc doc/en/plugins_index/plugins_index.txt --- a/doc/en/plugins_index/plugins_index.txt +++ b/doc/en/plugins_index/plugins_index.txt @@ -6,59 +6,59 @@ ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= Name Author Downloads Python 2.7 Python 3.3 Summary ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= - `pytest-bdd-0.6.4 `_ `Oleg Pidsadnyi `_ 1156 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.4?py=py33&pytest=2.4.2 BDD for pytest - `pytest-bdd-splinter-0.5.2 `_ `Oleg Pidsadnyi `_ 540 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.2?py=py33&pytest=2.4.2 Splinter subplugin for Pytest BDD plugin - `pytest-bench-0.2.5 `_ `Concordus Applications `_ 826 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.4.2 Benchmark utility that plugs into pytest. - `pytest-blockage-0.1 `_ `UNKNOWN `_ 121 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.4.2 Disable network requests during a test run. - `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 72 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.4.2 BrowserMob proxy plugin for py.test. - `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 115 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.4.2 py.test bugzilla integration plugin - `pytest-cache-1.0 `_ `Holger Krekel `_ 5191 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.4.2 pytest plugin with mechanisms for caching across test runs - `pytest-capturelog-0.7 `_ `Meme Dough `_ 1788 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.4.2 py.test plugin to capture log messages - `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 235 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.4.2 pytest plugin to add source code sanity checks (pep8 and friends) - `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 106 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.4.2 Define pytest fixtures as context managers. - `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 187 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.4.2 py.test extension for per-test couchdb databases using couchdbkit - `pytest-cov-1.6 `_ `Meme Dough `_ 21817 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.4.2 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - `pytest-dbfixtures-0.3.8.8 `_ `Clearcode - The A Room `_ 2090 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.3.8.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.3.8.8?py=py33&pytest=2.4.2 dbfixtures plugin for py.test. - `pytest-django-2.4 `_ `Andreas Pelme `_ 4461 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.4.2 A Django plugin for py.test. - `pytest-django-lite-0.1.0 `_ `David Cramer `_ 820 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.4.2 The bare minimum to integrate py.test with Django. - `pytest-figleaf-1.0 `_ `holger krekel `_ 69 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.4.2 py.test figleaf coverage plugin - `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1002 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.4.2 pytest plugin to check source code with pyflakes - `pytest-greendots-0.2 `_ `UNKNOWN `_ 163 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.4.2 Green progress dots - `pytest-growl-0.1 `_ `Anthony Long `_ 87 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.4.2 Growl notifications for pytest results. - `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 219 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.4.2 an incremental test runner (pytest plugin) - `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 313 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.4.2 py.test plugin to show failures instantly - `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 72 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.4.2 A py.test plug-in to enable drop to ipdb debugger on test failure. - `pytest-jira-0.01 `_ `James Laska `_ 269 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.4.2 py.test JIRA integration plugin, using markers - `pytest-konira-0.2 `_ `Alfredo Deza `_ 95 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.4.2 Run Konira DSL tests with py.test - `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 625 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.4.2 py.test plugin to test server connections locally. - `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 166 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.4.2 py.test bugzilla integration plugin, using markers - `pytest-markfiltration-0.8 `_ `adam goucher `_ 222 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.4.2 UNKNOWN - `pytest-marks-0.4 `_ `adam goucher `_ 201 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.4.2 UNKNOWN - `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 110 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.4.2 pytest's monkeypatch subclass with extra functionalities - `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 621 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.4.2 Mozilla WebQA plugin for py.test. - `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 147 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.4.2 pytest plugin to test OpenERP modules - `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 202 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.4.2 OS X notifications for py.test results. - `pytest-paste-config-0.1 `_ `UNKNOWN `_ 123 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.4.2 Allow setting the path to a paste config file - `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5096 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.4.2 pytest plugin to check PEP8 requirements - `pytest-poo-0.2 `_ `Andreas Pelme `_ 93 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.4.2 Visualize your crappy tests - `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.4.2 py.test plugin to connect to a remote debug server with PyDev or PyCharm. - `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 152 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.4.2 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. - `pytest-quickcheck-0.7 `_ `Tetsuya Morimoto `_ 182 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.7?py=py33&pytest=2.4.2 pytest plugin to generate random data inspired by QuickCheck - `pytest-rage-0.1 `_ `Leonardo Santagada `_ 67 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.4.2 pytest plugin to implement PEP712 - `pytest-random-0.02 `_ `Leah Klearman `_ 111 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.4.2 py.test plugin to randomize tests - `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 79 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.4.2 py.test plugin to re-run tests to eliminate flakey failures - `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 95 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.4.2 implement a --failed option for pytest - `pytest-runner-2.0 `_ `Jason R. Coombs `_ 7458 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.4.2 UNKNOWN - `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 323 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.4.2 py.test plugin that adds instafail, ETA and neat graphics - `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 3689 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.4.2 pytest plugin to abort tests after a timeout - `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 504 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.4.2 A twisted plugin for py.test. - `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 7287 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.4.2 py.test xdist plugin for distributed testing and loop-on-failing modes - `pytest-xprocess-0.8 `_ `Holger Krekel `_ 118 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.4.2 pytest plugin to manage external processes across test runs - `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 187 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.4.2 Run tests against wsgi apps defined in yaml - `pytest-zap-0.1 `_ `Dave Hunt `_ 71 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.4.2 OWASP ZAP plugin for py.test. + `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1467 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.4.2 BDD for pytest + `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3352 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.4.2 Splinter subplugin for Pytest BDD plugin + `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1560 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.4.2 Benchmark utility that plugs into pytest. + `pytest-blockage-0.1 `_ `UNKNOWN `_ 102 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.4.2 Disable network requests during a test run. + `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 55 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.4.2 BrowserMob proxy plugin for py.test. + `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 89 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.4.2 py.test bugzilla integration plugin + `pytest-cache-1.0 `_ `Holger Krekel `_ 5561 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.4.2 pytest plugin with mechanisms for caching across test runs + `pytest-capturelog-0.7 `_ `Meme Dough `_ 1553 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.4.2 py.test plugin to capture log messages + `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 384 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.4.2 pytest plugin to add source code sanity checks (pep8 and friends) + `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 92 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.4.2 Define pytest fixtures as context managers. + `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.4.2 py.test extension for per-test couchdb databases using couchdbkit + `pytest-cov-1.6 `_ `Meme Dough `_ 23291 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.4.2 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6223 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.4.2 dbfixtures plugin for py.test. + `pytest-django-2.4 `_ `Andreas Pelme `_ 4809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.4.2 A Django plugin for py.test. + `pytest-django-lite-0.1.0 `_ `David Cramer `_ 987 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.4.2 The bare minimum to integrate py.test with Django. + `pytest-figleaf-1.0 `_ `holger krekel `_ 53 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.4.2 py.test figleaf coverage plugin + `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1146 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.4.2 pytest plugin to check source code with pyflakes + `pytest-greendots-0.2 `_ `UNKNOWN `_ 139 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.4.2 Green progress dots + `pytest-growl-0.1 `_ `Anthony Long `_ 58 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.4.2 Growl notifications for pytest results. + `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 180 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.4.2 an incremental test runner (pytest plugin) + `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 418 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.4.2 py.test plugin to show failures instantly + `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 93 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.4.2 A py.test plug-in to enable drop to ipdb debugger on test failure. + `pytest-jira-0.01 `_ `James Laska `_ 86 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.4.2 py.test JIRA integration plugin, using markers + `pytest-konira-0.2 `_ `Alfredo Deza `_ 91 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.4.2 Run Konira DSL tests with py.test + `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 448 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.4.2 py.test plugin to test server connections locally. + `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 191 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.4.2 py.test bugzilla integration plugin, using markers + `pytest-markfiltration-0.8 `_ `adam goucher `_ 253 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.4.2 UNKNOWN + `pytest-marks-0.4 `_ `adam goucher `_ 225 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.4.2 UNKNOWN + `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 123 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.4.2 pytest's monkeypatch subclass with extra functionalities + `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1037 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.4.2 Mozilla WebQA plugin for py.test. + `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 144 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.4.2 pytest plugin to test OpenERP modules + `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 184 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.4.2 OS X notifications for py.test results. + `pytest-paste-config-0.1 `_ `UNKNOWN `_ 164 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.4.2 Allow setting the path to a paste config file + `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.4.2 pytest plugin to check PEP8 requirements + `pytest-poo-0.2 `_ `Andreas Pelme `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.4.2 Visualize your crappy tests + `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 100 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.4.2 py.test plugin to connect to a remote debug server with PyDev or PyCharm. + `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 129 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.4.2 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. + `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 345 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.4.2 pytest plugin to generate random data inspired by QuickCheck + `pytest-rage-0.1 `_ `Leonardo Santagada `_ 56 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.4.2 pytest plugin to implement PEP712 + `pytest-random-0.02 `_ `Leah Klearman `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.4.2 py.test plugin to randomize tests + `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 147 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.4.2 py.test plugin to re-run tests to eliminate flakey failures + `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 88 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.4.2 implement a --failed option for pytest + `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5657 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.4.2 UNKNOWN + `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 348 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.4.2 py.test plugin that adds instafail, ETA and neat graphics + `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4351 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.4.2 pytest plugin to abort tests after a timeout + `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 239 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.4.2 A twisted plugin for py.test. + `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 7894 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.4.2 py.test xdist plugin for distributed testing and loop-on-failing modes + `pytest-xprocess-0.8 `_ `Holger Krekel `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.4.2 pytest plugin to manage external processes across test runs + `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 194 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.4.2 Run tests against wsgi apps defined in yaml + `pytest-zap-0.1 `_ `Dave Hunt `_ 63 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.4.2 OWASP ZAP plugin for py.test. ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= *(Downloads are given from last month only)* -*(Updated on 2013-11-12)* +*(Updated on 2013-12-11)* 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 Dec 12 06:42:03 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Dec 2013 05:42:03 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix expicit assert messages for Python2.6: it turns out python2.6 Message-ID: <20131212054203.5116.819@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/121888e5a1f6/ Changeset: 121888e5a1f6 User: hpk42 Date: 2013-12-12 06:41:48 Summary: fix expicit assert messages for Python2.6: it turns out python2.6 instantiates the AssertionError differently for tuples. Test and fix to neutralize it. Affected #: 2 files diff -r 4b3ab8c3b715d5bb76ee347885607977cf400ccc -r 121888e5a1f6844e33b89731e14b50f54dc30777 _pytest/assertion/reinterpret.py --- a/_pytest/assertion/reinterpret.py +++ b/_pytest/assertion/reinterpret.py @@ -1,18 +1,26 @@ import sys import py from _pytest.assertion.util import BuiltinAssertionError +u = py.builtin._totext class AssertionError(BuiltinAssertionError): def __init__(self, *args): BuiltinAssertionError.__init__(self, *args) if args: + # on Python2.6 we get len(args)==2 for: assert 0, (x,y) + # on Python2.7 and above we always get len(args) == 1 + # with args[0] being the (x,y) tuple. + if len(args) > 1: + toprint = args + else: + toprint = args[0] try: - self.msg = py.builtin._totext(args[0]) + self.msg = u(toprint) except Exception: - self.msg = py.builtin._totext( + self.msg = u( "<[broken __repr__] %s at %0xd>" - % (args[0].__class__, id(args[0]))) + % (toprint.__class__, id(toprint))) else: f = py.code.Frame(sys._getframe(1)) try: diff -r 4b3ab8c3b715d5bb76ee347885607977cf400ccc -r 121888e5a1f6844e33b89731e14b50f54dc30777 testing/test_assertion.py --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -386,3 +386,16 @@ result.stdout.fnmatch_lines(""" """) + +def test_AssertionError_message(testdir): + testdir.makepyfile(""" + def test_hello(): + x,y = 1,2 + assert 0, (x,y) + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(""" + *def test_hello* + *assert 0, (x,y)* + *AssertionError: (1, 2)* + """) 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 Dec 12 07:30:49 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Dec 2013 06:30:49 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131212063049.7174.31996@app09.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/e5f3e2cf9be5/ Changeset: e5f3e2cf9be5 User: hpk42 Date: 2013-12-12 06:55:05 Summary: remove unusued import Affected #: 1 file diff -r 121888e5a1f6844e33b89731e14b50f54dc30777 -r e5f3e2cf9be53ed4b9dd263ddae9b1120dcd376d testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -1,7 +1,6 @@ """ terminal reporting of the full testing process. """ -import os import pytest, py import sys https://bitbucket.org/hpk42/pytest/commits/10c2993a6ba2/ Changeset: 10c2993a6ba2 User: hpk42 Date: 2013-12-12 07:30:34 Summary: don't declare py25 as supported anymore. Affected #: 1 file diff -r e5f3e2cf9be53ed4b9dd263ddae9b1120dcd376d -r 10c2993a6ba2e94a0857635af5e376dff987f2a2 setup.py --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3'] + [ ("Programming Language :: Python :: %s" % x) for x in - "2.5 2.6 2.7 3.0 3.1 3.2 3.3".split()] + "2.6 2.7 3.0 3.1 3.2 3.3".split()] long_description = open("README.rst").read() def main(): 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 Dec 12 13:06:37 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Dec 2013 12:06:37 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20131212120637.2578.19799@app13.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/186d646bd9fe/ Changeset: 186d646bd9fe User: hpk42 Date: 2013-12-12 08:16:16 Summary: remove py25 from automated testing Affected #: 1 file diff -r 10c2993a6ba2e94a0857635af5e376dff987f2a2 -r 186d646bd9fee69c33a73f60649495605f736973 tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] distshare={homedir}/.tox/distshare -envlist=flakes,py25,py26,py27,pypy,py27-pexpect,py33-pexpect,py27-nobyte,py32,py33,py27-xdist,py33-xdist,trial +envlist=flakes,py26,py27,pypy,py27-pexpect,py33-pexpect,py27-nobyte,py32,py33,py27-xdist,py33-xdist,trial [testenv] changedir=testing @@ -12,11 +12,6 @@ changedir=. commands= py.test --genscript=pytest1 -[testenv:py25] -setenv = - PIP_INSECURE=1 -deps=nose - [testenv:flakes] changedir= deps = pytest-flakes>=0.2 https://bitbucket.org/hpk42/pytest/commits/a064ad64d167/ Changeset: a064ad64d167 User: hpk42 Date: 2013-12-12 13:01:57 Summary: fix typo Affected #: 1 file diff -r 186d646bd9fee69c33a73f60649495605f736973 -r a064ad64d167508a8e9e73766b1a4e6bd10c85db doc/en/announce/release-2.5.0.txt --- a/doc/en/announce/release-2.5.0.txt +++ b/doc/en/announce/release-2.5.0.txt @@ -45,8 +45,6 @@ with this release we believe). - simplified and fixed implementation for calling finalizers when - -- simplified and fixed implementation for calling finalizers when parametrized fixtures or function arguments are involved. finalization is now performed lazily at setup time instead of in the "teardown phase". While this might sound odd at first, it helps to ensure that we are https://bitbucket.org/hpk42/pytest/commits/17bb6cf96f5f/ Changeset: 17bb6cf96f5f User: hpk42 Date: 2013-12-12 13:06:21 Summary: Added tag 2.5.0 for changeset a064ad64d167 Affected #: 1 file diff -r a064ad64d167508a8e9e73766b1a4e6bd10c85db -r 17bb6cf96f5fdd92212f1ebf34d5799b1ca4a992 .hgtags --- a/.hgtags +++ b/.hgtags @@ -63,3 +63,4 @@ af860de70cc3f157ac34ca1d4bf557a057bff775 2.4.0 8828c924acae0b4cad2e2cb92943d51da7cb744a 2.4.1 8d051f89184bfa3033f5e59819dff9f32a612941 2.4.2 +a064ad64d167508a8e9e73766b1a4e6bd10c85db 2.5.0 https://bitbucket.org/hpk42/pytest/commits/98efed365b18/ Changeset: 98efed365b18 User: hpk42 Date: 2013-12-12 13:06:25 Summary: some doc fixes Affected #: 2 files diff -r 17bb6cf96f5fdd92212f1ebf34d5799b1ca4a992 -r 98efed365b187b80af771abc085c8840546d104d doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -17,8 +17,8 @@ # # The full version, including alpha/beta/rc tags. # The short X.Y version. -version = "2.4.2" -release = "2.4.2" +version = "2.5.0" +release = "2.5.0" import sys, os diff -r 17bb6cf96f5fdd92212f1ebf34d5799b1ca4a992 -r 98efed365b187b80af771abc085c8840546d104d doc/en/index.txt --- a/doc/en/index.txt +++ b/doc/en/index.txt @@ -1,7 +1,7 @@ .. _features: -.. note:: second training: `professional testing with Python `_ , 25-27th November 2013, Leipzig. +.. second training: `professional testing with Python `_ , 25-27th November 2013, Leipzig. pytest: helps you write better programs ============================================= 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 notifications at travis-ci.org Thu Dec 12 19:06:13 2013 From: notifications at travis-ci.org (Travis CI) Date: Thu, 12 Dec 2013 18:06:13 +0000 Subject: [Pytest-commit] [Fixed] hpk42/pytest#57 (master - c22bdd3) Message-ID: <52a9fb15854d0_27f9a32186510@d37ec5ad-f677-463e-b378-984fa4b2a856.mail> Build Update for hpk42/pytest ------------------------------------- Build: #57 Status: Fixed Duration: 16 minutes and 29 seconds Commit: c22bdd3 (master) Author: holger krekel Message: some doc fixes View the changeset: https://github.com/hpk42/pytest/compare/1b92e96b9a5a...c22bdd3714fd View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15354963 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Thu Dec 12 23:00:27 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Dec 2013 22:00:27 -0000 Subject: [Pytest-commit] commit/pytest: nicoddemus: Updated plugins_index to use pytest 2.5.0 Message-ID: <20131212220027.28461.35450@app02.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/70dae16174e4/ Changeset: 70dae16174e4 User: nicoddemus Date: 2013-12-12 22:20:13 Summary: Updated plugins_index to use pytest 2.5.0 - Also made test for plugins_index less brittle; Affected #: 4 files diff -r 98efed365b187b80af771abc085c8840546d104d -r 70dae16174e4797de84b2bbbcb099c026f59d459 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -61,6 +61,7 @@ ColumnData = namedtuple('ColumnData', 'text link') headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', 'Summary'] pytest_version = pytest.__version__ + print '*** pytest-{} ***'.format(pytest_version) plugins = list(plugins) for index, (package_name, version) in enumerate(plugins): print package_name, version, '...', diff -r 98efed365b187b80af771abc085c8840546d104d -r 70dae16174e4797de84b2bbbcb099c026f59d459 doc/en/plugins_index/plugins_index.txt --- a/doc/en/plugins_index/plugins_index.txt +++ b/doc/en/plugins_index/plugins_index.txt @@ -6,59 +6,59 @@ ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= Name Author Downloads Python 2.7 Python 3.3 Summary ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= - `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1467 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.4.2 BDD for pytest - `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3352 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.4.2 Splinter subplugin for Pytest BDD plugin - `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1560 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.4.2 Benchmark utility that plugs into pytest. - `pytest-blockage-0.1 `_ `UNKNOWN `_ 102 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.4.2 Disable network requests during a test run. - `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 55 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.4.2 BrowserMob proxy plugin for py.test. - `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 89 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.4.2 py.test bugzilla integration plugin - `pytest-cache-1.0 `_ `Holger Krekel `_ 5561 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.4.2 pytest plugin with mechanisms for caching across test runs - `pytest-capturelog-0.7 `_ `Meme Dough `_ 1553 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.4.2 py.test plugin to capture log messages - `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 384 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.4.2 pytest plugin to add source code sanity checks (pep8 and friends) - `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 92 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.4.2 Define pytest fixtures as context managers. - `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.4.2 py.test extension for per-test couchdb databases using couchdbkit - `pytest-cov-1.6 `_ `Meme Dough `_ 23291 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.4.2 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6223 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.4.2 dbfixtures plugin for py.test. - `pytest-django-2.4 `_ `Andreas Pelme `_ 4809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.4.2 A Django plugin for py.test. - `pytest-django-lite-0.1.0 `_ `David Cramer `_ 987 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.4.2 The bare minimum to integrate py.test with Django. - `pytest-figleaf-1.0 `_ `holger krekel `_ 53 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.4.2 py.test figleaf coverage plugin - `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1146 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.4.2 pytest plugin to check source code with pyflakes - `pytest-greendots-0.2 `_ `UNKNOWN `_ 139 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.4.2 Green progress dots - `pytest-growl-0.1 `_ `Anthony Long `_ 58 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.4.2 Growl notifications for pytest results. - `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 180 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.4.2 an incremental test runner (pytest plugin) - `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 418 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.4.2 py.test plugin to show failures instantly - `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 93 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.4.2 A py.test plug-in to enable drop to ipdb debugger on test failure. - `pytest-jira-0.01 `_ `James Laska `_ 86 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.4.2 py.test JIRA integration plugin, using markers - `pytest-konira-0.2 `_ `Alfredo Deza `_ 91 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.4.2 Run Konira DSL tests with py.test - `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 448 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.4.2 py.test plugin to test server connections locally. - `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 191 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.4.2 py.test bugzilla integration plugin, using markers - `pytest-markfiltration-0.8 `_ `adam goucher `_ 253 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.4.2 UNKNOWN - `pytest-marks-0.4 `_ `adam goucher `_ 225 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.4.2 UNKNOWN - `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 123 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.4.2 pytest's monkeypatch subclass with extra functionalities - `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1037 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.4.2 Mozilla WebQA plugin for py.test. - `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 144 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.4.2 pytest plugin to test OpenERP modules - `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 184 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.4.2 OS X notifications for py.test results. - `pytest-paste-config-0.1 `_ `UNKNOWN `_ 164 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.4.2 Allow setting the path to a paste config file - `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.4.2 pytest plugin to check PEP8 requirements - `pytest-poo-0.2 `_ `Andreas Pelme `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.4.2 Visualize your crappy tests - `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 100 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.4.2 py.test plugin to connect to a remote debug server with PyDev or PyCharm. - `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 129 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.4.2 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. - `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 345 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.4.2 pytest plugin to generate random data inspired by QuickCheck - `pytest-rage-0.1 `_ `Leonardo Santagada `_ 56 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.4.2 pytest plugin to implement PEP712 - `pytest-random-0.02 `_ `Leah Klearman `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.4.2 py.test plugin to randomize tests - `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 147 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.4.2 py.test plugin to re-run tests to eliminate flakey failures - `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 88 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.4.2 implement a --failed option for pytest - `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5657 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.4.2 UNKNOWN - `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 348 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.4.2 py.test plugin that adds instafail, ETA and neat graphics - `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4351 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.4.2 pytest plugin to abort tests after a timeout - `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 239 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.4.2 A twisted plugin for py.test. - `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 7894 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.4.2 py.test xdist plugin for distributed testing and loop-on-failing modes - `pytest-xprocess-0.8 `_ `Holger Krekel `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.4.2 pytest plugin to manage external processes across test runs - `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 194 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.4.2 Run tests against wsgi apps defined in yaml - `pytest-zap-0.1 `_ `Dave Hunt `_ 63 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.4.2 OWASP ZAP plugin for py.test. + `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1640 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.5.0 BDD for pytest + `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3463 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.5.0 Splinter subplugin for Pytest BDD plugin + `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1588 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.5.0 Benchmark utility that plugs into pytest. + `pytest-blockage-0.1 `_ `UNKNOWN `_ 110 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.5.0 Disable network requests during a test run. + `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 61 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.5.0 BrowserMob proxy plugin for py.test. + `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 105 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.5.0 py.test bugzilla integration plugin + `pytest-cache-1.0 `_ `Holger Krekel `_ 5690 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.5.0 pytest plugin with mechanisms for caching across test runs + `pytest-capturelog-0.7 `_ `Meme Dough `_ 1615 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.5.0 py.test plugin to capture log messages + `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 408 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.5.0 pytest plugin to add source code sanity checks (pep8 and friends) + `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 101 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.5.0 Define pytest fixtures as context managers. + `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 215 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.5.0 py.test extension for per-test couchdb databases using couchdbkit + `pytest-cov-1.6 `_ `Meme Dough `_ 23787 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.5.0 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6332 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.5.0 dbfixtures plugin for py.test. + `pytest-django-2.4 `_ `Andreas Pelme `_ 4935 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.5.0 A Django plugin for py.test. + `pytest-django-lite-0.1.0 `_ `David Cramer `_ 1075 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.5.0 The bare minimum to integrate py.test with Django. + `pytest-figleaf-1.0 `_ `holger krekel `_ 59 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.5.0 py.test figleaf coverage plugin + `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1203 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.5.0 pytest plugin to check source code with pyflakes + `pytest-greendots-0.2 `_ `UNKNOWN `_ 149 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.5.0 Green progress dots + `pytest-growl-0.1 `_ `Anthony Long `_ 65 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.5.0 Growl notifications for pytest results. + `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 192 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.5.0 an incremental test runner (pytest plugin) + `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 431 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.5.0 py.test plugin to show failures instantly + `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.5.0 A py.test plug-in to enable drop to ipdb debugger on test failure. + `pytest-jira-0.01 `_ `James Laska `_ 94 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.5.0 py.test JIRA integration plugin, using markers + `pytest-konira-0.2 `_ `Alfredo Deza `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.5.0 Run Konira DSL tests with py.test + `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 470 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.5.0 py.test plugin to test server connections locally. + `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 205 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.5.0 py.test bugzilla integration plugin, using markers + `pytest-markfiltration-0.8 `_ `adam goucher `_ 269 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.5.0 UNKNOWN + `pytest-marks-0.4 `_ `adam goucher `_ 241 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.5.0 UNKNOWN + `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 132 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.5.0 pytest's monkeypatch subclass with extra functionalities + `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1087 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.5.0 Mozilla WebQA plugin for py.test. + `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 158 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.5.0 pytest plugin to test OpenERP modules + `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.5.0 OS X notifications for py.test results. + `pytest-paste-config-0.1 `_ `UNKNOWN `_ 169 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.5.0 Allow setting the path to a paste config file + `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5971 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.5.0 pytest plugin to check PEP8 requirements + `pytest-poo-0.2 `_ `Andreas Pelme `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.5.0 Visualize your crappy tests + `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 107 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.5.0 py.test plugin to connect to a remote debug server with PyDev or PyCharm. + `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 140 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.5.0 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. + `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 380 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.5.0 pytest plugin to generate random data inspired by QuickCheck + `pytest-rage-0.1 `_ `Leonardo Santagada `_ 64 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.5.0 pytest plugin to implement PEP712 + `pytest-random-0.02 `_ `Leah Klearman `_ 125 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.5.0 py.test plugin to randomize tests + `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 153 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.5.0 py.test plugin to re-run tests to eliminate flakey failures + `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.5.0 implement a --failed option for pytest + `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5726 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.5.0 UNKNOWN + `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 374 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.5.0 py.test plugin that adds instafail, ETA and neat graphics + `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4514 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.5.0 pytest plugin to abort tests after a timeout + `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 257 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.5.0 A twisted plugin for py.test. + `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 8103 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.5.0 py.test xdist plugin for distributed testing and loop-on-failing modes + `pytest-xprocess-0.8 `_ `Holger Krekel `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.5.0 pytest plugin to manage external processes across test runs + `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 210 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.5.0 Run tests against wsgi apps defined in yaml + `pytest-zap-0.1 `_ `Dave Hunt `_ 69 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.5.0 OWASP ZAP plugin for py.test. ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= *(Downloads are given from last month only)* -*(Updated on 2013-12-11)* +*(Updated on 2013-12-12)* diff -r 98efed365b187b80af771abc085c8840546d104d -r 70dae16174e4797de84b2bbbcb099c026f59d459 doc/en/plugins_index/test_plugins_index.expected.txt --- /dev/null +++ b/doc/en/plugins_index/test_plugins_index.expected.txt @@ -0,0 +1,16 @@ +.. _plugins_index: + +List of Third-Party Plugins +=========================== + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + Name Author Downloads Python 2.7 Python 3.3 Summary +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.5.0 some plugin + `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.5.0 some other plugin + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + +*(Downloads are given from last month only)* + +*(Updated on 2013-10-20)* diff -r 98efed365b187b80af771abc085c8840546d104d -r 70dae16174e4797de84b2bbbcb099c026f59d459 doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -53,45 +53,33 @@ 'downloads': {'last_day': 10, 'last_month': 40, 'last_week': 20}, }, } - return results[(package_name, version)] - monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') output_file = str(tmpdir.join('output.txt')) assert plugins_index.main(['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 - + with file(output_file, 'rU') as f: obtained_output = f.read() + expected_output = get_expected_output() if obtained_output != expected_output: - obtained_file = os.path.splitext(__file__)[0] + '.obtained' + obtained_file = os.path.splitext(__file__)[0] + '.obtained.txt' with file(obtained_file, 'w') as f: f.write(obtained_output) assert obtained_output == expected_output -expected_output = '''\ -.. _plugins_index: - -List of Third-Party Plugins -=========================== - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - Name Author Downloads Python 2.7 Python 3.3 Summary -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.4.2 some plugin - `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.4.2 some other plugin - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - -*(Downloads are given from last month only)* - -*(Updated on 2013-10-20)* -''' +def get_expected_output(): + """ + :return: string with expected rst output from the plugins_index.py script. + """ + expected_filename = os.path.join(os.path.dirname(__file__), 'test_plugins_index.expected.txt') + expected_output = open(expected_filename, 'rU').read() + return expected_output.replace('pytest=2.X.Y', 'pytest={}'.format(pytest.__version__)) #=================================================================================================== 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 Dec 13 09:43:16 2013 From: issues-reply at bitbucket.org (Petri Savolainen) Date: Fri, 13 Dec 2013 08:43:16 -0000 Subject: [Pytest-commit] Issue #140: py.test integration fails with Python 3.3 on Mac OSX (hpk42/tox) Message-ID: <20131213084316.5129.78692@app10.ash-private.bitbucket.org> New issue 140: py.test integration fails with Python 3.3 on Mac OSX https://bitbucket.org/hpk42/tox/issue/140/pytest-integration-fails-with-python-33-on Petri Savolainen: Running tox configured to use Python 3.3 using the py.test integration detailed at http://testrun.org/tox/latest/example/pytest.html, I get: ``` #!text WARNING:test command found but not installed in testenv cmd: /usr/local/bin/py.test env: /Users/petri/Code/koodaamo/jetstream/src/jetstream.core/.tox/py33 Maybe forgot to specify a dependency? Traceback (most recent call last): File "/usr/local/bin/py.test", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2607, in parse_requirements(__requires__), Environment() File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: py==1.2.1 ERROR: InvocationError: '/usr/local/bin/py.test' __________________________________________________________________________ summary ___________________________________________________________________________ ERROR: py33: commands failed ``` From commits-noreply at bitbucket.org Fri Dec 13 10:33:00 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 13 Dec 2013 09:33:00 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: fix issue404 by more strict junitxml escape Message-ID: <20131213093300.9623.79141@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/e629b41d0f58/ Changeset: e629b41d0f58 User: RonnyPfannschmidt Date: 2013-12-13 10:28:23 Summary: fix issue404 by more strict junitxml escape Affected #: 3 files diff -r 70dae16174e4797de84b2bbbcb099c026f59d459 -r e629b41d0f58f215347d34e18b48f63dba5310f5 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Unreleased +----------------------------------- + +- fix issue404 by always using the binary xml escape in the junitxml plugin + 2.5.0 ----------------------------------- diff -r 70dae16174e4797de84b2bbbcb099c026f59d459 -r e629b41d0f58f215347d34e18b48f63dba5310f5 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -130,36 +130,36 @@ self.skipped += 1 else: fail = Junit.failure(message="test failure") - fail.append(unicode(report.longrepr)) + fail.append(bin_xml_escape(report.longrepr)) self.append(fail) self.failed += 1 self._write_captured_output(report) def append_collect_failure(self, report): #msg = str(report.longrepr.reprtraceback.extraline) - self.append(Junit.failure(unicode(report.longrepr), + self.append(Junit.failure(bin_xml_escape(report.longrepr), message="collection failure")) self.errors += 1 def append_collect_skipped(self, report): #msg = str(report.longrepr.reprtraceback.extraline) - self.append(Junit.skipped(unicode(report.longrepr), + self.append(Junit.skipped(bin_xml_escape(report.longrepr), message="collection skipped")) self.skipped += 1 def append_error(self, report): - self.append(Junit.error(unicode(report.longrepr), + self.append(Junit.error(bin_xml_escape(report.longrepr), message="test setup failure")) self.errors += 1 def append_skipped(self, report): if hasattr(report, "wasxfail"): - self.append(Junit.skipped(unicode(report.wasxfail), + self.append(Junit.skipped(bin_xml_escape(report.wasxfail), message="expected test failure")) else: filename, lineno, skipreason = report.longrepr if skipreason.startswith("Skipped: "): - skipreason = skipreason[9:] + skipreason = bin_xml_escape(skipreason[9:]) self.append( Junit.skipped("%s:%s: %s" % report.longrepr, type="pytest.skip", @@ -193,7 +193,7 @@ def pytest_internalerror(self, excrepr): self.errors += 1 - data = py.xml.escape(excrepr) + data = bin_xml_escape(excrepr) self.tests.append( Junit.testcase( Junit.error(data, message="internal error"), diff -r 70dae16174e4797de84b2bbbcb099c026f59d459 -r e629b41d0f58f215347d34e18b48f63dba5310f5 testing/test_junitxml.py --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -284,6 +284,19 @@ if not sys.platform.startswith("java"): assert "hx" in fnode.toxml() + def test_assertion_binchars(self, testdir): + """this test did fail when the escaping wasnt strict""" + testdir.makepyfile(""" + + M1 = '\x01\x02\x03\x04' + M2 = '\x01\x02\x03\x05' + + def test_str_compare(): + assert M1 == M2 + """) + result, dom = runandparse(testdir) + print dom.toxml() + def test_pass_captures_stdout(self, testdir): testdir.makepyfile(""" def test_pass(): @@ -392,7 +405,6 @@ text = xmlf.read() assert '#x0' in text - def test_invalid_xml_escape(): # Test some more invalid xml chars, the full range should be # tested really but let's just thest the edges of the ranges 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 Dec 13 13:10:59 2013 From: issues-reply at bitbucket.org (=?utf-8?q?Thomas_G=C3=BCttler?=) Date: Fri, 13 Dec 2013 12:10:59 -0000 Subject: [Pytest-commit] Issue #141: tox vision: testing vs release process (hpk42/tox) Message-ID: <20131213121059.6004.27137@app12.ash-private.bitbucket.org> New issue 141: tox vision: testing vs release process https://bitbucket.org/hpk42/tox/issue/141/tox-vision-testing-vs-release-process Thomas G?ttler: from https://testrun.org/tox/latest/ {{{ vision: standardize testing in Python tox aims to automate and standardize testing in Python. It is part of a larger vision of easing the packaging, testing and release process of Python software. }}} Since it is on the top of the front page, it must be a goal of tox: "release process". But the docs don't contain information about "release process". Please explain this in the docs with more detail: What kind of release process do you want to do? Which tools do you want to use for deployment? Background: I am happy with my current testing setup (without tox). But I am not happy with my current release process. Maybe we could work together. Greatings from Chemnitz. From notifications at travis-ci.org Sat Dec 14 12:32:23 2013 From: notifications at travis-ci.org (Travis CI) Date: Sat, 14 Dec 2013 11:32:23 +0000 Subject: [Pytest-commit] [Broken] hpk42/pytest#60 (master - e9eb588) Message-ID: <52ac41c797db0_21db3de128155@040ed5b6-5e93-4ead-b6f4-155339ba3500.mail> Build Update for hpk42/pytest ------------------------------------- Build: #60 Status: Broken Duration: 10 minutes and 54 seconds Commit: e9eb588 (master) Author: Ronny Pfannschmidt Message: fix issue404 by more strict junitxml escape View the changeset: https://github.com/hpk42/pytest/compare/c22bdd3714fd...e9eb5880d7e3 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15442484 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sun Dec 15 23:12:52 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 15 Dec 2013 22:12:52 -0000 Subject: [Pytest-commit] commit/pytest: flub: Do not use py2-only print, breaks py3 testruns Message-ID: <20131215221252.24442.13538@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/ec591a414d15/ Changeset: ec591a414d15 User: flub Date: 2013-12-15 23:12:38 Summary: Do not use py2-only print, breaks py3 testruns Affected #: 1 file diff -r e629b41d0f58f215347d34e18b48f63dba5310f5 -r ec591a414d15677998d8214c5652c5d9fcef83e0 testing/test_junitxml.py --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -295,7 +295,7 @@ assert M1 == M2 """) result, dom = runandparse(testdir) - print dom.toxml() + # print dom.toxml() def test_pass_captures_stdout(self, testdir): testdir.makepyfile(""" 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 Sun Dec 15 23:15:22 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 15 Dec 2013 22:15:22 -0000 Subject: [Pytest-commit] commit/pytest: flub: Allow parameterised fixtures to give paramemter IDs Message-ID: <20131215221522.31223.59486@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/9bfbf2e88f1f/ Changeset: 9bfbf2e88f1f User: flub Date: 2013-12-15 23:15:15 Summary: Allow parameterised fixtures to give paramemter IDs This is just like the markers etc already can do. Affected #: 3 files diff -r ec591a414d15677998d8214c5652c5d9fcef83e0 -r 9bfbf2e88f1fa635404968c1c0b72735634ddf27 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ Unreleased ----------------------------------- +- Allow parameterized fixtures to specify the ID of the parameters by + adding an ids argument to pytest.fixture() and pytest.yield_fixture(). + - fix issue404 by always using the binary xml escape in the junitxml plugin 2.5.0 diff -r ec591a414d15677998d8214c5652c5d9fcef83e0 -r 9bfbf2e88f1fa635404968c1c0b72735634ddf27 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -35,11 +35,13 @@ class FixtureFunctionMarker: - def __init__(self, scope, params, autouse=False, yieldctx=False): + def __init__(self, scope, params, + autouse=False, yieldctx=False, ids=None): self.scope = scope self.params = params self.autouse = autouse self.yieldctx = yieldctx + self.ids = ids def __call__(self, function): if inspect.isclass(function): @@ -49,7 +51,7 @@ return function -def fixture(scope="function", params=None, autouse=False): +def fixture(scope="function", params=None, autouse=False, ids=None): """ (return a) decorator to mark a fixture factory function. This decorator can be used (with or or without parameters) to define @@ -71,6 +73,10 @@ can see it. If False (the default) then an explicit reference is needed to activate the fixture. + :arg ids: list of string ids each corresponding to the argvalues + so that they are part of the test id. If no ids are provided + they will be generated automatically from the argvalues. + """ if callable(scope) and params is None and autouse == False: # direct decoration @@ -78,9 +84,9 @@ "function", params, autouse)(scope) if params is not None and not isinstance(params, (list, tuple)): params = list(params) - return FixtureFunctionMarker(scope, params, autouse) + return FixtureFunctionMarker(scope, params, autouse, ids=ids) -def yield_fixture(scope="function", params=None, autouse=False): +def yield_fixture(scope="function", params=None, autouse=False, ids=None): """ (return a) decorator to mark a yield-fixture factory function (EXPERIMENTAL). @@ -94,7 +100,8 @@ return FixtureFunctionMarker( "function", params, autouse, yieldctx=True)(scope) else: - return FixtureFunctionMarker(scope, params, autouse, yieldctx=True) + return FixtureFunctionMarker(scope, params, autouse, + yieldctx=True, ids=ids) defaultfuncargprefixmarker = fixture() @@ -1623,7 +1630,8 @@ for fixturedef in faclist: if fixturedef.params is not None: metafunc.parametrize(argname, fixturedef.params, - indirect=True, scope=fixturedef.scope) + indirect=True, scope=fixturedef.scope, + ids=fixturedef.ids) def pytest_collection_modifyitems(self, items): # separate parametrized setups @@ -1660,7 +1668,7 @@ fixturedef = FixtureDef(self, nodeid, name, obj, marker.scope, marker.params, yieldctx=marker.yieldctx, - unittest=unittest) + unittest=unittest, ids=marker.ids) faclist = self._arg2fixturedefs.setdefault(name, []) if fixturedef.has_location: faclist.append(fixturedef) @@ -1728,7 +1736,7 @@ class FixtureDef: """ A container for a factory definition. """ def __init__(self, fixturemanager, baseid, argname, func, scope, params, - yieldctx, unittest=False): + yieldctx, unittest=False, ids=None): self._fixturemanager = fixturemanager self.baseid = baseid or '' self.has_location = baseid is not None @@ -1741,6 +1749,7 @@ self.argnames = getfuncargnames(func, startindex=startindex) self.yieldctx = yieldctx self.unittest = unittest + self.ids = ids self._finalizer = [] def addfinalizer(self, finalizer): diff -r ec591a414d15677998d8214c5652c5d9fcef83e0 -r 9bfbf2e88f1fa635404968c1c0b72735634ddf27 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1989,6 +1989,40 @@ reprec = testdir.inline_run() reprec.assertoutcome(passed=1) + def test_params_and_ids(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[object(), object()], + ids=['alpha', 'beta']) + def fix(request): + return request.param + + def test_foo(fix): + assert 1 + """) + res = testdir.runpytest('-v') + res.stdout.fnmatch_lines([ + '*test_foo*alpha*', + '*test_foo*beta*']) + + def test_params_and_ids_yieldfixture(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.yield_fixture(params=[object(), object()], + ids=['alpha', 'beta']) + def fix(request): + yield request.param + + def test_foo(fix): + assert 1 + """) + res = testdir.runpytest('-v') + res.stdout.fnmatch_lines([ + '*test_foo*alpha*', + '*test_foo*beta*']) + class TestRequestScopeAccess: pytestmark = pytest.mark.parametrize(("scope", "ok", "error"),[ 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 Mon Dec 16 07:04:22 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 06:04:22 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20131216060422.29339.49517@app08.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/eea4bf34c1f0/ Changeset: eea4bf34c1f0 User: hpk42 Date: 2013-12-13 15:50:06 Summary: fix py25 mention Affected #: 1 file diff -r 98efed365b187b80af771abc085c8840546d104d -r eea4bf34c1f0cf3be984d6b0dd161789f781ff04 doc/en/getting-started.txt --- a/doc/en/getting-started.txt +++ b/doc/en/getting-started.txt @@ -1,7 +1,7 @@ Installation and Getting Started =================================== -**Pythons**: Python 2.4-3.3, Jython, PyPy +**Pythons**: Python 2.5-3.3, Jython, PyPy **Platforms**: Unix/Posix and Windows https://bitbucket.org/hpk42/pytest/commits/9ed74cf59bb4/ Changeset: 9ed74cf59bb4 User: hpk42 Date: 2013-12-14 14:00:47 Summary: merge Affected #: 1 file diff -r eea4bf34c1f0cf3be984d6b0dd161789f781ff04 -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1616,6 +1616,7 @@ return fixturenames_closure, arg2fixturedefs def pytest_generate_tests(self, metafunc): + print "pytest core pytest_generate_tests" for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) if faclist is None: https://bitbucket.org/hpk42/pytest/commits/3be718aebee4/ Changeset: 3be718aebee4 User: hpk42 Date: 2013-12-16 07:01:58 Summary: merge Affected #: 9 files diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +Unreleased +----------------------------------- + +- Allow parameterized fixtures to specify the ID of the parameters by + adding an ids argument to pytest.fixture() and pytest.yield_fixture(). + +- fix issue404 by always using the binary xml escape in the junitxml plugin + 2.5.0 ----------------------------------- diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 _pytest/junitxml.py --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -130,36 +130,36 @@ self.skipped += 1 else: fail = Junit.failure(message="test failure") - fail.append(unicode(report.longrepr)) + fail.append(bin_xml_escape(report.longrepr)) self.append(fail) self.failed += 1 self._write_captured_output(report) def append_collect_failure(self, report): #msg = str(report.longrepr.reprtraceback.extraline) - self.append(Junit.failure(unicode(report.longrepr), + self.append(Junit.failure(bin_xml_escape(report.longrepr), message="collection failure")) self.errors += 1 def append_collect_skipped(self, report): #msg = str(report.longrepr.reprtraceback.extraline) - self.append(Junit.skipped(unicode(report.longrepr), + self.append(Junit.skipped(bin_xml_escape(report.longrepr), message="collection skipped")) self.skipped += 1 def append_error(self, report): - self.append(Junit.error(unicode(report.longrepr), + self.append(Junit.error(bin_xml_escape(report.longrepr), message="test setup failure")) self.errors += 1 def append_skipped(self, report): if hasattr(report, "wasxfail"): - self.append(Junit.skipped(unicode(report.wasxfail), + self.append(Junit.skipped(bin_xml_escape(report.wasxfail), message="expected test failure")) else: filename, lineno, skipreason = report.longrepr if skipreason.startswith("Skipped: "): - skipreason = skipreason[9:] + skipreason = bin_xml_escape(skipreason[9:]) self.append( Junit.skipped("%s:%s: %s" % report.longrepr, type="pytest.skip", @@ -193,7 +193,7 @@ def pytest_internalerror(self, excrepr): self.errors += 1 - data = py.xml.escape(excrepr) + data = bin_xml_escape(excrepr) self.tests.append( Junit.testcase( Junit.error(data, message="internal error"), diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -35,11 +35,13 @@ class FixtureFunctionMarker: - def __init__(self, scope, params, autouse=False, yieldctx=False): + def __init__(self, scope, params, + autouse=False, yieldctx=False, ids=None): self.scope = scope self.params = params self.autouse = autouse self.yieldctx = yieldctx + self.ids = ids def __call__(self, function): if inspect.isclass(function): @@ -49,7 +51,7 @@ return function -def fixture(scope="function", params=None, autouse=False): +def fixture(scope="function", params=None, autouse=False, ids=None): """ (return a) decorator to mark a fixture factory function. This decorator can be used (with or or without parameters) to define @@ -71,6 +73,10 @@ can see it. If False (the default) then an explicit reference is needed to activate the fixture. + :arg ids: list of string ids each corresponding to the argvalues + so that they are part of the test id. If no ids are provided + they will be generated automatically from the argvalues. + """ if callable(scope) and params is None and autouse == False: # direct decoration @@ -78,9 +84,9 @@ "function", params, autouse)(scope) if params is not None and not isinstance(params, (list, tuple)): params = list(params) - return FixtureFunctionMarker(scope, params, autouse) + return FixtureFunctionMarker(scope, params, autouse, ids=ids) -def yield_fixture(scope="function", params=None, autouse=False): +def yield_fixture(scope="function", params=None, autouse=False, ids=None): """ (return a) decorator to mark a yield-fixture factory function (EXPERIMENTAL). @@ -94,7 +100,8 @@ return FixtureFunctionMarker( "function", params, autouse, yieldctx=True)(scope) else: - return FixtureFunctionMarker(scope, params, autouse, yieldctx=True) + return FixtureFunctionMarker(scope, params, autouse, + yieldctx=True, ids=ids) defaultfuncargprefixmarker = fixture() @@ -1624,7 +1631,8 @@ for fixturedef in faclist: if fixturedef.params is not None: metafunc.parametrize(argname, fixturedef.params, - indirect=True, scope=fixturedef.scope) + indirect=True, scope=fixturedef.scope, + ids=fixturedef.ids) def pytest_collection_modifyitems(self, items): # separate parametrized setups @@ -1661,7 +1669,7 @@ fixturedef = FixtureDef(self, nodeid, name, obj, marker.scope, marker.params, yieldctx=marker.yieldctx, - unittest=unittest) + unittest=unittest, ids=marker.ids) faclist = self._arg2fixturedefs.setdefault(name, []) if fixturedef.has_location: faclist.append(fixturedef) @@ -1729,7 +1737,7 @@ class FixtureDef: """ A container for a factory definition. """ def __init__(self, fixturemanager, baseid, argname, func, scope, params, - yieldctx, unittest=False): + yieldctx, unittest=False, ids=None): self._fixturemanager = fixturemanager self.baseid = baseid or '' self.has_location = baseid is not None @@ -1742,6 +1750,7 @@ self.argnames = getfuncargnames(func, startindex=startindex) self.yieldctx = yieldctx self.unittest = unittest + self.ids = ids self._finalizer = [] def addfinalizer(self, finalizer): diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -61,6 +61,7 @@ ColumnData = namedtuple('ColumnData', 'text link') headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', 'Summary'] pytest_version = pytest.__version__ + print '*** pytest-{} ***'.format(pytest_version) plugins = list(plugins) for index, (package_name, version) in enumerate(plugins): print package_name, version, '...', diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 doc/en/plugins_index/plugins_index.txt --- a/doc/en/plugins_index/plugins_index.txt +++ b/doc/en/plugins_index/plugins_index.txt @@ -6,59 +6,59 @@ ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= Name Author Downloads Python 2.7 Python 3.3 Summary ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= - `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1467 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.4.2 BDD for pytest - `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3352 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.4.2 Splinter subplugin for Pytest BDD plugin - `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1560 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.4.2 Benchmark utility that plugs into pytest. - `pytest-blockage-0.1 `_ `UNKNOWN `_ 102 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.4.2 Disable network requests during a test run. - `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 55 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.4.2 BrowserMob proxy plugin for py.test. - `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 89 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.4.2 py.test bugzilla integration plugin - `pytest-cache-1.0 `_ `Holger Krekel `_ 5561 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.4.2 pytest plugin with mechanisms for caching across test runs - `pytest-capturelog-0.7 `_ `Meme Dough `_ 1553 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.4.2 py.test plugin to capture log messages - `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 384 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.4.2 pytest plugin to add source code sanity checks (pep8 and friends) - `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 92 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.4.2 Define pytest fixtures as context managers. - `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.4.2 py.test extension for per-test couchdb databases using couchdbkit - `pytest-cov-1.6 `_ `Meme Dough `_ 23291 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.4.2 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6223 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.4.2 dbfixtures plugin for py.test. - `pytest-django-2.4 `_ `Andreas Pelme `_ 4809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.4.2 A Django plugin for py.test. - `pytest-django-lite-0.1.0 `_ `David Cramer `_ 987 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.4.2 The bare minimum to integrate py.test with Django. - `pytest-figleaf-1.0 `_ `holger krekel `_ 53 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.4.2 py.test figleaf coverage plugin - `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1146 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.4.2 pytest plugin to check source code with pyflakes - `pytest-greendots-0.2 `_ `UNKNOWN `_ 139 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.4.2 Green progress dots - `pytest-growl-0.1 `_ `Anthony Long `_ 58 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.4.2 Growl notifications for pytest results. - `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 180 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.4.2 an incremental test runner (pytest plugin) - `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 418 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.4.2 py.test plugin to show failures instantly - `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 93 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.4.2 A py.test plug-in to enable drop to ipdb debugger on test failure. - `pytest-jira-0.01 `_ `James Laska `_ 86 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.4.2 py.test JIRA integration plugin, using markers - `pytest-konira-0.2 `_ `Alfredo Deza `_ 91 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.4.2 Run Konira DSL tests with py.test - `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 448 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.4.2 py.test plugin to test server connections locally. - `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 191 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.4.2 py.test bugzilla integration plugin, using markers - `pytest-markfiltration-0.8 `_ `adam goucher `_ 253 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.4.2 UNKNOWN - `pytest-marks-0.4 `_ `adam goucher `_ 225 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.4.2 UNKNOWN - `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 123 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.4.2 pytest's monkeypatch subclass with extra functionalities - `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1037 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.4.2 Mozilla WebQA plugin for py.test. - `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 144 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.4.2 pytest plugin to test OpenERP modules - `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 184 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.4.2 OS X notifications for py.test results. - `pytest-paste-config-0.1 `_ `UNKNOWN `_ 164 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.4.2 Allow setting the path to a paste config file - `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5809 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.4.2 pytest plugin to check PEP8 requirements - `pytest-poo-0.2 `_ `Andreas Pelme `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.4.2 Visualize your crappy tests - `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 100 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.4.2 py.test plugin to connect to a remote debug server with PyDev or PyCharm. - `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 129 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.4.2 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. - `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 345 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.4.2 pytest plugin to generate random data inspired by QuickCheck - `pytest-rage-0.1 `_ `Leonardo Santagada `_ 56 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.4.2 pytest plugin to implement PEP712 - `pytest-random-0.02 `_ `Leah Klearman `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.4.2 py.test plugin to randomize tests - `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 147 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.4.2 py.test plugin to re-run tests to eliminate flakey failures - `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 88 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.4.2 implement a --failed option for pytest - `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5657 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.4.2 UNKNOWN - `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 348 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.4.2 py.test plugin that adds instafail, ETA and neat graphics - `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4351 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.4.2 pytest plugin to abort tests after a timeout - `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 239 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.4.2 A twisted plugin for py.test. - `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 7894 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.4.2 py.test xdist plugin for distributed testing and loop-on-failing modes - `pytest-xprocess-0.8 `_ `Holger Krekel `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.4.2 pytest plugin to manage external processes across test runs - `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 194 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.4.2 Run tests against wsgi apps defined in yaml - `pytest-zap-0.1 `_ `Dave Hunt `_ 63 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.4.2 OWASP ZAP plugin for py.test. + `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1640 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.5.0 BDD for pytest + `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3463 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.5.0 Splinter subplugin for Pytest BDD plugin + `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1588 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.5.0 Benchmark utility that plugs into pytest. + `pytest-blockage-0.1 `_ `UNKNOWN `_ 110 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.5.0 Disable network requests during a test run. + `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 61 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.5.0 BrowserMob proxy plugin for py.test. + `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 105 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.5.0 py.test bugzilla integration plugin + `pytest-cache-1.0 `_ `Holger Krekel `_ 5690 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.5.0 pytest plugin with mechanisms for caching across test runs + `pytest-capturelog-0.7 `_ `Meme Dough `_ 1615 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.5.0 py.test plugin to capture log messages + `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 408 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.5.0 pytest plugin to add source code sanity checks (pep8 and friends) + `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 101 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.5.0 Define pytest fixtures as context managers. + `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 215 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.5.0 py.test extension for per-test couchdb databases using couchdbkit + `pytest-cov-1.6 `_ `Meme Dough `_ 23787 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.5.0 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6332 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.5.0 dbfixtures plugin for py.test. + `pytest-django-2.4 `_ `Andreas Pelme `_ 4935 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.5.0 A Django plugin for py.test. + `pytest-django-lite-0.1.0 `_ `David Cramer `_ 1075 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.5.0 The bare minimum to integrate py.test with Django. + `pytest-figleaf-1.0 `_ `holger krekel `_ 59 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.5.0 py.test figleaf coverage plugin + `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1203 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.5.0 pytest plugin to check source code with pyflakes + `pytest-greendots-0.2 `_ `UNKNOWN `_ 149 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.5.0 Green progress dots + `pytest-growl-0.1 `_ `Anthony Long `_ 65 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.5.0 Growl notifications for pytest results. + `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 192 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.5.0 an incremental test runner (pytest plugin) + `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 431 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.5.0 py.test plugin to show failures instantly + `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.5.0 A py.test plug-in to enable drop to ipdb debugger on test failure. + `pytest-jira-0.01 `_ `James Laska `_ 94 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.5.0 py.test JIRA integration plugin, using markers + `pytest-konira-0.2 `_ `Alfredo Deza `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.5.0 Run Konira DSL tests with py.test + `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 470 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.5.0 py.test plugin to test server connections locally. + `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 205 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.5.0 py.test bugzilla integration plugin, using markers + `pytest-markfiltration-0.8 `_ `adam goucher `_ 269 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.5.0 UNKNOWN + `pytest-marks-0.4 `_ `adam goucher `_ 241 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.5.0 UNKNOWN + `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 132 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.5.0 pytest's monkeypatch subclass with extra functionalities + `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1087 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.5.0 Mozilla WebQA plugin for py.test. + `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 158 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.5.0 pytest plugin to test OpenERP modules + `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.5.0 OS X notifications for py.test results. + `pytest-paste-config-0.1 `_ `UNKNOWN `_ 169 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.5.0 Allow setting the path to a paste config file + `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5971 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.5.0 pytest plugin to check PEP8 requirements + `pytest-poo-0.2 `_ `Andreas Pelme `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.5.0 Visualize your crappy tests + `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 107 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.5.0 py.test plugin to connect to a remote debug server with PyDev or PyCharm. + `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 140 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.5.0 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. + `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 380 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.5.0 pytest plugin to generate random data inspired by QuickCheck + `pytest-rage-0.1 `_ `Leonardo Santagada `_ 64 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.5.0 pytest plugin to implement PEP712 + `pytest-random-0.02 `_ `Leah Klearman `_ 125 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.5.0 py.test plugin to randomize tests + `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 153 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.5.0 py.test plugin to re-run tests to eliminate flakey failures + `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.5.0 implement a --failed option for pytest + `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5726 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.5.0 UNKNOWN + `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 374 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.5.0 py.test plugin that adds instafail, ETA and neat graphics + `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4514 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.5.0 pytest plugin to abort tests after a timeout + `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 257 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.5.0 A twisted plugin for py.test. + `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 8103 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.5.0 py.test xdist plugin for distributed testing and loop-on-failing modes + `pytest-xprocess-0.8 `_ `Holger Krekel `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.5.0 pytest plugin to manage external processes across test runs + `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 210 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.5.0 Run tests against wsgi apps defined in yaml + `pytest-zap-0.1 `_ `Dave Hunt `_ 69 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.5.0 OWASP ZAP plugin for py.test. ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= *(Downloads are given from last month only)* -*(Updated on 2013-12-11)* +*(Updated on 2013-12-12)* diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 doc/en/plugins_index/test_plugins_index.expected.txt --- /dev/null +++ b/doc/en/plugins_index/test_plugins_index.expected.txt @@ -0,0 +1,16 @@ +.. _plugins_index: + +List of Third-Party Plugins +=========================== + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + Name Author Downloads Python 2.7 Python 3.3 Summary +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.5.0 some plugin + `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.5.0 some other plugin + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + +*(Downloads are given from last month only)* + +*(Updated on 2013-10-20)* diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -53,45 +53,33 @@ 'downloads': {'last_day': 10, 'last_month': 40, 'last_week': 20}, }, } - return results[(package_name, version)] - monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') output_file = str(tmpdir.join('output.txt')) assert plugins_index.main(['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 - + with file(output_file, 'rU') as f: obtained_output = f.read() + expected_output = get_expected_output() if obtained_output != expected_output: - obtained_file = os.path.splitext(__file__)[0] + '.obtained' + obtained_file = os.path.splitext(__file__)[0] + '.obtained.txt' with file(obtained_file, 'w') as f: f.write(obtained_output) assert obtained_output == expected_output -expected_output = '''\ -.. _plugins_index: - -List of Third-Party Plugins -=========================== - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - Name Author Downloads Python 2.7 Python 3.3 Summary -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.4.2 some plugin - `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.4.2 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.4.2 some other plugin - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - -*(Downloads are given from last month only)* - -*(Updated on 2013-10-20)* -''' +def get_expected_output(): + """ + :return: string with expected rst output from the plugins_index.py script. + """ + expected_filename = os.path.join(os.path.dirname(__file__), 'test_plugins_index.expected.txt') + expected_output = open(expected_filename, 'rU').read() + return expected_output.replace('pytest=2.X.Y', 'pytest={}'.format(pytest.__version__)) #=================================================================================================== diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -1989,6 +1989,40 @@ reprec = testdir.inline_run() reprec.assertoutcome(passed=1) + def test_params_and_ids(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[object(), object()], + ids=['alpha', 'beta']) + def fix(request): + return request.param + + def test_foo(fix): + assert 1 + """) + res = testdir.runpytest('-v') + res.stdout.fnmatch_lines([ + '*test_foo*alpha*', + '*test_foo*beta*']) + + def test_params_and_ids_yieldfixture(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.yield_fixture(params=[object(), object()], + ids=['alpha', 'beta']) + def fix(request): + yield request.param + + def test_foo(fix): + assert 1 + """) + res = testdir.runpytest('-v') + res.stdout.fnmatch_lines([ + '*test_foo*alpha*', + '*test_foo*beta*']) + class TestRequestScopeAccess: pytestmark = pytest.mark.parametrize(("scope", "ok", "error"),[ diff -r 9ed74cf59bb4ea6b04deceffaf36307ade6c1ba3 -r 3be718aebee43c6c038286ca06bf634f2401e080 testing/test_junitxml.py --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -284,6 +284,19 @@ if not sys.platform.startswith("java"): assert "hx" in fnode.toxml() + def test_assertion_binchars(self, testdir): + """this test did fail when the escaping wasnt strict""" + testdir.makepyfile(""" + + M1 = '\x01\x02\x03\x04' + M2 = '\x01\x02\x03\x05' + + def test_str_compare(): + assert M1 == M2 + """) + result, dom = runandparse(testdir) + # print dom.toxml() + def test_pass_captures_stdout(self, testdir): testdir.makepyfile(""" def test_pass(): @@ -392,7 +405,6 @@ text = xmlf.read() assert '#x0' in text - def test_invalid_xml_escape(): # Test some more invalid xml chars, the full range should be # tested really but let's just thest the edges of the ranges https://bitbucket.org/hpk42/pytest/commits/8bfae2a08735/ Changeset: 8bfae2a08735 User: hpk42 Date: 2013-12-16 07:03:59 Summary: fix issue405 -- xfail the plugin generation test as it is not supposed to run as part of the pytest core tests and only runs on specific environments. Affected #: 1 file diff -r 3be718aebee43c6c038286ca06bf634f2401e080 -r 8bfae2a08735f51bf84499ca564859d30b02854c doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -7,24 +7,26 @@ #=================================================================================================== # test_plugins_index #=================================================================================================== + + at pytest.mark.xfail(reason="issue405 fails, not py33 ready, not a core pytest test") def test_plugins_index(tmpdir, monkeypatch): ''' Blackbox testing for plugins_index script. Calls main() generating a file and compares produced output to expected. - + .. note:: if the test fails, a file named `test_plugins_index.obtained` will be generated in the same directory as this test file. Ensure the contents are correct and overwrite - the global `expected_output` with the new contents. + the global `expected_output` with the new contents. ''' import plugins_index - + # dummy interface to xmlrpclib.ServerProxy class DummyProxy(object): - + expected_url = 'http://dummy.pypi' def __init__(self, url): assert url == self.expected_url - + def search(self, query): assert query == {'name' : 'pytest-'} return [ @@ -32,7 +34,7 @@ {'name': 'pytest-plugin1', 'version' : '1.0'}, {'name': 'pytest-plugin2', 'version' : '1.2'}, ] - + def release_data(self, package_name, version): results = { ('pytest-plugin1', '1.0') : { @@ -43,7 +45,7 @@ 'summary' : 'some plugin', 'downloads': {'last_day': 1, 'last_month': 4, 'last_week': 2}, }, - + ('pytest-plugin2', '1.2') : { 'package_url' : 'http://plugin2', 'release_url' : 'http://plugin2/1.2', @@ -54,10 +56,10 @@ }, } return results[(package_name, version)] - + monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') - + output_file = str(tmpdir.join('output.txt')) assert plugins_index.main(['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 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 Mon Dec 16 07:19:57 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 06:19:57 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix py32 failures and remove random print from commit accident Message-ID: <20131216061957.32040.79585@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/23e0cbf30ff9/ Changeset: 23e0cbf30ff9 User: hpk42 Date: 2013-12-16 07:19:49 Summary: fix py32 failures and remove random print from commit accident Affected #: 2 files diff -r 8bfae2a08735f51bf84499ca564859d30b02854c -r 23e0cbf30ff9e1faf69b67c12a6354d8b7106d60 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1623,7 +1623,6 @@ return fixturenames_closure, arg2fixturedefs def pytest_generate_tests(self, metafunc): - print "pytest core pytest_generate_tests" for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) if faclist is None: diff -r 8bfae2a08735f51bf84499ca564859d30b02854c -r 23e0cbf30ff9e1faf69b67c12a6354d8b7106d60 testing/test_genscript.py --- a/testing/test_genscript.py +++ b/testing/test_genscript.py @@ -22,7 +22,8 @@ def test_gen(testdir, anypython, standalone): if sys.version_info >= (2,7): result = testdir._run(anypython, "-c", - "import sys;print sys.version_info >=(2,7)") + "import sys;print (sys.version_info >=(2,7))") + assert result.ret == 0 if result.stdout.str() == "False": pytest.skip("genscript called from python2.7 cannot work " "earlier python versions") 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 notifications at travis-ci.org Mon Dec 16 07:31:06 2013 From: notifications at travis-ci.org (Travis CI) Date: Mon, 16 Dec 2013 06:31:06 +0000 Subject: [Pytest-commit] [Fixed] hpk42/pytest#62 (master - 563465f) Message-ID: <52ae9e29d7550_22a127835d@b373eaa8-d386-4fb3-9bbc-24fcaa794d48.mail> Build Update for hpk42/pytest ------------------------------------- Build: #62 Status: Fixed Duration: 10 minutes and 21 seconds Commit: 563465f (master) Author: holger krekel Message: fix py32 failures and remove random print from commit accident View the changeset: https://github.com/hpk42/pytest/compare/b9cd7c144579...563465feaafe View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15509587 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From notifications at travis-ci.org Mon Dec 16 07:19:33 2013 From: notifications at travis-ci.org (Travis CI) Date: Mon, 16 Dec 2013 06:19:33 +0000 Subject: [Pytest-commit] [Still Failing] hpk42/pytest#61 (master - b9cd7c1) Message-ID: <52ae9b7521728_21e58013382c@1c071bf8-1e53-4dcb-8fbc-6621ca99473e.mail> Build Update for hpk42/pytest ------------------------------------- Build: #61 Status: Still Failing Duration: 12 minutes and 15 seconds Commit: b9cd7c1 (master) Author: holger krekel Message: fix issue405 -- xfail the plugin generation test as it is not supposed to run as part of the pytest core tests and only runs on specific environments. View the changeset: https://github.com/hpk42/pytest/compare/e9eb5880d7e3...b9cd7c144579 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15509223 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Dec 16 09:23:07 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 08:23:07 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131216082307.32032.19791@app06.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/5863c38ae3cf/ Changeset: 5863c38ae3cf User: hpk42 Date: 2013-12-16 07:47:59 Summary: fix issue403 : allow same-name parametrized functions within a collector Affected #: 2 files diff -r 23e0cbf30ff9e1faf69b67c12a6354d8b7106d60 -r 5863c38ae3cf47daa12da4c43a86658403eef89c _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1529,7 +1529,8 @@ self._nodename2fixtureinfo = {} def getfixtureinfo(self, node, func, cls, funcargs=True): - key = (node, func.__name__) + # node is the "collection node" for "func" + key = (node, func) try: return self._nodename2fixtureinfo[key] except KeyError: diff -r 23e0cbf30ff9e1faf69b67c12a6354d8b7106d60 -r 5863c38ae3cf47daa12da4c43a86658403eef89c testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -630,6 +630,22 @@ "*3 passed*" ]) + def test_generate_same_function_names_issue403(self, testdir): + sub1 = testdir.makepyfile(""" + import pytest + + def make_tests(): + @pytest.mark.parametrize("x", range(2)) + def test_foo(x): + pass + return test_foo + + test_x = make_tests() + test_y = make_tests() + """) + reprec = testdir.inline_run() + reprec.assertoutcome(passed=4) + class TestMarkersWithParametrization: pytestmark = pytest.mark.issue308 https://bitbucket.org/hpk42/pytest/commits/de9c3a3932c3/ Changeset: de9c3a3932c3 User: hpk42 Date: 2013-12-16 08:04:46 Summary: amend CHANGELOG with credits and issue mentioning Affected #: 1 file diff -r 5863c38ae3cf47daa12da4c43a86658403eef89c -r de9c3a3932c3c1c921360028c88465d36c4968e5 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,16 @@ Unreleased ----------------------------------- +- fix issue403: allow parametrize of multiple same-name functions within + a collection node. Thanks Andreas Kloeckner and Alex Gaynor for reporting + and analysis. + - Allow parameterized fixtures to specify the ID of the parameters by adding an ids argument to pytest.fixture() and pytest.yield_fixture(). + Thanks Floris Bruynooghe. -- fix issue404 by always using the binary xml escape in the junitxml plugin +- fix issue404 by always using the binary xml escape in the junitxml + plugin. Thanks Ronny Pfannschmidt. 2.5.0 ----------------------------------- 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 Mon Dec 16 11:52:00 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 10:52:00 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131216105200.12780.73598@app07.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/9fe1f0588fb7/ Changeset: 9fe1f0588fb7 User: flub Date: 2013-12-16 11:51:04 Summary: Still print this, but use py2/py3 compat syntax I realised being able to print is probably an essential part of this test which I may have inadvertendly disabled, so correct that. Affected #: 1 file diff -r de9c3a3932c3c1c921360028c88465d36c4968e5 -r 9fe1f0588fb743b461620f35aac87c09fbc77cdb testing/test_junitxml.py --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -295,7 +295,7 @@ assert M1 == M2 """) result, dom = runandparse(testdir) - # print dom.toxml() + print(dom.toxml()) def test_pass_captures_stdout(self, testdir): testdir.makepyfile(""" https://bitbucket.org/hpk42/pytest/commits/1f0a52f38f01/ Changeset: 1f0a52f38f01 User: flub Date: 2013-12-16 11:51:50 Summary: Fix docstring This was copied from another paramterize call and I forgot to change the parameters referred too. Affected #: 1 file diff -r 9fe1f0588fb743b461620f35aac87c09fbc77cdb -r 1f0a52f38f01757cc2bde11d1703564662c42752 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -73,9 +73,9 @@ can see it. If False (the default) then an explicit reference is needed to activate the fixture. - :arg ids: list of string ids each corresponding to the argvalues + :arg ids: list of string ids each corresponding to the params so that they are part of the test id. If no ids are provided - they will be generated automatically from the argvalues. + they will be generated automatically from the params. """ if callable(scope) and params is None and autouse == False: 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 notifications at travis-ci.org Mon Dec 16 12:00:39 2013 From: notifications at travis-ci.org (Travis CI) Date: Mon, 16 Dec 2013 11:00:39 +0000 Subject: [Pytest-commit] [Broken] hpk42/pytest#63 (master - 2bc9e31) Message-ID: <52aedd56dcb40_21e580181668@1c071bf8-1e53-4dcb-8fbc-6621ca99473e.mail> Build Update for hpk42/pytest ------------------------------------- Build: #63 Status: Broken Duration: 14 minutes and 20 seconds Commit: 2bc9e31 (master) Author: holger krekel Message: amend CHANGELOG with credits and issue mentioning View the changeset: https://github.com/hpk42/pytest/compare/563465feaafe...2bc9e31bc970 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15517870 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Dec 16 12:38:22 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 11:38:22 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: remove unused var (fixes flakes tests) Message-ID: <20131216113822.5932.91487@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/2cd7288ce1ff/ Changeset: 2cd7288ce1ff User: hpk42 Date: 2013-12-16 12:38:15 Summary: remove unused var (fixes flakes tests) Affected #: 1 file diff -r 1f0a52f38f01757cc2bde11d1703564662c42752 -r 2cd7288ce1ffadcda7c96502fb165e3fa2d33006 testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -631,7 +631,7 @@ ]) def test_generate_same_function_names_issue403(self, testdir): - sub1 = testdir.makepyfile(""" + testdir.makepyfile(""" import pytest def make_tests(): 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 Mon Dec 16 18:07:22 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 17:07:22 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix issue407: fix addoption docstring to point to argparse instead of Message-ID: <20131216170722.12720.24043@app18.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/5e1b7d9dc655/ Changeset: 5e1b7d9dc655 User: hpk42 Date: 2013-12-16 18:07:05 Summary: fix issue407: fix addoption docstring to point to argparse instead of optparse. Thanks Daniel D. Wright. Affected #: 4 files diff -r 2cd7288ce1ffadcda7c96502fb165e3fa2d33006 -r 5e1b7d9dc6555bbc576d5fb85a67c4421896f262 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,10 @@ - fix issue404 by always using the binary xml escape in the junitxml plugin. Thanks Ronny Pfannschmidt. +- fix issue407: fix addoption docstring to point to argparse instead of + optparse. Thanks Daniel D. Wright. + + 2.5.0 ----------------------------------- diff -r 2cd7288ce1ffadcda7c96502fb165e3fa2d33006 -r 5e1b7d9dc6555bbc576d5fb85a67c4421896f262 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.5.0' +__version__ = '2.5.1' diff -r 2cd7288ce1ffadcda7c96502fb165e3fa2d33006 -r 5e1b7d9dc6555bbc576d5fb85a67c4421896f262 _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -128,8 +128,8 @@ :opts: option names, can be short or long options. :attrs: same attributes which the ``add_option()`` function of the - `optparse library - `_ + `argparse library + `_ accepts. After command line parsing options are available on the pytest config diff -r 2cd7288ce1ffadcda7c96502fb165e3fa2d33006 -r 5e1b7d9dc6555bbc576d5fb85a67c4421896f262 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.5.0', + version='2.5.1', 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 Mon Dec 16 18:25:08 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 16 Dec 2013 17:25:08 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: pypy has >21K tests now Message-ID: <20131216172508.21661.48052@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/459686cc6a7c/ Changeset: 459686cc6a7c User: hpk42 Date: 2013-12-16 18:25:00 Summary: pypy has >21K tests now Affected #: 1 file diff -r 5e1b7d9dc6555bbc576d5fb85a67c4421896f262 -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 doc/en/projects.txt --- a/doc/en/projects.txt +++ b/doc/en/projects.txt @@ -23,7 +23,7 @@ Here are some examples of projects using py.test (please send notes via :ref:`contact`): * `PyPy `_, Python with a JIT compiler, running over - `16000 tests `_ + `21000 tests `_ * the `MoinMoin `_ Wiki Engine * `sentry `_, realtime app-maintenance and exception tracking * `tox `_, virtualenv/Hudson integration tool 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 Dec 17 06:55:57 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 05:55:57 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: close branch Message-ID: <20131217055557.469.4703@app09.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/682f995e65ec/ Changeset: 682f995e65ec Branch: color_option User: hpk42 Date: 2013-12-17 06:55:35 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 notifications at travis-ci.org Tue Dec 17 06:50:46 2013 From: notifications at travis-ci.org (Travis CI) Date: Tue, 17 Dec 2013 05:50:46 +0000 Subject: [Pytest-commit] [Fixed] hpk42/pytest#64 (master - a95f7ee) Message-ID: <52afe63674f18_22ba2951a9@442f83eb-be7c-4420-9b75-5778d3f7b0b9.mail> Build Update for hpk42/pytest ------------------------------------- Build: #64 Status: Fixed Duration: 12 minutes and 28 seconds Commit: a95f7ee (master) Author: holger krekel Message: pypy has >21K tests now View the changeset: https://github.com/hpk42/pytest/compare/2bc9e31bc970...a95f7ee88600 View the full build log and details: https://travis-ci.org/hpk42/pytest/builds/15567532 -- You can configure recipients for build notifications in your .travis.yml file. See http://about.travis-ci.org/docs/user/build-configuration -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Dec 17 06:50:11 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 05:50:11 -0000 Subject: [Pytest-commit] commit/pytest: 26 new changesets Message-ID: <20131217055011.2940.4034@app01.ash-private.bitbucket.org> 26 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/7c3fd16a9f80/ Changeset: 7c3fd16a9f80 User: Tobias Bieniek Date: 2013-12-12 18:38:17 Summary: .gitignore: Removed *.html rule The Sphinx templates are HTML files and should be included. Affected #: 1 file diff -r 98efed365b187b80af771abc085c8840546d104d -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 .gitignore --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ *.pyc *.pyo *.swp -*.html *.class *.orig *~ https://bitbucket.org/hpk42/pytest/commits/f75e1a790839/ Changeset: f75e1a790839 User: Tobias Bieniek Date: 2013-12-12 18:08:36 Summary: doc: Imported Flask Sphinx Styles from https://github.com/mitsuhiko/flask-sphinx-themes Affected #: 11 files diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/.gitignore --- /dev/null +++ b/doc/en/_themes/.gitignore @@ -0,0 +1,3 @@ +*.pyc +*.pyo +.DS_Store diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/LICENSE --- /dev/null +++ b/doc/en/_themes/LICENSE @@ -0,0 +1,37 @@ +Copyright (c) 2010 by Armin Ronacher. + +Some rights reserved. + +Redistribution and use in source and binary forms of the theme, with or +without modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +* The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +We kindly ask you to only use these themes in an unmodified manner just +for Flask and Flask-related products, not for unrelated projects. If you +like the visual style and want to use it for your own projects, please +consider making some larger changes to the themes (such as changing +font faces, sizes, colors or margins). + +THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/README --- /dev/null +++ b/doc/en/_themes/README @@ -0,0 +1,31 @@ +Flask Sphinx Styles +=================== + +This repository contains sphinx styles for Flask and Flask related +projects. To use this style in your Sphinx documentation, follow +this guide: + +1. put this folder as _themes into your docs folder. Alternatively + you can also use git submodules to check out the contents there. +2. add this to your conf.py: + + sys.path.append(os.path.abspath('_themes')) + html_theme_path = ['_themes'] + html_theme = 'flask' + +The following themes exist: + +- 'flask' - the standard flask documentation theme for large + projects +- 'flask_small' - small one-page theme. Intended to be used by + very small addon libraries for flask. + +The following options exist for the flask_small theme: + + [options] + index_logo = '' filename of a picture in _static + to be used as replacement for the + h1 in the index.rst file. + index_logo_height = 120px height of the index logo + github_fork = '' repository name on github for the + "fork me" badge diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask/layout.html --- /dev/null +++ b/doc/en/_themes/flask/layout.html @@ -0,0 +1,24 @@ +{%- extends "basic/layout.html" %} +{%- block extrahead %} + {{ super() }} + {% if theme_touch_icon %} + + {% endif %} + +{% endblock %} +{%- block relbar2 %}{% endblock %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{%- block footer %} + + {% if pagename == 'index' %} +
+ {% endif %} +{%- endblock %} diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask/relations.html --- /dev/null +++ b/doc/en/_themes/flask/relations.html @@ -0,0 +1,19 @@ +

Related Topics

+ diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask/static/flasky.css_t --- /dev/null +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -0,0 +1,577 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + +{% set page_width = '940px' %} +{% set sidebar_width = '220px' %} + + at import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + background-color: white; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + width: {{ page_width }}; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 {{ sidebar_width }}; +} + +div.sphinxsidebar { + width: {{ sidebar_width }}; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: {{ page_width }}; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'Garamond', 'Georgia', serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: 'Georgia', serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% endif %} +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -30px; + line-height: 1.3em; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted #004B6B; +} + +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { + border-bottom: 1px solid #6D4100; +} + +a:hover tt { + background: #EEE; +} + + + at media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + + at media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: white; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: white; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a { + color: white; + } + + div.sphinxsidebar a { + color: #aaa; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.related { + display: block; + margin: 0; + padding: 10px 0 20px 0; + } + + div.related ul, + div.related ul li { + margin: 0; + padding: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + + +/* scrollbars */ + +::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-button:start:decrement, +::-webkit-scrollbar-button:end:increment { + display: block; + height: 10px; +} + +::-webkit-scrollbar-button:vertical:increment { + background-color: #fff; +} + +::-webkit-scrollbar-track-piece { + background-color: #eee; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:vertical { + height: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +::-webkit-scrollbar-thumb:horizontal { + width: 50px; + background-color: #ccc; + -webkit-border-radius: 3px; +} + +/* misc. */ + +.revsys-inline { + display: none!important; +} \ No newline at end of file diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask/theme.conf --- /dev/null +++ b/doc/en/_themes/flask/theme.conf @@ -0,0 +1,9 @@ +[theme] +inherit = basic +stylesheet = flasky.css +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +touch_icon = diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask_small/layout.html --- /dev/null +++ b/doc/en/_themes/flask_small/layout.html @@ -0,0 +1,22 @@ +{% extends "basic/layout.html" %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{% block footer %} + {% if pagename == 'index' %} +
+ {% endif %} +{% endblock %} +{# do not display relbars #} +{% block relbar1 %}{% endblock %} +{% block relbar2 %} + {% if theme_github_fork %} + Fork me on GitHub + {% endif %} +{% endblock %} +{% block sidebar1 %}{% endblock %} +{% block sidebar2 %}{% endblock %} diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask_small/static/flasky.css_t --- /dev/null +++ b/doc/en/_themes/flask_small/static/flasky.css_t @@ -0,0 +1,287 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- flasky theme based on nature theme. + * + * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + + at import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Georgia', serif; + font-size: 17px; + color: #000; + background: white; + margin: 0; + padding: 0; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 40px auto 0 auto; + width: 700px; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 30px 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + text-align: right; + color: #888; + padding: 10px; + font-size: 14px; + width: 650px; + margin: 0 auto 40px auto; +} + +div.footer a { + color: #888; + text-decoration: underline; +} + +div.related { + line-height: 32px; + color: #888; +} + +div.related ul { + padding: 0 0 0 10px; +} + +div.related a { + color: #444; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + text-decoration: underline; +} + +div.body { + padding-bottom: 40px; /* saved for footer */ +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% endif %} + +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: white; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight{ + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +div.warning { + background-color: #ffe4e4; + border: 1px solid #f66; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.85em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td { + padding: 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +pre { + padding: 0; + margin: 15px -30px; + padding: 8px; + line-height: 1.3em; + padding: 7px 30px; + background: #eee; + border-radius: 2px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; +} + +dl pre { + margin-left: -60px; + padding-left: 60px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; +} + +a:hover tt { + background: #EEE; +} diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask_small/theme.conf --- /dev/null +++ b/doc/en/_themes/flask_small/theme.conf @@ -0,0 +1,10 @@ +[theme] +inherit = basic +stylesheet = flasky.css +nosidebar = true +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +github_fork = '' diff -r 7c3fd16a9f80b8db9c2adf2e9893d5070cb7c137 -r f75e1a79083920ca0e5e13a16f127331aeced38f doc/en/_themes/flask_theme_support.py --- /dev/null +++ b/doc/en/_themes/flask_theme_support.py @@ -0,0 +1,86 @@ +# flasky extensions. flasky pygments style based on tango style +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Punctuation, Other, Literal + + +class FlaskyStyle(Style): + background_color = "#f8f8f8" + default_style = "" + + styles = { + # No corresponding class for the following: + #Text: "", # class: '' + Whitespace: "underline #f8f8f8", # class: 'w' + Error: "#a40000 border:#ef2929", # class: 'err' + Other: "#000000", # class 'x' + + Comment: "italic #8f5902", # class: 'c' + Comment.Preproc: "noitalic", # class: 'cp' + + Keyword: "bold #004461", # class: 'k' + Keyword.Constant: "bold #004461", # class: 'kc' + Keyword.Declaration: "bold #004461", # class: 'kd' + Keyword.Namespace: "bold #004461", # class: 'kn' + Keyword.Pseudo: "bold #004461", # class: 'kp' + Keyword.Reserved: "bold #004461", # class: 'kr' + Keyword.Type: "bold #004461", # class: 'kt' + + Operator: "#582800", # class: 'o' + Operator.Word: "bold #004461", # class: 'ow' - like keywords + + Punctuation: "bold #000000", # class: 'p' + + # because special names such as Name.Class, Name.Function, etc. + # are not recognized as such later in the parsing, we choose them + # to look the same as ordinary variables. + Name: "#000000", # class: 'n' + Name.Attribute: "#c4a000", # class: 'na' - to be revised + Name.Builtin: "#004461", # class: 'nb' + Name.Builtin.Pseudo: "#3465a4", # class: 'bp' + Name.Class: "#000000", # class: 'nc' - to be revised + Name.Constant: "#000000", # class: 'no' - to be revised + Name.Decorator: "#888", # class: 'nd' - to be revised + Name.Entity: "#ce5c00", # class: 'ni' + Name.Exception: "bold #cc0000", # class: 'ne' + Name.Function: "#000000", # class: 'nf' + Name.Property: "#000000", # class: 'py' + Name.Label: "#f57900", # class: 'nl' + Name.Namespace: "#000000", # class: 'nn' - to be revised + Name.Other: "#000000", # class: 'nx' + Name.Tag: "bold #004461", # class: 'nt' - like a keyword + Name.Variable: "#000000", # class: 'nv' - to be revised + Name.Variable.Class: "#000000", # class: 'vc' - to be revised + Name.Variable.Global: "#000000", # class: 'vg' - to be revised + Name.Variable.Instance: "#000000", # class: 'vi' - to be revised + + Number: "#990000", # class: 'm' + + Literal: "#000000", # class: 'l' + Literal.Date: "#000000", # class: 'ld' + + String: "#4e9a06", # class: 's' + String.Backtick: "#4e9a06", # class: 'sb' + String.Char: "#4e9a06", # class: 'sc' + String.Doc: "italic #8f5902", # class: 'sd' - like a comment + String.Double: "#4e9a06", # class: 's2' + String.Escape: "#4e9a06", # class: 'se' + String.Heredoc: "#4e9a06", # class: 'sh' + String.Interpol: "#4e9a06", # class: 'si' + String.Other: "#4e9a06", # class: 'sx' + String.Regex: "#4e9a06", # class: 'sr' + String.Single: "#4e9a06", # class: 's1' + String.Symbol: "#4e9a06", # class: 'ss' + + Generic: "#000000", # class: 'g' + Generic.Deleted: "#a40000", # class: 'gd' + Generic.Emph: "italic #000000", # class: 'ge' + Generic.Error: "#ef2929", # class: 'gr' + Generic.Heading: "bold #000080", # class: 'gh' + Generic.Inserted: "#00A000", # class: 'gi' + Generic.Output: "#888", # class: 'go' + Generic.Prompt: "#745334", # class: 'gp' + Generic.Strong: "bold #000000", # class: 'gs' + Generic.Subheading: "bold #800080", # class: 'gu' + Generic.Traceback: "bold #a40000", # class: 'gt' + } https://bitbucket.org/hpk42/pytest/commits/62a996690a85/ Changeset: 62a996690a85 User: Tobias Bieniek Date: 2013-12-12 18:08:56 Summary: doc: Activate "Flask" theme Affected #: 1 file diff -r f75e1a79083920ca0e5e13a16f127331aeced38f -r 62a996690a85cf83a092133ca1b0f7bd73444e37 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -105,9 +105,12 @@ # -- Options for HTML output --------------------------------------------------- +sys.path.append(os.path.abspath('_themes')) +html_theme_path = ['_themes'] + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinxdoc' +html_theme = 'flask' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the https://bitbucket.org/hpk42/pytest/commits/ccacea53f07e/ Changeset: ccacea53f07e User: Tobias Bieniek Date: 2013-12-12 18:37:32 Summary: doc: Added proper sidebar to index page Affected #: 2 files diff -r 62a996690a85cf83a092133ca1b0f7bd73444e37 -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e doc/en/_templates/sidebarintro.html --- /dev/null +++ b/doc/en/_templates/sidebarintro.html @@ -0,0 +1,19 @@ +

About pytest

+

+ pytest is a mature full-featured Python testing tool that helps + you write better programs. +

+

Other Formats

+

+ You can download the documentation in other formats as well: +

+ +

Useful Links

+ diff -r 62a996690a85cf83a092133ca1b0f7bd73444e37 -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -153,6 +153,20 @@ #html_sidebars = {} #html_sidebars = {'index': 'indexsidebar.html'} +html_sidebars = { + 'index': [ + 'sidebarintro.html', + 'sourcelink.html', + 'searchbox.html' + ], + '**': [ + 'localtoc.html', + 'relations.html', + 'sourcelink.html', + 'searchbox.html' + ] +} + # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} https://bitbucket.org/hpk42/pytest/commits/de68a5d67fd8/ Changeset: de68a5d67fd8 User: Tobias Bieniek Date: 2013-12-12 18:43:20 Summary: doc: Removed unused themes Affected #: 4 files diff -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e -r de68a5d67fd88f06f95e1641c080160fcb26d93a doc/en/_static/sphinxdoc.css --- a/doc/en/_static/sphinxdoc.css +++ /dev/null @@ -1,339 +0,0 @@ -/* - * sphinxdoc.css_t - * ~~~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- sphinxdoc theme. Originally created by - * Armin Ronacher for Werkzeug. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - - at import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; - font-size: 1.1em; - letter-spacing: -0.01em; - line-height: 150%; - text-align: center; - background-color: #BFD1D4; - color: black; - padding: 0; - border: 1px solid #aaa; - - margin: 0px 80px 0px 80px; - min-width: 740px; -} - -div.document { - background-color: white; - text-align: left; - background-image: url(contents.png); - background-repeat: repeat-x; -} - -div.bodywrapper { - margin: 0 240px 0 0; - border-right: 1px solid #ccc; -} - -div.body { - margin: 0; - padding: 0.5em 20px 20px 20px; -} - -div.related { - font-size: 0.8em; -} - -div.related ul { - background-image: url(navigation.png); - height: 2em; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} - -div.related ul li { - margin: 0; - padding: 0; - height: 2em; - float: left; -} - -div.related ul li.right { - float: right; - margin-right: 5px; -} - -div.related ul li a { - margin: 0; - padding: 0 5px 0 5px; - line-height: 1.75em; - color: #EE9816; -} - -div.related ul li a:hover { - color: #3CA8E7; -} - -div.sphinxsidebarwrapper { - padding: 0; -} - -div.sphinxsidebar { - margin: 0; - padding: 0.5em 15px 15px 0; - width: 210px; - float: right; - font-size: 1em; - text-align: left; -} - -div.sphinxsidebar h3, div.sphinxsidebar h4 { - margin: 1em 0 0.5em 0; - font-size: 1em; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border: 1px solid #86989B; - background-color: #AFC1C4; -} - -div.sphinxsidebar h3 a { - color: white; -} - -div.sphinxsidebar ul { - padding-left: 1.5em; - margin-top: 7px; - padding: 0; - line-height: 130%; -} - -div.sphinxsidebar ul ul { - margin-left: 20px; -} - -div.footer { - background-color: #E3EFF1; - color: #86989B; - padding: 3px 8px 3px 0; - clear: both; - font-size: 0.8em; - text-align: right; -} - -div.footer a { - color: #86989B; - text-decoration: underline; -} - -/* -- body styles ----------------------------------------------------------- */ - -p { - margin: 0.8em 0 0.5em 0; -} - -a { - color: #CA7900; - text-decoration: none; -} - -a:hover { - color: #2491CF; -} - -div.body a { - text-decoration: underline; -} - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - color: #11557C; -} - -h2 { - margin: 1.3em 0 0.2em 0; - font-size: 1.35em; - padding: 0; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; -} - -div.body h1 a, div.body h2 a, div.body h3 a, div.body h4 a, div.body h5 a, div.body h6 a { - color: black!important; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa!important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - -a.headerlink { - color: #c60f0f!important; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none!important; -} - -a.headerlink:hover { - background-color: #ccc; - color: white!important; -} - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -tt { - background-color: #f2f2f2; - border-bottom: 1px solid #ddd; - color: #333; -} - -tt.descname, tt.descclassname, tt.xref { - border: 0; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -a tt { - border: 0; - color: #CA7900; -} - -a tt:hover { - color: #2491CF; -} - -pre { - font-family: 'Consolas', 'Deja Vu Sans Mono', - 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.015em; - line-height: 120%; - padding: 0.5em; - border: 1px solid #ccc; - background-color: #f8f8f8; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -td.linenos pre { - padding: 0.5em 0; -} - -div.quotebar { - background-color: #f8f8f8; - max-width: 250px; - float: right; - padding: 2px 7px; - border: 1px solid #ccc; -} - -div.topic { - background-color: #f8f8f8; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - -div.admonition, div.warning { - font-size: 0.9em; - margin: 1em 0 1em 0; - border: 1px solid #86989B; - background-color: #f7f7f7; - padding: 0; -} - -div.admonition p, div.warning p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} - -div.admonition pre, div.warning pre { - margin: 0.4em 1em 0.4em 1em; -} - -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border-bottom: 1px solid #86989B; - font-weight: bold; - background-color: #AFC1C4; -} - -div.warning { - border: 1px solid #940000; -} - -div.warning p.admonition-title { - background-color: #CF0000; - border-bottom-color: #940000; -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - -.viewcode-back { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', - 'Verdana', sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} diff -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e -r de68a5d67fd88f06f95e1641c080160fcb26d93a doc/en/_themes/flask_small/layout.html --- a/doc/en/_themes/flask_small/layout.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "basic/layout.html" %} -{% block header %} - {{ super() }} - {% if pagename == 'index' %} -
- {% endif %} -{% endblock %} -{% block footer %} - {% if pagename == 'index' %} -
- {% endif %} -{% endblock %} -{# do not display relbars #} -{% block relbar1 %}{% endblock %} -{% block relbar2 %} - {% if theme_github_fork %} - Fork me on GitHub - {% endif %} -{% endblock %} -{% block sidebar1 %}{% endblock %} -{% block sidebar2 %}{% endblock %} diff -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e -r de68a5d67fd88f06f95e1641c080160fcb26d93a doc/en/_themes/flask_small/static/flasky.css_t --- a/doc/en/_themes/flask_small/static/flasky.css_t +++ /dev/null @@ -1,287 +0,0 @@ -/* - * flasky.css_t - * ~~~~~~~~~~~~ - * - * Sphinx stylesheet -- flasky theme based on nature theme. - * - * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - - at import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: 'Georgia', serif; - font-size: 17px; - color: #000; - background: white; - margin: 0; - padding: 0; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 40px auto 0 auto; - width: 700px; -} - -hr { - border: 1px solid #B1B4B6; -} - -div.body { - background-color: #ffffff; - color: #3E4349; - padding: 0 30px 30px 30px; -} - -img.floatingflask { - padding: 0 0 10px 10px; - float: right; -} - -div.footer { - text-align: right; - color: #888; - padding: 10px; - font-size: 14px; - width: 650px; - margin: 0 auto 40px auto; -} - -div.footer a { - color: #888; - text-decoration: underline; -} - -div.related { - line-height: 32px; - color: #888; -} - -div.related ul { - padding: 0 0 0 10px; -} - -div.related a { - color: #444; -} - -/* -- body styles ----------------------------------------------------------- */ - -a { - color: #004B6B; - text-decoration: underline; -} - -a:hover { - color: #6D4100; - text-decoration: underline; -} - -div.body { - padding-bottom: 40px; /* saved for footer */ -} - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - margin: 30px 0px 10px 0px; - padding: 0; -} - -{% if theme_index_logo %} -div.indexwrapper h1 { - text-indent: -999999px; - background: url({{ theme_index_logo }}) no-repeat center center; - height: {{ theme_index_logo_height }}; -} -{% endif %} - -div.body h2 { font-size: 180%; } -div.body h3 { font-size: 150%; } -div.body h4 { font-size: 130%; } -div.body h5 { font-size: 100%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: white; - padding: 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - color: #444; - background: #eaeaea; -} - -div.body p, div.body dd, div.body li { - line-height: 1.4em; -} - -div.admonition { - background: #fafafa; - margin: 20px -30px; - padding: 10px 30px; - border-top: 1px solid #ccc; - border-bottom: 1px solid #ccc; -} - -div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; - font-weight: normal; - font-size: 24px; - margin: 0 0 10px 0; - padding: 0; - line-height: 1; -} - -div.admonition p.last { - margin-bottom: 0; -} - -div.highlight{ - background-color: white; -} - -dt:target, .highlight { - background: #FAF3E8; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre, tt { - font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.85em; -} - -img.screenshot { -} - -tt.descname, tt.descclassname { - font-size: 0.95em; -} - -tt.descname { - padding-right: 0.08em; -} - -img.screenshot { - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils { - border: 1px solid #888; - -moz-box-shadow: 2px 2px 4px #eee; - -webkit-box-shadow: 2px 2px 4px #eee; - box-shadow: 2px 2px 4px #eee; -} - -table.docutils td, table.docutils th { - border: 1px solid #888; - padding: 0.25em 0.7em; -} - -table.field-list, table.footnote { - border: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -table.footnote { - margin: 15px 0; - width: 100%; - border: 1px solid #eee; -} - -table.field-list th { - padding: 0 0.8em 0 0; -} - -table.field-list td { - padding: 0; -} - -table.footnote td { - padding: 0.5em; -} - -dl { - margin: 0; - padding: 0; -} - -dl dd { - margin-left: 30px; -} - -pre { - padding: 0; - margin: 15px -30px; - padding: 8px; - line-height: 1.3em; - padding: 7px 30px; - background: #eee; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; -} - -dl pre { - margin-left: -60px; - padding-left: 60px; -} - -tt { - background-color: #ecf0f3; - color: #222; - /* padding: 1px 2px; */ -} - -tt.xref, a tt { - background-color: #FBFBFB; -} - -a:hover tt { - background: #EEE; -} diff -r ccacea53f07e4b246d021001f1bdc8a1475d4c5e -r de68a5d67fd88f06f95e1641c080160fcb26d93a doc/en/_themes/flask_small/theme.conf --- a/doc/en/_themes/flask_small/theme.conf +++ /dev/null @@ -1,10 +0,0 @@ -[theme] -inherit = basic -stylesheet = flasky.css -nosidebar = true -pygments_style = flask_theme_support.FlaskyStyle - -[options] -index_logo = '' -index_logo_height = 120px -github_fork = '' https://bitbucket.org/hpk42/pytest/commits/8c984ee7498a/ Changeset: 8c984ee7498a User: Tobias Bieniek Date: 2013-12-12 18:43:35 Summary: doc: Moved links section to its own file Affected #: 3 files diff -r de68a5d67fd88f06f95e1641c080160fcb26d93a -r 8c984ee7498a141362e8e155204bb430d1bceeaf doc/en/_templates/links.html --- /dev/null +++ b/doc/en/_templates/links.html @@ -0,0 +1,7 @@ +

Useful Links

+ diff -r de68a5d67fd88f06f95e1641c080160fcb26d93a -r 8c984ee7498a141362e8e155204bb430d1bceeaf doc/en/_templates/sidebarintro.html --- a/doc/en/_templates/sidebarintro.html +++ b/doc/en/_templates/sidebarintro.html @@ -10,10 +10,3 @@ -

Useful Links

- diff -r de68a5d67fd88f06f95e1641c080160fcb26d93a -r 8c984ee7498a141362e8e155204bb430d1bceeaf doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -156,6 +156,7 @@ html_sidebars = { 'index': [ 'sidebarintro.html', + 'links.html', 'sourcelink.html', 'searchbox.html' ], https://bitbucket.org/hpk42/pytest/commits/18d99a826876/ Changeset: 18d99a826876 User: Tobias Bieniek Date: 2013-12-12 18:49:44 Summary: doc: Moved searchbox into searchbox.html file Affected #: 2 files diff -r 8c984ee7498a141362e8e155204bb430d1bceeaf -r 18d99a8268765b5696e7df6057e79cd0a748760a doc/en/_templates/localtoc.html --- a/doc/en/_templates/localtoc.html +++ b/doc/en/_templates/localtoc.html @@ -1,16 +1,3 @@ - -{%- if pagename != "search" %} - - -{%- endif %} -

quicklinks

diff -r 8c984ee7498a141362e8e155204bb430d1bceeaf -r 18d99a8268765b5696e7df6057e79cd0a748760a doc/en/_templates/searchbox.html --- a/doc/en/_templates/searchbox.html +++ b/doc/en/_templates/searchbox.html @@ -0,0 +1,11 @@ +{%- if pagename != "search" %} + + +{%- endif %} https://bitbucket.org/hpk42/pytest/commits/2e9f9db53fa6/ Changeset: 2e9f9db53fa6 User: Tobias Bieniek Date: 2013-12-12 18:55:09 Summary: doc: Moved PDF documentation link into links.html Affected #: 2 files diff -r 18d99a8268765b5696e7df6057e79cd0a748760a -r 2e9f9db53fa6d0f4098604b2dc202733d89c085e doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -4,4 +4,5 @@
  • pytest @ PyPI
  • pytest @ Bitbucket
  • Issue Tracker
  • +
  • PDF Documentation diff -r 18d99a8268765b5696e7df6057e79cd0a748760a -r 2e9f9db53fa6d0f4098604b2dc202733d89c085e doc/en/_templates/sidebarintro.html --- a/doc/en/_templates/sidebarintro.html +++ b/doc/en/_templates/sidebarintro.html @@ -3,10 +3,3 @@ pytest is a mature full-featured Python testing tool that helps you write better programs.

    -

    Other Formats

    -

    - You can download the documentation in other formats as well: -

    - https://bitbucket.org/hpk42/pytest/commits/a828d0e29586/ Changeset: a828d0e29586 User: Tobias Bieniek Date: 2013-12-12 18:56:13 Summary: doc: Removed overwritten searchbox template The original one works quite well... Affected #: 1 file diff -r 2e9f9db53fa6d0f4098604b2dc202733d89c085e -r a828d0e29586dc8237590acd8020ee917c342e4b doc/en/_templates/searchbox.html --- a/doc/en/_templates/searchbox.html +++ /dev/null @@ -1,11 +0,0 @@ -{%- if pagename != "search" %} - - -{%- endif %} https://bitbucket.org/hpk42/pytest/commits/50af5ebc5f00/ Changeset: 50af5ebc5f00 User: Tobias Bieniek Date: 2013-12-12 18:58:16 Summary: doc: Added "Useful Links" section to all sidebars Affected #: 1 file diff -r a828d0e29586dc8237590acd8020ee917c342e4b -r 50af5ebc5f000215ca379f699dc824c9d0943603 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -163,6 +163,7 @@ '**': [ 'localtoc.html', 'relations.html', + 'links.html', 'sourcelink.html', 'searchbox.html' ] https://bitbucket.org/hpk42/pytest/commits/dba8e226b231/ Changeset: dba8e226b231 User: Tobias Bieniek Date: 2013-12-12 19:03:25 Summary: doc: Adjusted sidebar link Affected #: 1 file diff -r 50af5ebc5f000215ca379f699dc824c9d0943603 -r dba8e226b231146056b9988d1ed79893ed162ac7 doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -1,6 +1,6 @@

    Useful Links

      -
    • The pytest Website
    • +
    • The pytest Website
    • pytest @ PyPI
    • pytest @ Bitbucket
    • Issue Tracker
    • https://bitbucket.org/hpk42/pytest/commits/58c9c2275625/ Changeset: 58c9c2275625 User: Tobias Bieniek Date: 2013-12-12 19:08:26 Summary: CHANGELOG: Removed trailing whitespace Affected #: 1 file diff -r dba8e226b231146056b9988d1ed79893ed162ac7 -r 58c9c22756256f78e52a8491255cfa9c42e726d1 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,28 +1,28 @@ 2.5.0 ----------------------------------- -- dropped python2.5 from automated release testing of pytest itself - which means it's probably going to break soon (but still works +- dropped python2.5 from automated release testing of pytest itself + which means it's probably going to break soon (but still works with this release we believe). - simplified and fixed implementation for calling finalizers when - parametrized fixtures or function arguments are involved. finalization + parametrized fixtures or function arguments are involved. finalization is now performed lazily at setup time instead of in the "teardown phase". - While this might sound odd at first, it helps to ensure that we are + While this might sound odd at first, it helps to ensure that we are correctly handling setup/teardown even in complex code. User-level code should not be affected unless it's implementing the pytest_runtest_teardown hook and expecting certain fixture instances are torn down within (very unlikely and would have been unreliable anyway). -- PR90: add --color=yes|no|auto option to force terminal coloring +- PR90: add --color=yes|no|auto option to force terminal coloring mode ("auto" is default). Thanks Marc Abramowitz. - fix issue319 - correctly show unicode in assertion errors. Many thanks to Floris Bruynooghe for the complete PR. Also means we depend on py>=1.4.19 now. -- fix issue396 - correctly sort and finalize class-scoped parametrized - tests independently from number of methods on the class. +- fix issue396 - correctly sort and finalize class-scoped parametrized + tests independently from number of methods on the class. - refix issue323 in a better way -- parametrization should now never cause Runtime Recursion errors because the underlying algorithm @@ -31,18 +31,18 @@ to problems for more than >966 non-function scoped parameters). - fix issue290 - there is preliminary support now for parametrizing - with repeated same values (sometimes useful to to test if calling + with repeated same values (sometimes useful to to test if calling a second time works as with the first time). - close issue240 - document precisely how pytest module importing - works, discuss the two common test directory layouts, and how it + works, discuss the two common test directory layouts, and how it interacts with PEP420-namespace packages. - fix issue246 fix finalizer order to be LIFO on independent fixtures - depending on a parametrized higher-than-function scoped fixture. + depending on a parametrized higher-than-function scoped fixture. (was quite some effort so please bear with the complexity of this sentence :) Thanks Ralph Schmitt for the precise failure example. - + - fix issue244 by implementing special index for parameters to only use indices for paramentrized test ids @@ -60,9 +60,9 @@ filtering with simple strings that are not valid python expressions. Examples: "-k 1.3" matches all tests parametrized with 1.3. "-k None" filters all tests that have "None" in their name - and conversely "-k 'not None'". + and conversely "-k 'not None'". Previously these examples would raise syntax errors. - + - fix issue384 by removing the trial support code since the unittest compat enhancements allow trial to handle it on its own @@ -70,7 +70,7 @@ - don't hide an ImportError when importing a plugin produces one. fixes issue375. -- fix issue275 - allow usefixtures and autouse fixtures +- fix issue275 - allow usefixtures and autouse fixtures for running doctest text files. - fix issue380 by making --resultlog only rely on longrepr instead @@ -96,20 +96,20 @@ (it already did neutralize pytest.mark.xfail markers) - refine pytest / pkg_resources interactions: The AssertionRewritingHook - PEP302 compliant loader now registers itself with setuptools/pkg_resources + PEP302 compliant loader now registers itself with setuptools/pkg_resources properly so that the pkg_resources.resource_stream method works properly. Fixes issue366. Thanks for the investigations and full PR to Jason R. Coombs. - pytestconfig fixture is now session-scoped as it is the same object during the - whole test run. Fixes issue370. + whole test run. Fixes issue370. - avoid one surprising case of marker malfunction/confusion:: - + @pytest.mark.some(lambda arg: ...) def test_function(): - would not work correctly because pytest assumes @pytest.mark.some - gets a function to be decorated already. We now at least detect if this + would not work correctly because pytest assumes @pytest.mark.some + gets a function to be decorated already. We now at least detect if this arg is an lambda and thus the example will work. Thanks Alex Gaynor for bringing it up. @@ -120,11 +120,11 @@ although it's not needed by pytest itself atm. Also fix caching. Fixes issue376. -- fix issue221 - handle importing of namespace-package with no +- fix issue221 - handle importing of namespace-package with no __init__.py properly. - refactor internal FixtureRequest handling to avoid monkeypatching. - One of the positive user-facing effects is that the "request" object + One of the positive user-facing effects is that the "request" object can now be used in closures. - fixed version comparison in pytest.importskip(modname, minverstring) @@ -160,9 +160,9 @@ - remove attempt to "dup" stdout at startup as it's icky. the normal capturing should catch enough possibilities - of tests messing up standard FDs. + of tests messing up standard FDs. -- add pluginmanager.do_configure(config) as a link to +- add pluginmanager.do_configure(config) as a link to config.do_configure() for plugin-compatibility Changes between 2.4.0 and 2.4.1 @@ -172,7 +172,7 @@ "type" keyword should also be converted to the respective types. thanks Floris Bruynooghe, @dnozay. (fixes issue360 and issue362) -- fix dotted filename completion when using argcomplete +- fix dotted filename completion when using argcomplete thanks Anthon van der Neuth. (fixes issue361) - fix regression when a 1-tuple ("arg",) is used for specifying @@ -228,12 +228,12 @@ - make "import pdb ; pdb.set_trace()" work natively wrt capturing (no "-s" needed anymore), making ``pytest.set_trace()`` a mere shortcut. -- fix issue181: --pdb now also works on collect errors (and - on internal errors) . This was implemented by a slight internal - refactoring and the introduction of a new hook +- fix issue181: --pdb now also works on collect errors (and + on internal errors) . This was implemented by a slight internal + refactoring and the introduction of a new hook ``pytest_exception_interact`` hook (see next item). -- fix issue341: introduce new experimental hook for IDEs/terminals to +- fix issue341: introduce new experimental hook for IDEs/terminals to intercept debugging: ``pytest_exception_interact(node, call, report)``. - new monkeypatch.setattr() variant to provide a shorter @@ -251,7 +251,7 @@ phase of a node. - simplify pytest.mark.parametrize() signature: allow to pass a - CSV-separated string to specify argnames. For example: + CSV-separated string to specify argnames. For example: ``pytest.mark.parametrize("input,expected", [(1,2), (2,3)])`` works as well as the previous: ``pytest.mark.parametrize(("input", "expected"), ...)``. @@ -276,10 +276,10 @@ Bug fixes: -- fix issue358 - capturing options are now parsed more properly +- fix issue358 - capturing options are now parsed more properly by using a new parser.parse_known_args method. -- pytest now uses argparse instead of optparse (thanks Anthon) which +- pytest now uses argparse instead of optparse (thanks Anthon) which means that "argparse" is added as a dependency if installing into python2.6 environments or below. @@ -320,7 +320,7 @@ - fix issue323 - sorting of many module-scoped arg parametrizations - make sessionfinish hooks execute with the same cwd-context as at - session start (helps fix plugin behaviour which write output files + session start (helps fix plugin behaviour which write output files with relative path such as pytest-cov) - fix issue316 - properly reference collection hooks in docs @@ -328,7 +328,7 @@ - fix issue 306 - cleanup of -k/-m options to only match markers/test names/keywords respectively. Thanks Wouter van Ackooy. -- improved doctest counting for doctests in python modules -- +- improved doctest counting for doctests in python modules -- files without any doctest items will not show up anymore and doctest examples are counted as separate test items. thanks Danilo Bellini. @@ -338,7 +338,7 @@ mode. Thanks Jason R. Coombs. - fix junitxml generation when test output contains control characters, - addressing issue267, thanks Jaap Broekhuizen + addressing issue267, thanks Jaap Broekhuizen - fix issue338: honor --tb style for setup/teardown errors as well. Thanks Maho. @@ -347,7 +347,7 @@ - better parametrize error messages, thanks Brianna Laugher - pytest_terminal_summary(terminalreporter) hooks can now use - ".section(title)" and ".line(msg)" methods to print extra + ".section(title)" and ".line(msg)" methods to print extra information at the end of a test run. Changes between 2.3.4 and 2.3.5 @@ -401,7 +401,7 @@ - fix bug where using capsys with pytest.set_trace() in a test function would break when looking at capsys.readouterr() -- allow to specify prefixes starting with "_" when +- allow to specify prefixes starting with "_" when customizing python_functions test discovery. (thanks Graham Horler) - improve PYTEST_DEBUG tracing output by puting @@ -418,7 +418,7 @@ Changes between 2.3.3 and 2.3.4 ----------------------------------- -- yielded test functions will now have autouse-fixtures active but +- yielded test functions will now have autouse-fixtures active but cannot accept fixtures as funcargs - it's anyway recommended to rather use the post-2.0 parametrize features instead of yield, see: http://pytest.org/latest/example/parametrize.html @@ -433,7 +433,7 @@ can write: -k "name1 or name2" etc. This is a slight incompatibility if you used special syntax like "TestClass.test_method" which you now need to write as -k "TestClass and test_method" to match a certain - method in a certain test class. + method in a certain test class. Changes between 2.3.2 and 2.3.3 ----------------------------------- @@ -470,7 +470,7 @@ Changes between 2.3.1 and 2.3.2 ----------------------------------- -- fix issue208 and fix issue29 use new py version to avoid long pauses +- fix issue208 and fix issue29 use new py version to avoid long pauses when printing tracebacks in long modules - fix issue205 - conftests in subdirs customizing @@ -554,7 +554,7 @@ - pluginmanager.register(...) now raises ValueError if the plugin has been already registered or the name is taken -- fix issue159: improve http://pytest.org/latest/faq.html +- fix issue159: improve http://pytest.org/latest/faq.html especially with respect to the "magic" history, also mention pytest-django, trial and unittest integration. @@ -585,7 +585,7 @@ you can use startdir.bestrelpath(yourpath) to show nice relative path - - allow plugins to implement both pytest_report_header and + - allow plugins to implement both pytest_report_header and pytest_sessionstart (sessionstart is invoked first). - don't show deselected reason line if there is none @@ -619,7 +619,7 @@ - fix issue101: wrong args to unittest.TestCase test function now produce better output -- fix issue102: report more useful errors and hints for when a +- fix issue102: report more useful errors and hints for when a test directory was renamed and some pyc/__pycache__ remain - fix issue106: allow parametrize to be applied multiple times e.g. from module, class and at function level. @@ -638,7 +638,7 @@ ---------------------------------------- - fix issue99 (in pytest and py) internallerrors with resultlog now - produce better output - fixed by normalizing pytest_internalerror + produce better output - fixed by normalizing pytest_internalerror input arguments. - fix issue97 / traceback issues (in pytest and py) improve traceback output in conjunction with jinja2 and cython which hack tracebacks @@ -646,7 +646,7 @@ the final test in a test node will now run its teardown directly instead of waiting for the end of the session. Thanks Dave Hunt for the good reporting and feedback. The pytest_runtest_protocol as well - as the pytest_runtest_teardown hooks now have "nextitem" available + as the pytest_runtest_teardown hooks now have "nextitem" available which will be None indicating the end of the test run. - fix collection crash due to unknown-source collected items, thanks to Ralf Schmitt (fixed by depending on a more recent pylib) @@ -656,15 +656,15 @@ - fix issue90: introduce eager tearing down of test items so that teardown function are called earlier. -- add an all-powerful metafunc.parametrize function which allows to +- add an all-powerful metafunc.parametrize function which allows to parametrize test function arguments in multiple steps and therefore - from indepdenent plugins and palces. + from indepdenent plugins and palces. - add a @pytest.mark.parametrize helper which allows to easily call a test function with different argument values -- Add examples to the "parametrize" example page, including a quick port +- Add examples to the "parametrize" example page, including a quick port of Test scenarios and the new parametrize function and decorator. - introduce registration for "pytest.mark.*" helpers via ini-files - or through plugin hooks. Also introduce a "--strict" option which + or through plugin hooks. Also introduce a "--strict" option which will treat unregistered markers as errors allowing to avoid typos and maintain a well described set of markers for your test suite. See exaples at http://pytest.org/latest/mark.html @@ -673,12 +673,12 @@ (this is a stricter and more predictable version of '-k' in that "-m" only matches complete markers and has more obvious rules for and/or semantics. -- new feature to help optimizing the speed of your tests: - --durations=N option for displaying N slowest test calls +- new feature to help optimizing the speed of your tests: + --durations=N option for displaying N slowest test calls and setup/teardown methods. - fix issue87: --pastebin now works with python3 - fix issue89: --pdb with unexpected exceptions in doctest work more sensibly -- fix and cleanup pytest's own test suite to not leak FDs +- fix and cleanup pytest's own test suite to not leak FDs - fix issue83: link to generated funcarg list - fix issue74: pyarg module names are now checked against imp.find_module false positives - fix compatibility with twisted/trial-11.1.0 use cases @@ -770,17 +770,17 @@ Also you can now access module globals from xfail/skipif expressions so that this for example works now:: - + import pytest import mymodule @pytest.mark.skipif("mymodule.__version__[0] == "1") def test_function(): pass - This will not run the test function if the module's version string + This will not run the test function if the module's version string does not start with a "1". Note that specifying a string instead - of a boolean expressions allows py.test to report meaningful information - when summarizing a test run as to what conditions lead to skipping + of a boolean expressions allows py.test to report meaningful information + when summarizing a test run as to what conditions lead to skipping (or xfail-ing) tests. - fix issue28 - setup_method and pytest_generate_tests work together @@ -803,7 +803,7 @@ - fixed typos in the docs (thanks Victor Garcia, Brianna Laugher) and particular thanks to Laura Creighton who also revieved parts of the documentation. -- fix slighly wrong output of verbose progress reporting for classes +- fix slighly wrong output of verbose progress reporting for classes (thanks Amaury) - more precise (avoiding of) deprecation warnings for node.Class|Function accesses @@ -819,7 +819,7 @@ - allow to omit "()" in test ids to allow for uniform test ids as produced by Alfredo's nice pytest.vim plugin. - fix issue12 - show plugin versions with "--version" and - "--traceconfig" and also document how to add extra information + "--traceconfig" and also document how to add extra information to reporting test header - fix issue17 (import-* reporting issue on python3) by requiring py>1.4.0 (1.4.1 is going to include it) @@ -849,13 +849,13 @@ - fix issue14: no logging errors at process exit - refinements to "collecting" output on non-ttys - refine internal plugin registration and --traceconfig output -- introduce a mechanism to prevent/unregister plugins from the +- introduce a mechanism to prevent/unregister plugins from the command line, see http://pytest.org/plugins.html#cmdunregister - activate resultlog plugin by default - fix regression wrt yielded tests which due to the - collection-before-running semantics were not + collection-before-running semantics were not setup as with pytest 1.3.4. Note, however, that - the recommended and much cleaner way to do test + the recommended and much cleaner way to do test parametraization remains the "pytest_generate_tests" mechanism, see the docs. https://bitbucket.org/hpk42/pytest/commits/c513018cb2b0/ Changeset: c513018cb2b0 User: Tobias Bieniek Date: 2013-12-12 19:10:24 Summary: CHANGELOG: Simplified section headings Affected #: 1 file diff -r 58c9c22756256f78e52a8491255cfa9c42e726d1 -r c513018cb2b01d20ee6a59c22347fc7a24db0270 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2.5.0 +v2.5.0 ----------------------------------- - dropped python2.5 from automated release testing of pytest itself @@ -134,7 +134,7 @@ - fix verbose reporting for @mock'd test functions -Changes between 2.4.1 and 2.4.2 +v2.4.2 ----------------------------------- - on Windows require colorama and a newer py lib so that py.io.TerminalWriter() @@ -165,7 +165,7 @@ - add pluginmanager.do_configure(config) as a link to config.do_configure() for plugin-compatibility -Changes between 2.4.0 and 2.4.1 +v2.4.1 ----------------------------------- - When using parser.addoption() unicode arguments to the @@ -181,7 +181,7 @@ - merge doc typo fixes, thanks Andy Dirnberger -Changes between 2.3.5 and 2.4 +v2.4 ----------------------------------- known incompatibilities: @@ -350,7 +350,7 @@ ".section(title)" and ".line(msg)" methods to print extra information at the end of a test run. -Changes between 2.3.4 and 2.3.5 +v2.3.5 ----------------------------------- - fix issue169: respect --tb=style with setup/teardown errors as well. @@ -415,7 +415,7 @@ - fix issue266 - accept unicode in MarkEvaluator expressions -Changes between 2.3.3 and 2.3.4 +v2.3.4 ----------------------------------- - yielded test functions will now have autouse-fixtures active but @@ -435,7 +435,7 @@ need to write as -k "TestClass and test_method" to match a certain method in a certain test class. -Changes between 2.3.2 and 2.3.3 +v2.3.3 ----------------------------------- - fix issue214 - parse modules that contain special objects like e. g. @@ -467,7 +467,7 @@ - fix issue127 - improve documentation for pytest_addoption() and add a ``config.getoption(name)`` helper function for consistency. -Changes between 2.3.1 and 2.3.2 +v2.3.2 ----------------------------------- - fix issue208 and fix issue29 use new py version to avoid long pauses @@ -500,7 +500,7 @@ - add tox.ini to pytest distribution so that ignore-dirs and others config bits are properly distributed for maintainers who run pytest-own tests -Changes between 2.3.0 and 2.3.1 +v2.3.1 ----------------------------------- - fix issue202 - fix regression: using "self" from fixture functions now @@ -513,7 +513,7 @@ - link to web pages from --markers output which provides help for pytest.mark.* usage. -Changes between 2.2.4 and 2.3.0 +v2.3.0 ----------------------------------- - fix issue202 - better automatic names for parametrized test functions @@ -592,7 +592,7 @@ - py.test -vv will show all of assert comparisations instead of truncating -Changes between 2.2.3 and 2.2.4 +v2.2.4 ----------------------------------- - fix error message for rewritten assertions involving the % operator @@ -609,12 +609,12 @@ - fix issue #144: better mangle test ids to junitxml classnames - upgrade distribute_setup.py to 0.6.27 -Changes between 2.2.2 and 2.2.3 +v2.2.3 ---------------------------------------- - fix uploaded package to only include neccesary files -Changes between 2.2.1 and 2.2.2 +v2.2.2 ---------------------------------------- - fix issue101: wrong args to unittest.TestCase test function now @@ -634,7 +634,7 @@ - allow adding of attributes to test reports such that it also works with distributed testing (no upgrade of pytest-xdist needed) -Changes between 2.2.0 and 2.2.1 +v2.2.1 ---------------------------------------- - fix issue99 (in pytest and py) internallerrors with resultlog now @@ -651,7 +651,7 @@ - fix collection crash due to unknown-source collected items, thanks to Ralf Schmitt (fixed by depending on a more recent pylib) -Changes between 2.1.3 and 2.2.0 +v2.2.0 ---------------------------------------- - fix issue90: introduce eager tearing down of test items so that @@ -686,7 +686,7 @@ - simplify junitxml output code by relying on py.xml - add support for skip properties on unittest classes and functions -Changes between 2.1.2 and 2.1.3 +v2.1.3 ---------------------------------------- - fix issue79: assertion rewriting failed on some comparisons in boolops @@ -695,7 +695,7 @@ - fix issue75 / skipping test failure on jython - fix issue77 / Allow assertrepr_compare hook to apply to a subset of tests -Changes between 2.1.1 and 2.1.2 +v2.1.2 ---------------------------------------- - fix assertion rewriting on files with windows newlines on some Python versions @@ -705,7 +705,7 @@ - fix issue66: use different assertion rewriting caches when the -O option is passed - don't try assertion rewriting on Jython, use reinterp -Changes between 2.1.0 and 2.1.1 +v2.1.1 ---------------------------------------------- - fix issue64 / pytest.set_trace now works within pytest_generate_tests hooks @@ -718,7 +718,7 @@ - fix issue61: assertion rewriting on boolean operations with 3 or more operands - you can now build a man page with "cd doc ; make man" -Changes between 2.0.3 and 2.1.0.DEV +v2.1.0 ---------------------------------------------- - fix issue53 call nosestyle setup functions with correct ordering @@ -738,7 +738,7 @@ - report KeyboardInterrupt even if interrupted during session startup - fix issue 35 - provide PDF doc version and download link from index page -Changes between 2.0.2 and 2.0.3 +v2.0.3 ---------------------------------------------- - fix issue38: nicer tracebacks on calls to hooks, particularly early @@ -758,7 +758,7 @@ - fix issue37: avoid invalid characters in junitxml's output -Changes between 2.0.1 and 2.0.2 +v2.0.2 ---------------------------------------------- - tackle issue32 - speed up test runs of very quick test functions @@ -810,7 +810,7 @@ - avoid std unittest assertion helper code in tracebacks (thanks Ronny) -Changes between 2.0.0 and 2.0.1 +v2.0.1 ---------------------------------------------- - refine and unify initial capturing so that it works nicely @@ -859,7 +859,7 @@ parametraization remains the "pytest_generate_tests" mechanism, see the docs. -Changes between 1.3.4 and 2.0.0 +v2.0.0 ---------------------------------------------- - pytest-2.0 is now its own package and depends on pylib-2.0 @@ -904,7 +904,7 @@ - add ability to use "class" level for cached_setup helper - fix strangeness: mark.* objects are now immutable, create new instances -Changes between 1.3.3 and 1.3.4 +v1.3.4 ---------------------------------------------- - fix issue111: improve install documentation for windows @@ -913,7 +913,7 @@ - fix issue115: unify internal exception passthrough/catching/GeneratorExit - fix issue118: new --tb=native for presenting cpython-standard exceptions -Changes between 1.3.2 and 1.3.3 +v1.3.3 ---------------------------------------------- - fix issue113: assertion representation problem with triple-quoted strings @@ -928,7 +928,7 @@ (thanks Armin Ronacher for reporting) - remove trailing whitespace in all py/text distribution files -Changes between 1.3.1 and 1.3.2 +v1.3.2 ---------------------------------------------- New features @@ -1003,7 +1003,7 @@ - fix homedir detection on Windows - ship distribute_setup.py version 0.6.13 -Changes between 1.3.0 and 1.3.1 +v1.3.1 --------------------------------------------- New features @@ -1075,7 +1075,7 @@ (and internally be more careful when presenting unexpected byte sequences) -Changes between 1.2.1 and 1.3.0 +v1.3.0 --------------------------------------------- - deprecate --report option in favour of a new shorter and easier to @@ -1140,7 +1140,7 @@ - added links to the new capturelog and coverage plugins -Changes between 1.2.1 and 1.2.0 +v1.2.0 --------------------------------------------- - refined usage and options for "py.cleanup":: @@ -1179,7 +1179,7 @@ - fix plugin links -Changes between 1.2 and 1.1.1 +v1.1.1 --------------------------------------------- - moved dist/looponfailing from py.test core into a new @@ -1263,7 +1263,7 @@ - fix docs, fix internal bin/ script generation -Changes between 1.1.1 and 1.1.0 +v1.1.0 --------------------------------------------- - introduce automatic plugin registration via 'pytest11' @@ -1282,7 +1282,7 @@ - try harder to have deprecation warnings for py.compat.* accesses report a correct location -Changes between 1.1.0 and 1.0.2 +v1.0.2 --------------------------------------------- * adjust and improve docs @@ -1367,7 +1367,7 @@ * simplified internal localpath implementation -Changes between 1.0.1 and 1.0.2 +v1.0.2 ------------------------------------------- * fixing packaging issues, triggered by fedora redhat packaging, @@ -1375,7 +1375,7 @@ * added a documentation link to the new django plugin. -Changes between 1.0.0 and 1.0.1 +v1.0.1 ------------------------------------------- * added a 'pytest_nose' plugin which handles nose.SkipTest, @@ -1409,13 +1409,13 @@ * simplified multicall mechanism and plugin architecture, renamed some internal methods and argnames -Changes between 1.0.0b9 and 1.0.0 +v1.0.0 ------------------------------------------- * more terse reporting try to show filesystem path relatively to current dir * improve xfail output a bit -Changes between 1.0.0b8 and 1.0.0b9 +v1.0.0b9 ------------------------------------------- * cleanly handle and report final teardown of test setup @@ -1449,7 +1449,7 @@ * item.repr_failure(excinfo) instead of item.repr_failure(excinfo, outerr) -Changes between 1.0.0b7 and 1.0.0b8 +v1.0.0b8 ------------------------------------------- * pytest_unittest-plugin is now enabled by default @@ -1478,7 +1478,7 @@ * tweaked doctest output for docstrings in py modules, thanks Radomir. -Changes between 1.0.0b3 and 1.0.0b7 +v1.0.0b7 ------------------------------------------- * renamed py.test.xfail back to py.test.mark.xfail to avoid @@ -1503,7 +1503,7 @@ * make __name__ == "__channelexec__" for remote_exec code -Changes between 1.0.0b1 and 1.0.0b3 +v1.0.0b3 ------------------------------------------- * plugin classes are removed: one now defines @@ -1520,7 +1520,7 @@ well with function arguments. -Changes between 0.9.2 and 1.0.0b1 +v1.0.0b1 ------------------------------------------- * introduced new "funcarg" setup method, @@ -1544,7 +1544,7 @@ XXX lots of things missing here XXX -Changes between 0.9.1 and 0.9.2 +v0.9.2 ------------------------------------------- * refined installation and metadata, created new setup.py, @@ -1577,10 +1577,10 @@ * there now is a py.__version__ attribute -Changes between 0.9.0 and 0.9.1 +v0.9.1 ------------------------------------------- -This is a fairly complete list of changes between 0.9 and 0.9.1, which can +This is a fairly complete list of v0.9.1, which can serve as a reference for developers. * allowing + signs in py.path.svn urls [39106] https://bitbucket.org/hpk42/pytest/commits/f824d4231142/ Changeset: f824d4231142 User: Tobias Bieniek Date: 2013-12-12 19:22:37 Summary: doc: Adjusted TOC sidebar section Affected #: 3 files diff -r c513018cb2b01d20ee6a59c22347fc7a24db0270 -r f824d4231142375cbad7cb235d95a9ac03421b1f doc/en/_templates/globaltoc.html --- /dev/null +++ b/doc/en/_templates/globaltoc.html @@ -0,0 +1,17 @@ +

      {{ _('Table Of Contents') }}

      + + + +{%- if display_toc %} +
      + {{ toc }} +{%- endif %} diff -r c513018cb2b01d20ee6a59c22347fc7a24db0270 -r f824d4231142375cbad7cb235d95a9ac03421b1f doc/en/_templates/localtoc.html --- a/doc/en/_templates/localtoc.html +++ /dev/null @@ -1,26 +0,0 @@ -

      quicklinks

      -
      -
  • - -
    - home - - TOC/contents -
    - install - - changelog -
    - examples - - customize -
    - issues[bb] - - contact -
    - Talks/Posts -
    -
    -{% extends "basic/localtoc.html" %} - diff -r c513018cb2b01d20ee6a59c22347fc7a24db0270 -r f824d4231142375cbad7cb235d95a9ac03421b1f doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -156,12 +156,13 @@ html_sidebars = { 'index': [ 'sidebarintro.html', + 'globaltoc.html', 'links.html', 'sourcelink.html', 'searchbox.html' ], '**': [ - 'localtoc.html', + 'globaltoc.html', 'relations.html', 'links.html', 'sourcelink.html', https://bitbucket.org/hpk42/pytest/commits/f9a0234a95e1/ Changeset: f9a0234a95e1 User: Tobias Bieniek Date: 2013-12-12 19:29:28 Summary: doc: Moved font family attributes into variables Affected #: 1 file diff -r f824d4231142375cbad7cb235d95a9ac03421b1f -r f9a0234a95e167ea1e50b16b7a026a79bd2691b1 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -8,13 +8,15 @@ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} - +{% set base_font = '"Georgia", serif' %} +{% set header_font = '"Garamond", "Georgia", serif' %} + @import url("basic.css"); - + /* -- page layout ----------------------------------------------------------- */ - + body { - font-family: 'Georgia', serif; + font-family: {{ base_font }}; font-size: 17px; background-color: white; color: #000; @@ -43,7 +45,7 @@ hr { border: 1px solid #B1B4B6; } - + div.body { background-color: #ffffff; color: #3E4349; @@ -54,7 +56,7 @@ padding: 0 0 10px 10px; float: right; } - + div.footer { width: {{ page_width }}; margin: 20px auto 30px auto; @@ -70,7 +72,7 @@ div.related { display: none; } - + div.sphinxsidebar a { color: #444; text-decoration: none; @@ -80,7 +82,7 @@ div.sphinxsidebar a:hover { border-bottom: 1px solid #999; } - + div.sphinxsidebar { font-size: 14px; line-height: 1.5; @@ -95,10 +97,10 @@ margin: 0; text-align: center; } - + div.sphinxsidebar h3, div.sphinxsidebar h4 { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; color: #444; font-size: 24px; font-weight: normal; @@ -109,7 +111,7 @@ div.sphinxsidebar h4 { font-size: 20px; } - + div.sphinxsidebar h3 a { color: #444; } @@ -120,7 +122,7 @@ div.sphinxsidebar h3 a:hover { border: none; } - + div.sphinxsidebar p { color: #555; margin: 10px 0; @@ -131,32 +133,32 @@ padding: 0; color: #000; } - + div.sphinxsidebar input { border: 1px solid #ccc; - font-family: 'Georgia', serif; + font-family: {{ base_font }}; font-size: 1em; } - + /* -- body styles ----------------------------------------------------------- */ - + a { color: #004B6B; text-decoration: underline; } - + a:hover { color: #6D4100; text-decoration: underline; } - + div.body h1, div.body h2, div.body h3, div.body h4, div.body h5, div.body h6 { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; font-weight: normal; margin: 30px 0px 10px 0px; padding: 0; @@ -175,18 +177,18 @@ div.body h4 { font-size: 130%; } div.body h5 { font-size: 100%; } div.body h6 { font-size: 100%; } - + a.headerlink { color: #ddd; padding: 0 4px; text-decoration: none; } - + a.headerlink:hover { color: #444; background: #eaeaea; } - + div.body p, div.body dd, div.body li { line-height: 1.4em; } @@ -209,7 +211,7 @@ } div.admonition p.admonition-title { - font-family: 'Garamond', 'Georgia', serif; + font-family: {{ header_font }}; font-weight: normal; font-size: 24px; margin: 0 0 10px 0; @@ -233,20 +235,20 @@ background-color: #eee; border: 1px solid #ccc; } - + div.seealso { background-color: #ffc; border: 1px solid #ff6; } - + div.topic { background-color: #eee; } - + p.admonition-title { display: inline; } - + p.admonition-title:after { content: ":"; } @@ -340,7 +342,7 @@ margin: 10px 0 10px 30px; padding: 0; } - + pre { background: #eee; padding: 7px 30px; @@ -357,7 +359,7 @@ margin-left: -90px; padding-left: 90px; } - + tt { background-color: #ecf0f3; color: #222; @@ -574,4 +576,4 @@ .revsys-inline { display: none!important; -} \ No newline at end of file +} https://bitbucket.org/hpk42/pytest/commits/ac088dcf53b0/ Changeset: ac088dcf53b0 User: Tobias Bieniek Date: 2013-12-12 19:32:38 Summary: doc: Use different font combination Affected #: 2 files diff -r f9a0234a95e167ea1e50b16b7a026a79bd2691b1 -r ac088dcf53b004e6194f0069c07b0f1385620f09 doc/en/_themes/flask/layout.html --- a/doc/en/_themes/flask/layout.html +++ b/doc/en/_themes/flask/layout.html @@ -5,6 +5,7 @@ {% endif %} + {% endblock %} {%- block relbar2 %}{% endblock %} {% block header %} diff -r f9a0234a95e167ea1e50b16b7a026a79bd2691b1 -r ac088dcf53b004e6194f0069c07b0f1385620f09 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -8,8 +8,8 @@ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} -{% set base_font = '"Georgia", serif' %} -{% set header_font = '"Garamond", "Georgia", serif' %} +{% set base_font = '"Gudea", sans-serif' %} +{% set header_font = '"Rancho", serif' %} @import url("basic.css"); https://bitbucket.org/hpk42/pytest/commits/b747ef4bab1d/ Changeset: b747ef4bab1d User: Tobias Bieniek Date: 2013-12-12 19:36:07 Summary: doc: Don't show not existing logo Affected #: 1 file diff -r ac088dcf53b004e6194f0069c07b0f1385620f09 -r b747ef4bab1d8954b6e83e4cedc00384550ea932 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -115,7 +115,9 @@ # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. -html_theme_options = {} +html_theme_options = { + 'index_logo': None +} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] https://bitbucket.org/hpk42/pytest/commits/badd99b3d273/ Changeset: badd99b3d273 User: Tobias Bieniek Date: 2013-12-12 19:41:29 Summary: doc: Moved link colors into variables Affected #: 1 file diff -r b747ef4bab1d8954b6e83e4cedc00384550ea932 -r badd99b3d273ff4835f6bb5e689d17e60e75bbad doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,6 +10,8 @@ {% set sidebar_width = '220px' %} {% set base_font = '"Gudea", sans-serif' %} {% set header_font = '"Rancho", serif' %} +{% set link_color = '#004B6B' %} +{% set link_hover_color = '#6D4100' %} @import url("basic.css"); @@ -43,7 +45,8 @@ } hr { - border: 1px solid #B1B4B6; + border: 0; + border-top: 1px solid #B1B4B6; } div.body { @@ -143,12 +146,12 @@ /* -- body styles ----------------------------------------------------------- */ a { - color: #004B6B; + color: {{ link_color }}; text-decoration: underline; } a:hover { - color: #6D4100; + color: {{ link_hover_color }}; text-decoration: underline; } @@ -373,22 +376,22 @@ a.reference { text-decoration: none; - border-bottom: 1px dotted #004B6B; + border-bottom: 1px dotted {{ link_color }}; } a.reference:hover { - border-bottom: 1px solid #6D4100; + border-bottom: 1px solid {{ link_hover_color }}; } a.footnote-reference { text-decoration: none; font-size: 0.7em; vertical-align: top; - border-bottom: 1px dotted #004B6B; + border-bottom: 1px dotted {{ link_color }}; } a.footnote-reference:hover { - border-bottom: 1px solid #6D4100; + border-bottom: 1px solid {{ link_hover_color }}; } a:hover tt { https://bitbucket.org/hpk42/pytest/commits/7e5284ed2167/ Changeset: 7e5284ed2167 User: Tobias Bieniek Date: 2013-12-12 19:48:13 Summary: doc: Use green color for links Affected #: 1 file diff -r badd99b3d273ff4835f6bb5e689d17e60e75bbad -r 7e5284ed2167e9896e06d0e5a305af7ee720e35b doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,8 +10,8 @@ {% set sidebar_width = '220px' %} {% set base_font = '"Gudea", sans-serif' %} {% set header_font = '"Rancho", serif' %} -{% set link_color = '#004B6B' %} -{% set link_hover_color = '#6D4100' %} +{% set link_color = '#490' %} +{% set link_hover_color = '#9c0' %} @import url("basic.css"); https://bitbucket.org/hpk42/pytest/commits/d6e28333d116/ Changeset: d6e28333d116 User: Tobias Bieniek Date: 2013-12-12 19:48:36 Summary: doc: Don't use italic font for internal references Affected #: 1 file diff -r 7e5284ed2167e9896e06d0e5a305af7ee720e35b -r d6e28333d11650ec89b95635e56e0c167d862cbf doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -155,6 +155,10 @@ text-decoration: underline; } +a.reference.internal em { + font-style: normal; +} + div.body h1, div.body h2, div.body h3, https://bitbucket.org/hpk42/pytest/commits/ed036f5c4bf1/ Changeset: ed036f5c4bf1 User: Tobias Bieniek Date: 2013-12-12 19:48:45 Summary: doc: Removed unused template Affected #: 1 file diff -r d6e28333d11650ec89b95635e56e0c167d862cbf -r ed036f5c4bf10ea019ad12181e78e2ed8837fbd2 doc/en/_templates/indexsidebar.html --- a/doc/en/_templates/indexsidebar.html +++ /dev/null @@ -1,22 +0,0 @@ -

    Download

    -{% if version.endswith('(hg)') %} -

    This documentation is for version {{ version }}, which is - not released yet.

    -

    You can use it from the - Bitbucket Repo or look for - released versions in the Python - Package Index.

    -{% else %} -

    {{ release }} release -[Changelog]

    -

    -pytest/PyPI -

    -
    easy_install pytest
    -
    pip install pytest
    -{% endif %} - -

    Questions? Suggestions?

    - -

    contact channels -

    https://bitbucket.org/hpk42/pytest/commits/007ff2275b99/ Changeset: 007ff2275b99 User: Tobias Bieniek Date: 2013-12-14 15:38:11 Summary: doc: Use native scrollbars on webkit Affected #: 1 file diff -r ed036f5c4bf10ea019ad12181e78e2ed8837fbd2 -r 007ff2275b99ba96a972812ed251a3f057345ef7 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -544,41 +544,6 @@ } } - -/* scrollbars */ - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -::-webkit-scrollbar-button:start:decrement, -::-webkit-scrollbar-button:end:increment { - display: block; - height: 10px; -} - -::-webkit-scrollbar-button:vertical:increment { - background-color: #fff; -} - -::-webkit-scrollbar-track-piece { - background-color: #eee; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:vertical { - height: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - -::-webkit-scrollbar-thumb:horizontal { - width: 50px; - background-color: #ccc; - -webkit-border-radius: 3px; -} - /* misc. */ .revsys-inline { https://bitbucket.org/hpk42/pytest/commits/a7cf7193ecc4/ Changeset: a7cf7193ecc4 User: Tobias Bieniek Date: 2013-12-14 15:43:40 Summary: doc: Fixed small res sidebar font color Affected #: 1 file diff -r 007ff2275b99ba96a972812ed251a3f057345ef7 -r a7cf7193ecc478776e4d7e0e911be0cde8fcc547 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -481,7 +481,7 @@ } div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, - div.sphinxsidebar h3 a { + div.sphinxsidebar h3 a, div.sphinxsidebar ul { color: white; } https://bitbucket.org/hpk42/pytest/commits/05e99cdf58d4/ Changeset: 05e99cdf58d4 User: Tobias Bieniek Date: 2013-12-14 15:45:01 Summary: doc: Moved G+ button Affected #: 2 files diff -r a7cf7193ecc478776e4d7e0e911be0cde8fcc547 -r 05e99cdf58d4a7fa3a2183774deb7cde23ba8a21 doc/en/_templates/layout.html --- a/doc/en/_templates/layout.html +++ b/doc/en/_templates/layout.html @@ -1,13 +1,5 @@ {% extends "!layout.html" %} -{% block relbaritems %} -{{ super() }} - - - - -{% endblock %} - {% block footer %} {{ super() }} -{%- endif %} - -

    quicklinks

    -
    - - -
    - home - - TOC/contents -
    - install - - changelog -
    - examples - - customize -
    - issues[bb] - - contact -
    - Talks/Posts -
    -
    -{% extends "basic/localtoc.html" %} - diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_templates/sidebarintro.html --- /dev/null +++ b/doc/en/_templates/sidebarintro.html @@ -0,0 +1,5 @@ +

    About pytest

    +

    + pytest is a mature full-featured Python testing tool that helps + you write better programs. +

    diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/.gitignore --- /dev/null +++ b/doc/en/_themes/.gitignore @@ -0,0 +1,3 @@ +*.pyc +*.pyo +.DS_Store diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/LICENSE --- /dev/null +++ b/doc/en/_themes/LICENSE @@ -0,0 +1,37 @@ +Copyright (c) 2010 by Armin Ronacher. + +Some rights reserved. + +Redistribution and use in source and binary forms of the theme, with or +without modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +* The names of the contributors may not be used to endorse or + promote products derived from this software without specific + prior written permission. + +We kindly ask you to only use these themes in an unmodified manner just +for Flask and Flask-related products, not for unrelated projects. If you +like the visual style and want to use it for your own projects, please +consider making some larger changes to the themes (such as changing +font faces, sizes, colors or margins). + +THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/README --- /dev/null +++ b/doc/en/_themes/README @@ -0,0 +1,31 @@ +Flask Sphinx Styles +=================== + +This repository contains sphinx styles for Flask and Flask related +projects. To use this style in your Sphinx documentation, follow +this guide: + +1. put this folder as _themes into your docs folder. Alternatively + you can also use git submodules to check out the contents there. +2. add this to your conf.py: + + sys.path.append(os.path.abspath('_themes')) + html_theme_path = ['_themes'] + html_theme = 'flask' + +The following themes exist: + +- 'flask' - the standard flask documentation theme for large + projects +- 'flask_small' - small one-page theme. Intended to be used by + very small addon libraries for flask. + +The following options exist for the flask_small theme: + + [options] + index_logo = '' filename of a picture in _static + to be used as replacement for the + h1 in the index.rst file. + index_logo_height = 120px height of the index logo + github_fork = '' repository name on github for the + "fork me" badge diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/flask/layout.html --- /dev/null +++ b/doc/en/_themes/flask/layout.html @@ -0,0 +1,25 @@ +{%- extends "basic/layout.html" %} +{%- block extrahead %} + {{ super() }} + {% if theme_touch_icon %} + + {% endif %} + + +{% endblock %} +{%- block relbar2 %}{% endblock %} +{% block header %} + {{ super() }} + {% if pagename == 'index' %} +
    + {% endif %} +{% endblock %} +{%- block footer %} + + {% if pagename == 'index' %} +
    + {% endif %} +{%- endblock %} diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/flask/relations.html --- /dev/null +++ b/doc/en/_themes/flask/relations.html @@ -0,0 +1,19 @@ +

    Related Topics

    + diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/flask/static/flasky.css_t --- /dev/null +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -0,0 +1,555 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + +{% set page_width = '940px' %} +{% set sidebar_width = '220px' %} +{% set base_font = '"Gudea", sans-serif' %} +{% set header_font = '"Exo 2", serif' %} +{% set link_color = '#490' %} +{% set link_hover_color = '#9c0' %} + + at import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: {{ base_font }}; + font-size: 17px; + background-color: white; + color: #000; + margin: 0; + padding: 0; +} + +div.document { + width: {{ page_width }}; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 {{ sidebar_width }}; +} + +div.sphinxsidebar { + width: {{ sidebar_width }}; +} + +hr { + border: 0; + border-top: 1px solid #B1B4B6; +} + +div.body { + background-color: #ffffff; + color: #3E4349; + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: {{ page_width }}; + margin: 20px auto 30px auto; + font-size: 14px; + color: #888; + text-align: right; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; + border-bottom: 1px dotted #999; +} + +div.sphinxsidebar a:hover { + border-bottom: 1px solid #999; +} + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: {{ header_font }}; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: {{ base_font }}; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: {{ link_color }}; + text-decoration: underline; +} + +a:hover { + color: {{ link_hover_color }}; + text-decoration: underline; +} + +a.reference.internal em { + font-style: normal; +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: {{ header_font }}; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +{% if theme_index_logo %} +div.indexwrapper h1 { + text-indent: -999999px; + background: url({{ theme_index_logo }}) no-repeat center center; + height: {{ theme_index_logo_height }}; +} +{% else %} +div.indexwrapper div.body h1 { + font-size: 200%; +} +{% endif %} +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: {{ header_font }}; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -30px; + line-height: 1.3em; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; + /* padding: 1px 2px; */ +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; + border-bottom: 1px dotted {{ link_color }}; +} + +a.reference:hover { + border-bottom: 1px solid {{ link_hover_color }}; +} + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted {{ link_color }}; +} + +a.footnote-reference:hover { + border-bottom: 1px solid {{ link_hover_color }}; +} + +a:hover tt { + background: #EEE; +} + + + at media screen and (max-width: 870px) { + + div.sphinxsidebar { + display: none; + } + + div.document { + width: 100%; + + } + + div.documentwrapper { + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + } + + div.bodywrapper { + margin-top: 0; + margin-right: 0; + margin-bottom: 0; + margin-left: 0; + } + + ul { + margin-left: 0; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .bodywrapper { + margin: 0; + } + + .footer { + width: auto; + } + + .github { + display: none; + } + + + +} + + + + at media screen and (max-width: 875px) { + + body { + margin: 0; + padding: 20px 30px; + } + + div.documentwrapper { + float: none; + background: white; + } + + div.sphinxsidebar { + display: block; + float: none; + width: 102.5%; + margin: 50px -30px -20px -30px; + padding: 10px 20px; + background: #333; + color: white; + } + + div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, + div.sphinxsidebar h3 a, div.sphinxsidebar ul { + color: white; + } + + div.sphinxsidebar a { + color: #aaa; + } + + div.sphinxsidebar p.logo { + display: none; + } + + div.document { + width: 100%; + margin: 0; + } + + div.related { + display: block; + margin: 0; + padding: 10px 0 20px 0; + } + + div.related ul, + div.related ul li { + margin: 0; + padding: 0; + } + + div.footer { + display: none; + } + + div.bodywrapper { + margin: 0; + } + + div.body { + min-height: 0; + padding: 0; + } + + .rtd_doc_footer { + display: none; + } + + .document { + width: auto; + } + + .footer { + width: auto; + } + + .footer { + width: auto; + } + + .github { + display: none; + } +} + +/* misc. */ + +.revsys-inline { + display: none!important; +} diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/flask/theme.conf --- /dev/null +++ b/doc/en/_themes/flask/theme.conf @@ -0,0 +1,9 @@ +[theme] +inherit = basic +stylesheet = flasky.css +pygments_style = flask_theme_support.FlaskyStyle + +[options] +index_logo = '' +index_logo_height = 120px +touch_icon = diff -r 459686cc6a7cc249c047fb077f09707a8ff3fec1 -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e doc/en/_themes/flask_theme_support.py --- /dev/null +++ b/doc/en/_themes/flask_theme_support.py @@ -0,0 +1,86 @@ +# flasky extensions. flasky pygments style based on tango style +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Punctuation, Other, Literal + + +class FlaskyStyle(Style): + background_color = "#f8f8f8" + default_style = "" + + styles = { + # No corresponding class for the following: + #Text: "", # class: '' + Whitespace: "underline #f8f8f8", # class: 'w' + Error: "#a40000 border:#ef2929", # class: 'err' + Other: "#000000", # class 'x' + + Comment: "italic #8f5902", # class: 'c' + Comment.Preproc: "noitalic", # class: 'cp' + + Keyword: "bold #004461", # class: 'k' + Keyword.Constant: "bold #004461", # class: 'kc' + Keyword.Declaration: "bold #004461", # class: 'kd' + Keyword.Namespace: "bold #004461", # class: 'kn' + Keyword.Pseudo: "bold #004461", # class: 'kp' + Keyword.Reserved: "bold #004461", # class: 'kr' + Keyword.Type: "bold #004461", # class: 'kt' + + Operator: "#582800", # class: 'o' + Operator.Word: "bold #004461", # class: 'ow' - like keywords + + Punctuation: "bold #000000", # class: 'p' + + # because special names such as Name.Class, Name.Function, etc. + # are not recognized as such later in the parsing, we choose them + # to look the same as ordinary variables. + Name: "#000000", # class: 'n' + Name.Attribute: "#c4a000", # class: 'na' - to be revised + Name.Builtin: "#004461", # class: 'nb' + Name.Builtin.Pseudo: "#3465a4", # class: 'bp' + Name.Class: "#000000", # class: 'nc' - to be revised + Name.Constant: "#000000", # class: 'no' - to be revised + Name.Decorator: "#888", # class: 'nd' - to be revised + Name.Entity: "#ce5c00", # class: 'ni' + Name.Exception: "bold #cc0000", # class: 'ne' + Name.Function: "#000000", # class: 'nf' + Name.Property: "#000000", # class: 'py' + Name.Label: "#f57900", # class: 'nl' + Name.Namespace: "#000000", # class: 'nn' - to be revised + Name.Other: "#000000", # class: 'nx' + Name.Tag: "bold #004461", # class: 'nt' - like a keyword + Name.Variable: "#000000", # class: 'nv' - to be revised + Name.Variable.Class: "#000000", # class: 'vc' - to be revised + Name.Variable.Global: "#000000", # class: 'vg' - to be revised + Name.Variable.Instance: "#000000", # class: 'vi' - to be revised + + Number: "#990000", # class: 'm' + + Literal: "#000000", # class: 'l' + Literal.Date: "#000000", # class: 'ld' + + String: "#4e9a06", # class: 's' + String.Backtick: "#4e9a06", # class: 'sb' + String.Char: "#4e9a06", # class: 'sc' + String.Doc: "italic #8f5902", # class: 'sd' - like a comment + String.Double: "#4e9a06", # class: 's2' + String.Escape: "#4e9a06", # class: 'se' + String.Heredoc: "#4e9a06", # class: 'sh' + String.Interpol: "#4e9a06", # class: 'si' + String.Other: "#4e9a06", # class: 'sx' + String.Regex: "#4e9a06", # class: 'sr' + String.Single: "#4e9a06", # class: 's1' + String.Symbol: "#4e9a06", # class: 'ss' + + Generic: "#000000", # class: 'g' + Generic.Deleted: "#a40000", # class: 'gd' + Generic.Emph: "italic #000000", # class: 'ge' + Generic.Error: "#ef2929", # class: 'gr' + Generic.Heading: "bold #000080", # class: 'gh' + Generic.Inserted: "#00A000", # class: 'gi' + Generic.Output: "#888", # class: 'go' + Generic.Prompt: "#745334", # class: 'gp' + Generic.Strong: "bold #000000", # class: 'gs' + Generic.Subheading: "bold #800080", # class: 'gu' + Generic.Traceback: "bold #a40000", # class: 'gt' + } This diff is so big that we needed to truncate the remainder. 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 Dec 17 10:52:17 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 09:52:17 -0000 Subject: [Pytest-commit] commit/pytest: 6 new changesets Message-ID: <20131217095217.30981.50066@app01.ash-private.bitbucket.org> 6 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/fb3f51899ab4/ Changeset: fb3f51899ab4 User: hpk42 Date: 2013-12-17 07:58:49 Summary: adding a release announcement and some doc fixes Affected #: 7 files diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ -Unreleased +2.5.1 ----------------------------------- +- merge new documentation styling PR from Tobias Bieniek. + - fix issue403: allow parametrize of multiple same-name functions within a collection node. Thanks Andreas Kloeckner and Alex Gaynor for reporting and analysis. @@ -16,6 +18,7 @@ optparse. Thanks Daniel D. Wright. + 2.5.0 ----------------------------------- diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -3,7 +3,7 @@
  • The pytest Website
  • pytest @ PyPI
  • pytest @ Bitbucket
  • -
  • Issue Tracker
  • +
  • Issue Tracker
  • PDF Documentation diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/announce/index.txt --- a/doc/en/announce/index.txt +++ b/doc/en/announce/index.txt @@ -5,6 +5,7 @@ .. toctree:: :maxdepth: 2 + release-2.5.1 release-2.5.0 release-2.4.2 release-2.4.1 diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/announce/release-2.5.1.txt --- /dev/null +++ b/doc/en/announce/release-2.5.1.txt @@ -0,0 +1,45 @@ +pytest-2.5.1: fixes and new home page styling +=========================================================================== + +pytest-2.5.1, a mature testing tool with more than a 1000 tests +against itself, maintains the "zero-reported-bugs" promise by fixing +the three bugs reported since the last release a few days ago. It also +features a new home page styling implemented by Tobias Bieniek, based on +original work from Armin Ronacher. Check it out: + + http://pytest.org + +If you have anything more to improve styling and docs, +we'd be very happy to merge further pull requests. + +On the coding side, the release also contains a little enhancement to +fixture decorators allowing to directly influence generation of test +ids, thanks to Floris Bruynooghe. Other thanks for helping with +this release also go to Anatoly Bubenkoff and Ronny Pfannschmidt. + +As usual, you can upgrade from pypi via:: + + pip install -U pytest + +have fun and a nice remaining time of the year! +holger krekel + +2.5.1 +----------------------------------- + +- merge new documentation styling PR from Tobias Bieniek. + +- fix issue403: allow parametrize of multiple same-name functions within + a collection node. Thanks Andreas Kloeckner and Alex Gaynor for reporting + and analysis. + +- Allow parameterized fixtures to specify the ID of the parameters by + adding an ids argument to pytest.fixture() and pytest.yield_fixture(). + Thanks Floris Bruynooghe. + +- fix issue404 by always using the binary xml escape in the junitxml + plugin. Thanks Ronny Pfannschmidt. + +- fix issue407: fix addoption docstring to point to argparse instead of + optparse. Thanks Daniel D. Wright. + diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -626,6 +626,7 @@ usefixtures = cleandir +.. _`autouse`: .. _`autouse fixtures`: autouse fixtures (xUnit setup on steroids) diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/goodpractises.txt --- a/doc/en/goodpractises.txt +++ b/doc/en/goodpractises.txt @@ -69,7 +69,7 @@ - **avoid "__init__.py" files in your test directories**. This way your tests can run easily against an installed version - of ``mypkg``, independently from if the installed version contains + of ``mypkg``, independently from if the installed package contains the tests or not. - With inlined tests you might put ``__init__.py`` into test @@ -96,16 +96,14 @@ .. note:: You can use Python3 namespace packages (PEP420) for your application - but pytest will still perform `package name`_ discovery based on the - presence of ``__init__.py`` files. If you use one of the above - two recommended file system layouts but leave away the ``__init__.py`` - files it should just work on Python3.3 and above. When using + but pytest will still perform `test package name`_ discovery based on the + presence of ``__init__.py`` files. If you use one of the + two recommended file system layouts above but leave away the ``__init__.py`` + files from your directories it should just work on Python3.3 and above. From "inlined tests", however, you will need to use absolute imports for - getting at your application code because the test modules will be - imported directly, without any application context. The latter allows - your tests to run against an installed version of your package. + getting at your application code. -.. _`package name`: +.. _`test package name`: .. note:: diff -r eb1152c7f93ce62af0c50f35fc047216ad7b9b6e -r fb3f51899ab4c5e21687fbba0224931c929352cd doc/en/index.txt --- a/doc/en/index.txt +++ b/doc/en/index.txt @@ -9,44 +9,43 @@ **a mature full-featured Python testing tool** - runs on Posix/Windows, Python 2.5-3.3, PyPy and Jython-2.5.1 + - **zero-reported-bugs** policy with >1000 tests against itself + - **strict backward compatibility policy** for safe pytest upgrades - :ref:`comprehensive online ` and `PDF documentation `_ - - many :ref:`third party plugins ` and - :ref:`builtin helpers ` - - used in :ref:`many projects and organisations `, in test - suites with up to twenty thousand tests - - strict policy of remaining backward compatible across releases + - many :ref:`third party plugins `, + :ref:`builtin helpers `, + - used in :ref:`many small and large projects and organisations ` - comes with many :ref:`tested examples ` **provides easy no-boilerplate testing** - makes it :ref:`easy to get started `, - many :ref:`usage options ` + has many :ref:`usage options ` - :ref:`assert with the assert statement` - helpful :ref:`traceback and failing assertion reporting ` - - allows :ref:`print debugging ` and :ref:`the + - :ref:`print debugging ` and :ref:`the capturing of standard output during test execution ` **scales from simple unit to complex functional testing** - :ref:`modular parametrizeable fixtures ` (new in 2.3, - improved in 2.4) + continously improved) - :ref:`parametrized test functions ` - :ref:`mark` - :ref:`skipping` (improved in 2.4) - - can :ref:`distribute tests to multiple CPUs ` through :ref:`xdist plugin ` - - can :ref:`continuously re-run failing tests ` + - :ref:`distribute tests to multiple CPUs ` through :ref:`xdist plugin ` + - :ref:`continuously re-run failing tests ` - flexible :ref:`Python test discovery` -**integrates many common testing methods**: +**integrates with other testing methods and tools**: - - multi-paradigm: pytest can run many ``nose``, ``unittest.py`` and - ``doctest.py`` style test suites, including running testcases made for + - multi-paradigm: pytest can run ``nose``, ``unittest`` and + ``doctest`` style test suites, including running testcases made for Django and trial - supports :ref:`good integration practises ` - supports extended :ref:`xUnit style setup ` - supports domain-specific :ref:`non-python tests` - supports the generation of testing coverage reports - - `Javascript unit- and functional testing`_ - supports :pep:`8` compliant coding styles in tests **extensive plugin and customization system**: @@ -56,8 +55,6 @@ - it is easy to add command line options or customize existing behaviour -.. _`Javascript unit- and functional testing`: http://pypi.python.org/pypi/oejskit - .. _`easy`: http://bruynooghe.blogspot.com/2009/12/skipping-slow-test-by-default-in-pytest.html https://bitbucket.org/hpk42/pytest/commits/0fc89a5b7788/ Changeset: 0fc89a5b7788 User: hpk42 Date: 2013-12-17 08:30:35 Summary: regen docs for 2.5.1, add links for coverage reports Affected #: 19 files diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_assert1.py F @@ -116,7 +116,7 @@ $ py.test test_assert2.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_assert2.py F diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py .F @@ -78,7 +78,7 @@ test_module.py:9: AssertionError ----------------------------- Captured stdout ------------------------------ - setting up + setting up ==================== 1 failed, 1 passed in 0.01 seconds ==================== Accessing captured output from a test function diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -17,8 +17,8 @@ # # The full version, including alpha/beta/rc tags. # The short X.Y version. -version = "2.5.0" -release = "2.5.0" +version = "2.5.1" +release = "2.5.1" import sys, os diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/doctest.txt --- a/doc/en/doctest.txt +++ b/doc/en/doctest.txt @@ -44,7 +44,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items mymodule.py . diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/example/markers.txt --- a/doc/en/example/markers.txt +++ b/doc/en/example/markers.txt @@ -28,7 +28,7 @@ $ py.test -v -m webtest =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -40,7 +40,7 @@ $ py.test -v -m "not webtest" =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:6: test_something_quick PASSED @@ -61,7 +61,7 @@ $ py.test -v -k http # running with the above defined example module =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -73,7 +73,7 @@ $ py.test -k "not send_http" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:6: test_something_quick PASSED @@ -86,7 +86,7 @@ $ py.test -k "http or quick" -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 3 items test_server.py:3: test_send_http PASSED @@ -266,7 +266,7 @@ $ py.test -E stage2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_someenv.py s @@ -277,7 +277,7 @@ $ py.test -E stage1 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_someenv.py . @@ -395,12 +395,12 @@ $ py.test -rs # this option reports skip reasons =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items test_plat.py s.s. ========================= short test summary info ========================== - SKIP [2] /tmp/doc-exec-62/conftest.py:12: cannot run on platform linux2 + SKIP [2] /tmp/doc-exec-63/conftest.py:12: cannot run on platform linux2 =================== 2 passed, 2 skipped in 0.01 seconds ==================== @@ -408,7 +408,7 @@ $ py.test -m linux2 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items test_plat.py . @@ -459,7 +459,7 @@ $ py.test -m interface --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items test_module.py FF @@ -480,7 +480,7 @@ $ py.test -m "interface or event" --tb=short =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items test_module.py FFF diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_simple.yml .F @@ -56,7 +56,7 @@ nonpython $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 2 items test_simple.yml:1: usecase: ok PASSED @@ -74,10 +74,10 @@ nonpython $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items - ============================= in 0.03 seconds ============================= + ============================= in 0.02 seconds ============================= diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items @@ -182,7 +182,7 @@ $ py.test test_backends.py --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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 @@ -282,7 +282,7 @@ ............sss............sss............sss............ssssssssssssssssss ========================= short test summary info ========================== SKIP [27] /home/hpk/p/pytest/doc/en/example/multipython.py:21: 'python2.8' not found - 48 passed, 27 skipped in 1.41 seconds + 48 passed, 27 skipped in 1.34 seconds Indirect parametrization of optional implementations/imports -------------------------------------------------------------------- @@ -329,12 +329,12 @@ $ py.test -rs test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-64/conftest.py:10: could not import 'opt2' + SKIP [1] /tmp/doc-exec-65/conftest.py:10: could not import 'opt2' =================== 1 passed, 1 skipped in 0.01 seconds ==================== diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items @@ -88,7 +88,7 @@ . $ py.test --collect-only pythoncollection.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 3 items @@ -141,7 +141,7 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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 = () + E + and 43 = () 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 = () 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 = .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 = .b + E + where = () failure_demo.py:107: AssertionError __________________________ test_attribute_failure __________________________ @@ -319,7 +319,7 @@ failure_demo.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - self = + self = 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 = .b + E + where = () + E + and 2 = .b + E + where = () 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:976>:1: ValueError + <0-codegen /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:983>: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,7 +398,7 @@ l is [1, 2, 3] ________________________ TestRaises.test_some_error ________________________ - self = + self = def test_some_error(self): > if namenotexi: @@ -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(): @@ -455,7 +455,7 @@ failure_demo.py:5: AssertionError ___________________ TestMoreErrors.test_z1_unpack_error ____________________ - self = + self = def test_z1_unpack_error(self): l = [] @@ -465,7 +465,7 @@ failure_demo.py:179: ValueError ____________________ TestMoreErrors.test_z2_type_error _____________________ - self = + self = def test_z2_type_error(self): l = 3 @@ -475,19 +475,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(): @@ -495,15 +495,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' = () + E + and '456' = () failure_demo.py:195: AssertionError _____________________ TestMoreErrors.test_global_func ______________________ - self = + self = def test_global_func(self): > assert isinstance(globf(42), float) @@ -513,18 +513,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 @@ -534,7 +534,7 @@ failure_demo.py:205: AssertionError _____________________ TestMoreErrors.test_try_finally ______________________ - self = + self = def test_try_finally(self): x = 1 @@ -543,4 +543,4 @@ E assert 1 == 0 failure_demo.py:210: AssertionError - ======================== 39 failed in 0.23 seconds ========================= + ======================== 39 failed in 0.20 seconds ========================= diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-67/conftest.py:9: need --runslow option to run + SKIP [1] /tmp/doc-exec-68/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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py .. @@ -256,7 +256,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 project deps: mylib-1.1 collected 0 items @@ -279,7 +279,7 @@ $ py.test -v =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 0 items ============================= in 0.00 seconds ============================= @@ -322,7 +322,7 @@ $ py.test --durations=3 =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 3 items test_some_are_slow.py ... @@ -383,7 +383,7 @@ $ py.test -rx =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 4 items test_step.py .Fx. @@ -391,7 +391,7 @@ ================================= FAILURES ================================= ____________________ TestUserHandling.test_modification ____________________ - self = + self = def test_modification(self): > assert 0 @@ -401,7 +401,7 @@ ========================= short test summary info ========================== XFAIL test_step.py::TestUserHandling::()::test_deletion reason: previous test failed (test_modification) - ============== 1 failed, 2 passed, 1 xfailed in 0.02 seconds =============== + ============== 1 failed, 2 passed, 1 xfailed in 0.01 seconds =============== We'll see that ``test_deletion`` was not executed because ``test_modification`` failed. It is reported as an "expected failure". @@ -453,7 +453,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 7 items test_step.py .Fx. @@ -463,17 +463,17 @@ ================================== ERRORS ================================== _______________________ ERROR at setup of test_root ________________________ - file /tmp/doc-exec-67/b/test_error.py, line 1 + file /tmp/doc-exec-68/b/test_error.py, line 1 def test_root(db): # no db here, will error out fixture 'db' not found - available fixtures: monkeypatch, capsys, tmpdir, capfd, pytestconfig, recwarn + available fixtures: recwarn, capfd, pytestconfig, capsys, tmpdir, monkeypatch use 'py.test --fixtures [testpath]' for help on them. - /tmp/doc-exec-67/b/test_error.py:1 + /tmp/doc-exec-68/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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py FF @@ -561,7 +561,7 @@ ================================= FAILURES ================================= ________________________________ test_fail1 ________________________________ - tmpdir = local('/tmp/pytest-281/test_fail10') + tmpdir = local('/tmp/pytest-42/test_fail10') def test_fail1(tmpdir): > assert 0 @@ -575,12 +575,12 @@ E assert 0 test_module.py:4: AssertionError - ========================= 2 failed in 0.02 seconds ========================= + ========================= 2 failed in 0.01 seconds ========================= you will have a "failures" file which contains the failing test ids:: $ cat failures - test_module.py::test_fail1 (/tmp/pytest-281/test_fail10) + test_module.py::test_fail1 (/tmp/pytest-42/test_fail10) test_module.py::test_fail2 Making test result information available in fixtures @@ -643,7 +643,7 @@ $ py.test -s test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 3 items test_module.py Esetting up a test failed! test_module.py::test_setup_fails diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/example/special.txt --- a/doc/en/example/special.txt +++ b/doc/en/example/special.txt @@ -70,4 +70,4 @@ .test other .test_unit1 method called . - 4 passed in 0.02 seconds + 4 passed in 0.01 seconds diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_smtpsimple.py F @@ -84,7 +84,7 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response, msg = smtp.ehlo() @@ -194,7 +194,7 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 2 items test_module.py FF @@ -202,7 +202,7 @@ ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -214,7 +214,7 @@ test_module.py:6: AssertionError ________________________________ test_noop _________________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -223,7 +223,7 @@ E assert 0 test_module.py:11: AssertionError - ========================= 2 failed in 0.19 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 @@ -271,7 +271,7 @@ $ py.test -s -q --tb=no FFteardown smtp - 2 failed in 0.24 seconds + 2 failed in 0.17 seconds We see that the ``smtp`` instance is finalized after the two tests finished execution. Note that if we decorated our fixture @@ -312,7 +312,7 @@ $ py.test -s -q --tb=no FF - 2 failed in 0.23 seconds + 2 failed in 0.21 seconds Let's quickly create another test module that actually sets the server URL in its module namespace:: @@ -379,7 +379,7 @@ ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -391,7 +391,7 @@ test_module.py:6: AssertionError __________________________ test_noop[merlinux.eu] __________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -402,7 +402,7 @@ test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - smtp = + smtp = def test_ehlo(smtp): response = smtp.ehlo() @@ -412,10 +412,10 @@ test_module.py:5: AssertionError ----------------------------- Captured stdout ------------------------------ - finalizing + finalizing ________________________ test_noop[mail.python.org] ________________________ - smtp = + smtp = def test_noop(smtp): response = smtp.noop() @@ -424,7 +424,7 @@ E assert 0 test_module.py:11: AssertionError - 4 failed in 6.30 seconds + 4 failed in 6.58 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 +464,13 @@ $ py.test -v test_appsetup.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 2 items test_appsetup.py:12: test_smtp_exists[merlinux.eu] PASSED test_appsetup.py:12: test_smtp_exists[mail.python.org] PASSED - ========================= 2 passed in 5.63 seconds ========================= + ========================= 2 passed in 5.95 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,7 +528,7 @@ $ py.test -v -s test_module.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 -- /home/hpk/p/pytest/.tox/regen/bin/python + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/hpk/p/pytest/.tox/regen/bin/python collecting ... collected 8 items test_module.py:15: test_0[1] test0 1 diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/getting-started.txt --- a/doc/en/getting-started.txt +++ b/doc/en/getting-started.txt @@ -23,7 +23,7 @@ To check your installation has installed the correct version:: $ py.test --version - This is py.test version 2.5.0, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc + This is py.test version 2.5.1, imported from /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/pytest.pyc If you get an error checkout :ref:`installation issues`. @@ -45,7 +45,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_sample.py F @@ -93,7 +93,7 @@ $ py.test -q test_sysexit.py . - 1 passed in 0.01 seconds + 1 passed in 0.00 seconds .. todo:: For further ways to assert exceptions see the `raises` @@ -123,7 +123,7 @@ ================================= FAILURES ================================= ____________________________ TestClass.test_two ____________________________ - self = + self = def test_two(self): x = "hello" @@ -159,7 +159,7 @@ ================================= FAILURES ================================= _____________________________ test_needsfiles ______________________________ - tmpdir = local('/tmp/pytest-277/test_needsfiles0') + tmpdir = local('/tmp/pytest-38/test_needsfiles0') def test_needsfiles(tmpdir): print tmpdir @@ -168,8 +168,8 @@ test_tmpdir.py:3: AssertionError ----------------------------- Captured stdout ------------------------------ - /tmp/pytest-277/test_needsfiles0 - 1 failed in 0.01 seconds + /tmp/pytest-38/test_needsfiles0 + 1 failed in 0.04 seconds Before the test runs, a unique-per-test-invocation temporary directory was created. More info at :ref:`tmpdir handling`. diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/index.txt --- a/doc/en/index.txt +++ b/doc/en/index.txt @@ -12,8 +12,7 @@ - **zero-reported-bugs** policy with >1000 tests against itself - **strict backward compatibility policy** for safe pytest upgrades - :ref:`comprehensive online ` and `PDF documentation `_ - - many :ref:`third party plugins `, - :ref:`builtin helpers `, + - many :ref:`third party plugins ` and :ref:`builtin helpers `, - used in :ref:`many small and large projects and organisations ` - comes with many :ref:`tested examples ` @@ -45,7 +44,8 @@ - supports :ref:`good integration practises ` - supports extended :ref:`xUnit style setup ` - supports domain-specific :ref:`non-python tests` - - supports the generation of testing coverage reports + - supports generating `test coverage reports + `_ - supports :pep:`8` compliant coding styles in tests **extensive plugin and customization system**: diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 3 items test_expectation.py ..F @@ -100,7 +100,7 @@ $ py.test =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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:1087: got empty parameter set, function test_valid_string at /tmp/doc-exec-24/test_strings.py:1 + SKIP [1] /home/hpk/p/pytest/.tox/regen/local/lib/python2.7/site-packages/_pytest/python.py:1094: got empty parameter set, function test_valid_string at /tmp/doc-exec-24/test_strings.py:1 1 skipped in 0.01 seconds For further examples, you might want to look at :ref:`more diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/skipping.txt --- a/doc/en/skipping.txt +++ b/doc/en/skipping.txt @@ -159,7 +159,7 @@ example $ py.test -rx xfail_demo.py =========================== test session starts ============================ - platform linux2 -- Python 2.7.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 6 items xfail_demo.py xxxxxx @@ -176,7 +176,7 @@ XFAIL xfail_demo.py::test_hello6 reason: reason - ======================== 6 xfailed in 0.06 seconds ========================= + ======================== 6 xfailed in 0.04 seconds ========================= .. _`skip/xfail with parametrize`: diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.1 collected 1 items test_tmpdir.py F @@ -37,7 +37,7 @@ ================================= FAILURES ================================= _____________________________ test_create_file _____________________________ - tmpdir = local('/tmp/pytest-278/test_create_file0') + tmpdir = local('/tmp/pytest-39/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.02 seconds ========================= + ========================= 1 failed in 0.01 seconds ========================= .. _`base temporary directory`: diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 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.3 -- pytest-2.5.0 + platform linux2 -- Python 2.7.3 -- pytest-2.5.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: 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: test_unittest_db.py:12: AssertionError - ========================= 2 failed in 0.02 seconds ========================= + ========================= 2 failed in 0.01 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.02 seconds + 1 passed in 0.01 seconds ... gives us one passed test because the ``initdir`` fixture function was executed ahead of the ``test_method``. diff -r fb3f51899ab4c5e21687fbba0224931c929352cd -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 doc/en/yieldfixture.txt --- a/doc/en/yieldfixture.txt +++ b/doc/en/yieldfixture.txt @@ -52,7 +52,7 @@ test called .teardown after yield - 1 passed in 0.01 seconds + 1 passed in 0.00 seconds We can also seemlessly use the new syntax with ``with`` statements. Let's simplify the above ``passwd`` fixture:: https://bitbucket.org/hpk42/pytest/commits/c82fe9a33cbe/ Changeset: c82fe9a33cbe User: hpk42 Date: 2013-12-17 08:43:01 Summary: last change to release announce Affected #: 1 file diff -r 0fc89a5b77889a75a58709077d2a7e9b8490a145 -r c82fe9a33cbeb1432342cd313e545060e43c592b doc/en/announce/release-2.5.1.txt --- a/doc/en/announce/release-2.5.1.txt +++ b/doc/en/announce/release-2.5.1.txt @@ -1,11 +1,13 @@ pytest-2.5.1: fixes and new home page styling =========================================================================== -pytest-2.5.1, a mature testing tool with more than a 1000 tests -against itself, maintains the "zero-reported-bugs" promise by fixing -the three bugs reported since the last release a few days ago. It also +pytest is a mature Python testing tool with more than a 1000 tests +against itself, passing on many different interpreters and platforms. + +The 2.5.1 release maintains the "zero-reported-bugs" promise by fixing +the three bugs reported since the last release a few days ago. It also features a new home page styling implemented by Tobias Bieniek, based on -original work from Armin Ronacher. Check it out: +the flask theme from Armin Ronacher: http://pytest.org @@ -15,13 +17,13 @@ On the coding side, the release also contains a little enhancement to fixture decorators allowing to directly influence generation of test ids, thanks to Floris Bruynooghe. Other thanks for helping with -this release also go to Anatoly Bubenkoff and Ronny Pfannschmidt. +this release go to Anatoly Bubenkoff and Ronny Pfannschmidt. As usual, you can upgrade from pypi via:: pip install -U pytest -have fun and a nice remaining time of the year! +have fun and a nice remaining "bug-free" time of the year :) holger krekel 2.5.1 https://bitbucket.org/hpk42/pytest/commits/53b252dcad06/ Changeset: 53b252dcad06 User: hpk42 Date: 2013-12-17 08:56:59 Summary: use gudea/gudea as header/body fonts Affected #: 2 files diff -r c82fe9a33cbeb1432342cd313e545060e43c592b -r 53b252dcad06836ff05c88cfd8f7e25b5a60f7e8 doc/en/_themes/flask/layout.html --- a/doc/en/_themes/flask/layout.html +++ b/doc/en/_themes/flask/layout.html @@ -5,7 +5,7 @@ {% endif %} - + {% endblock %} {%- block relbar2 %}{% endblock %} {% block header %} diff -r c82fe9a33cbeb1432342cd313e545060e43c592b -r 53b252dcad06836ff05c88cfd8f7e25b5a60f7e8 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -9,7 +9,7 @@ {% set page_width = '940px' %} {% set sidebar_width = '220px' %} {% set base_font = '"Gudea", sans-serif' %} -{% set header_font = '"Exo 2", serif' %} +{% set header_font = '"Gudea", sans-serif' %} {% set link_color = '#490' %} {% set link_hover_color = '#9c0' %} https://bitbucket.org/hpk42/pytest/commits/039d543d1ca0/ Changeset: 039d543d1ca0 User: hpk42 Date: 2013-12-17 08:59:50 Summary: fix links and add github link Affected #: 1 file diff -r 53b252dcad06836ff05c88cfd8f7e25b5a60f7e8 -r 039d543d1ca02a716c0b0de9a7131beb8021e8a2 doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -3,7 +3,8 @@
  • The pytest Website
  • pytest @ PyPI
  • pytest @ Bitbucket
  • -
  • Issue Tracker
  • +
  • pytest @ github
  • +
  • Issue Tracker
  • PDF Documentation https://bitbucket.org/hpk42/pytest/commits/62af565e1bd7/ Changeset: 62af565e1bd7 User: hpk42 Date: 2013-12-17 10:52:03 Summary: Added tag 2.5.1 for changeset 039d543d1ca0 Affected #: 1 file diff -r 039d543d1ca02a716c0b0de9a7131beb8021e8a2 -r 62af565e1bd7a6637c2baff137f9546f4886ab37 .hgtags --- a/.hgtags +++ b/.hgtags @@ -64,3 +64,4 @@ 8828c924acae0b4cad2e2cb92943d51da7cb744a 2.4.1 8d051f89184bfa3033f5e59819dff9f32a612941 2.4.2 a064ad64d167508a8e9e73766b1a4e6bd10c85db 2.5.0 +039d543d1ca02a716c0b0de9a7131beb8021e8a2 2.5.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 Tue Dec 17 11:25:17 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 10:25:17 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: a few minor fixes and removing google+ stuff. Message-ID: <20131217102517.32634.99811@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/f9b6dcb18762/ Changeset: f9b6dcb18762 User: hpk42 Date: 2013-12-17 11:24:58 Summary: a few minor fixes and removing google+ stuff. Affected #: 3 files diff -r 62af565e1bd7a6637c2baff137f9546f4886ab37 -r f9b6dcb187626d9bdf2ee0a37a26fa0aa927661a doc/en/_templates/layout.html --- a/doc/en/_templates/layout.html +++ b/doc/en/_templates/layout.html @@ -15,5 +15,4 @@ })(); - {% endblock %} diff -r 62af565e1bd7a6637c2baff137f9546f4886ab37 -r f9b6dcb187626d9bdf2ee0a37a26fa0aa927661a doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -8,4 +8,3 @@
  • PDF Documentation - diff -r 62af565e1bd7a6637c2baff137f9546f4886ab37 -r f9b6dcb187626d9bdf2ee0a37a26fa0aa927661a doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -54,7 +54,7 @@ # General information about the project. project = u'pytest' -copyright = u'2012, holger krekel' +copyright = u'2013, holger krekel' @@ -220,7 +220,7 @@ # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('contents', 'pytest.tex', u'pytest Documentation', - u'holger krekel, http://merlinux.eu', 'manual'), + u'holger krekel, trainer and consultant, http://merlinux.eu', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -262,7 +262,7 @@ epub_title = u'pytest' epub_author = u'holger krekel at merlinux eu' epub_publisher = u'holger krekel at merlinux eu' -epub_copyright = u'2012, holger krekel et alii' +epub_copyright = u'2013, holger krekel et alii' # The language of the text. It defaults to the language option # or en if the language is not set. 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 Dec 17 13:21:58 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 12:21:58 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: don't use guidea as font as it appears to give troubles to windows/chrome Message-ID: <20131217122158.20265.61536@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/103fe1ed6748/ Changeset: 103fe1ed6748 User: hpk42 Date: 2013-12-17 13:21:39 Summary: don't use guidea as font as it appears to give troubles to windows/chrome users, see also here: http://stackoverflow.com/questions/11487427/is-there-any-font-smoothing-in-google-chrome Affected #: 1 file diff -r f9b6dcb187626d9bdf2ee0a37a26fa0aa927661a -r 103fe1ed674834703843a94a53e56d376b1a734a doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -6,10 +6,8 @@ * :license: Flask Design License, see LICENSE for details. */ -{% set page_width = '940px' %} +{% set page_width = '1020px' %} {% set sidebar_width = '220px' %} -{% set base_font = '"Gudea", sans-serif' %} -{% set header_font = '"Gudea", sans-serif' %} {% set link_color = '#490' %} {% set link_hover_color = '#9c0' %} 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 Dec 17 13:49:12 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 12:49:12 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: change to the non-serif version of "Deja Vu" Message-ID: <20131217124912.20174.97396@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/fc08c2547438/ Changeset: fc08c2547438 User: hpk42 Date: 2013-12-17 13:48:59 Summary: change to the non-serif version of "Deja Vu" Affected #: 1 file diff -r 103fe1ed674834703843a94a53e56d376b1a734a -r fc08c254743805a3b8aca42945e5096712dae1fc doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,6 +10,7 @@ {% set sidebar_width = '220px' %} {% set link_color = '#490' %} {% set link_hover_color = '#9c0' %} +{% set base_font = '"Deja+Vu", sans-serif' %} @import url("basic.css"); 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 Dec 17 14:59:54 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 13:59:54 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: just use "sans-serif" as the default font, thankfully recommended by hynek. Message-ID: <20131217135954.8022.19395@app13.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/361f53fc4252/ Changeset: 361f53fc4252 User: hpk42 Date: 2013-12-17 14:59:29 Summary: just use "sans-serif" as the default font, thankfully recommended by hynek. Affected #: 2 files diff -r fc08c254743805a3b8aca42945e5096712dae1fc -r 361f53fc4252d7f41ee19215f036aaa817460732 doc/en/_themes/flask/layout.html --- a/doc/en/_themes/flask/layout.html +++ b/doc/en/_themes/flask/layout.html @@ -5,7 +5,6 @@ {% endif %} - {% endblock %} {%- block relbar2 %}{% endblock %} {% block header %} diff -r fc08c254743805a3b8aca42945e5096712dae1fc -r 361f53fc4252d7f41ee19215f036aaa817460732 doc/en/_themes/flask/static/flasky.css_t --- a/doc/en/_themes/flask/static/flasky.css_t +++ b/doc/en/_themes/flask/static/flasky.css_t @@ -10,7 +10,8 @@ {% set sidebar_width = '220px' %} {% set link_color = '#490' %} {% set link_hover_color = '#9c0' %} -{% set base_font = '"Deja+Vu", sans-serif' %} +{% set base_font = 'sans-serif' %} +{% set header_font = 'sans-serif' %} @import url("basic.css"); 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 Dec 18 00:54:18 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 17 Dec 2013 23:54:18 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20131217235418.25869.79519@app18.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/5840f22714e0/ Changeset: 5840f22714e0 User: nicoddemus Date: 2013-12-17 22:14:57 Summary: Fixed test_plugins_index to work on python 2.6 - Expected and obtained modules now use .rst to avoid being picked as doctests - Fixed test_plugins_index.expected to use the real py.test version Affected #: 4 files diff -r 361f53fc4252d7f41ee19215f036aaa817460732 -r 5840f22714e0e8f6a8441cf5215fc84682044b28 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -61,7 +61,7 @@ ColumnData = namedtuple('ColumnData', 'text link') headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', 'Summary'] pytest_version = pytest.__version__ - print '*** pytest-{} ***'.format(pytest_version) + print '*** pytest-{0} ***'.format(pytest_version) plugins = list(plugins) for index, (package_name, version) in enumerate(plugins): print package_name, version, '...', @@ -127,13 +127,13 @@ # table print >> f, get_row_limiter('=') for i, header in enumerate(headers): - print >> f, '{:^{fill}}'.format(header, fill=column_lengths[i]), + print >> f, '{0:^{fill}}'.format(header, fill=column_lengths[i]), print >> f print >> f, get_row_limiter('=') for column_texts in table_texts: for i, row_text in enumerate(column_texts): - print >> f, '{:^{fill}}'.format(row_text, fill=column_lengths[i]), + print >> f, '{0:^{fill}}'.format(row_text, fill=column_lengths[i]), print >> f print >> f print >> f, get_row_limiter('=') diff -r 361f53fc4252d7f41ee19215f036aaa817460732 -r 5840f22714e0e8f6a8441cf5215fc84682044b28 doc/en/plugins_index/test_plugins_index.expected.rst --- /dev/null +++ b/doc/en/plugins_index/test_plugins_index.expected.rst @@ -0,0 +1,16 @@ +.. _plugins_index: + +List of Third-Party Plugins +=========================== + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + Name Author Downloads Python 2.7 Python 3.3 Summary +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.X.Y .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.X.Y some plugin + `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.X.Y .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.X.Y some other plugin + +============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== + +*(Downloads are given from last month only)* + +*(Updated on 2013-10-20)* diff -r 361f53fc4252d7f41ee19215f036aaa817460732 -r 5840f22714e0e8f6a8441cf5215fc84682044b28 doc/en/plugins_index/test_plugins_index.expected.txt --- a/doc/en/plugins_index/test_plugins_index.expected.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _plugins_index: - -List of Third-Party Plugins -=========================== - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - Name Author Downloads Python 2.7 Python 3.3 Summary -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - `pytest-plugin1-1.0 `_ `someone `_ 4 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin1-1.0?py=py33&pytest=2.5.0 some plugin - `pytest-plugin2-1.2 `_ `other `_ 40 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-plugin2-1.2?py=py33&pytest=2.5.0 some other plugin - -============================================ ============================= ========= ============================================================================================= ============================================================================================= =================== - -*(Downloads are given from last month only)* - -*(Updated on 2013-10-20)* diff -r 361f53fc4252d7f41ee19215f036aaa817460732 -r 5840f22714e0e8f6a8441cf5215fc84682044b28 doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -14,9 +14,9 @@ Blackbox testing for plugins_index script. Calls main() generating a file and compares produced output to expected. - .. note:: if the test fails, a file named `test_plugins_index.obtained` will be generated in + .. note:: if the test fails, a file named `test_plugins_index.obtained.rst` will be generated in the same directory as this test file. Ensure the contents are correct and overwrite - the global `expected_output` with the new contents. + `test_plugins_index.expected.rst` with that file. ''' import plugins_index @@ -60,7 +60,7 @@ monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') - output_file = str(tmpdir.join('output.txt')) + output_file = str(tmpdir.join('output.rst')) assert plugins_index.main(['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 with file(output_file, 'rU') as f: @@ -68,7 +68,7 @@ expected_output = get_expected_output() if obtained_output != expected_output: - obtained_file = os.path.splitext(__file__)[0] + '.obtained.txt' + obtained_file = os.path.splitext(__file__)[0] + '.obtained.rst' with file(obtained_file, 'w') as f: f.write(obtained_output) @@ -79,9 +79,9 @@ """ :return: string with expected rst output from the plugins_index.py script. """ - expected_filename = os.path.join(os.path.dirname(__file__), 'test_plugins_index.expected.txt') + expected_filename = os.path.join(os.path.dirname(__file__), 'test_plugins_index.expected.rst') expected_output = open(expected_filename, 'rU').read() - return expected_output.replace('pytest=2.X.Y', 'pytest={}'.format(pytest.__version__)) + return expected_output.replace('pytest=2.X.Y', 'pytest={0}'.format(pytest.__version__)) #=================================================================================================== https://bitbucket.org/hpk42/pytest/commits/b37a5814428a/ Changeset: b37a5814428a User: nicoddemus Date: 2013-12-17 22:34:07 Summary: Formatted plugins_index files to use a 80 char width - Formatted code to follow pep-8 more closely; - Got rid of header comments to better follow py.test coding style; Affected #: 2 files diff -r 5840f22714e0e8f6a8441cf5215fc84682044b28 -r b37a5814428a54d41cb9ea0a908829a0c0147018 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -1,9 +1,10 @@ -''' -Script to generate the file `plugins_index.txt` with information about pytest plugins taken directly -from a live PyPI server. +""" +Script to generate the file `plugins_index.txt` with information about +pytest plugins taken directly from a live PyPI server. -This will evolve to include test compatibility (pythons and pytest versions) information also. -''' +This will evolve to include test compatibility (pythons and pytest versions) +information also. +""" from collections import namedtuple import datetime from distutils.version import LooseVersion @@ -15,107 +16,108 @@ import pytest -#=================================================================================================== -# iter_plugins -#=================================================================================================== + def iter_plugins(client, search='pytest-'): - ''' + """ Returns an iterator of (name, version) from PyPI. :param client: xmlrpclib.ServerProxy :param search: package names to search for - ''' - for plug_data in client.search({'name' : search}): + """ + for plug_data in client.search({'name': search}): yield plug_data['name'], plug_data['version'] -#=================================================================================================== -# get_latest_versions -#=================================================================================================== def get_latest_versions(plugins): - ''' - Returns an iterator of (name, version) from the given list of (name, version), but returning - only the latest version of the package. Uses distutils.LooseVersion to ensure compatibility - with PEP386. - ''' + """ + Returns an iterator of (name, version) from the given list of (name, + version), but returning only the latest version of the package. Uses + distutils.LooseVersion to ensure compatibility with PEP386. + """ plugins = [(name, LooseVersion(version)) for (name, version) in plugins] for name, grouped_plugins in itertools.groupby(plugins, key=lambda x: x[0]): name, loose_version = list(grouped_plugins)[-1] yield name, str(loose_version) - - -#=================================================================================================== -# obtain_plugins_table -#=================================================================================================== -def obtain_plugins_table(plugins, client): - ''' - Returns information to populate a table of plugins, their versions, authors, etc. + + +def obtain_plugins_table(plugins, client): + """ + Returns information to populate a table of plugins, their versions, + authors, etc. - The returned information is a list of columns of `ColumnData` namedtuples(text, link). Link - can be None if the text for that column should not be linked to anything. + The returned information is a list of columns of `ColumnData` + namedtuples(text, link). Link can be None if the text for that column + should not be linked to anything. :param plugins: list of (name, version) :param client: xmlrpclib.ServerProxy - ''' + """ rows = [] ColumnData = namedtuple('ColumnData', 'text link') - headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', 'Summary'] + headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', + 'Summary'] pytest_version = pytest.__version__ print '*** pytest-{0} ***'.format(pytest_version) plugins = list(plugins) for index, (package_name, version) in enumerate(plugins): print package_name, version, '...', - + release_data = client.release_data(package_name, version) download_count = release_data['downloads']['last_month'] - image_url = '.. image:: http://pytest-plugs.herokuapp.com/status/{name}-{version}'.format(name=package_name, - version=version) + url = '.. image:: {site}/status/{name}-{version}' + image_url = url.format( + site='http://pytest-plugs.herokuapp.com', + name=package_name, + version=version) image_url += '?py={py}&pytest={pytest}' row = ( - ColumnData(package_name + '-' + version, release_data['release_url']), + ColumnData(package_name + '-' + version, + release_data['release_url']), ColumnData(release_data['author'], release_data['author_email']), ColumnData(str(download_count), None), - ColumnData(image_url.format(py='py27', pytest=pytest_version), None), - ColumnData(image_url.format(py='py33', pytest=pytest_version), None), + ColumnData(image_url.format(py='py27', pytest=pytest_version), + None), + ColumnData(image_url.format(py='py33', pytest=pytest_version), + None), ColumnData(release_data['summary'], None), ) assert len(row) == len(headers) rows.append(row) - - print 'OK (%d%%)' % ((index + 1) * 100 / len(plugins)) - - return headers, rows + print 'OK (%d%%)' % ((index + 1) * 100 / len(plugins)) -#=================================================================================================== -# generate_plugins_index_from_table -#=================================================================================================== + return headers, rows + + def generate_plugins_index_from_table(filename, headers, rows): - ''' + """ Generates a RST file with the table data given. :param filename: output filename :param headers: see `obtain_plugins_table` :param rows: see `obtain_plugins_table` - ''' - # creates a list of rows, each being a str containing appropriate column text and link + """ + # creates a list of rows, each being a str containing appropriate column + # text and link table_texts = [] for row in rows: column_texts = [] - for i, col_data in enumerate(row): - text = '`%s <%s>`_' % (col_data.text, col_data.link) if col_data.link else col_data.text + for i, col_data in enumerate(row): + text = '`%s <%s>`_' % ( + col_data.text, + col_data.link) if col_data.link else col_data.text column_texts.append(text) table_texts.append(column_texts) - + # compute max length of each column so we can build the rst table column_lengths = [len(x) for x in headers] for column_texts in table_texts: for i, row_text in enumerate(column_texts): column_lengths[i] = max(column_lengths[i], len(row_text) + 2) - + def get_row_limiter(char): return ' '.join(char * length for length in column_lengths) - + with file(filename, 'w') as f: # write welcome print >> f, '.. _plugins_index:' @@ -123,17 +125,18 @@ print >> f, 'List of Third-Party Plugins' print >> f, '===========================' print >> f - + # table print >> f, get_row_limiter('=') for i, header in enumerate(headers): print >> f, '{0:^{fill}}'.format(header, fill=column_lengths[i]), print >> f print >> f, get_row_limiter('=') - + for column_texts in table_texts: for i, row_text in enumerate(column_texts): - print >> f, '{0:^{fill}}'.format(row_text, fill=column_lengths[i]), + print >> f, '{0:^{fill}}'.format(row_text, + fill=column_lengths[i]), print >> f print >> f print >> f, get_row_limiter('=') @@ -141,54 +144,50 @@ print >> f, '*(Downloads are given from last month only)*' print >> f print >> f, '*(Updated on %s)*' % _get_today_as_str() - -#=================================================================================================== -# _get_today_as_str -#=================================================================================================== + def _get_today_as_str(): - ''' + """ internal. only exists so we can patch it in testing. - ''' + """ return datetime.date.today().strftime('%Y-%m-%d') -#=================================================================================================== -# generate_plugins_index -#=================================================================================================== def generate_plugins_index(client, filename): - ''' - Generates an RST file with a table of the latest pytest plugins found in PyPI. + """ + Generates an RST file with a table of the latest pytest plugins found in + PyPI. :param client: xmlrpclib.ServerProxy :param filename: output filename - ''' + """ plugins = get_latest_versions(iter_plugins(client)) headers, rows = obtain_plugins_table(plugins, client) generate_plugins_index_from_table(filename, headers, rows) - -#=================================================================================================== -# main -#=================================================================================================== + def main(argv): + """ + Script entry point. Configures an option parser and calls the appropriate + internal function. + """ filename = os.path.join(os.path.dirname(__file__), 'plugins_index.txt') url = 'http://pypi.python.org/pypi' - - parser = OptionParser(description='Generates a restructured document of pytest plugins from PyPI') - parser.add_option('-f', '--filename', default=filename, help='output filename [default: %default]') - parser.add_option('-u', '--url', default=url, help='url of PyPI server to obtain data from [default: %default]') + + parser = OptionParser( + description='Generates a restructured document of pytest plugins from PyPI') + parser.add_option('-f', '--filename', default=filename, + help='output filename [default: %default]') + parser.add_option('-u', '--url', default=url, + help='url of PyPI server to obtain data from [default: %default]') (options, _) = parser.parse_args(argv[1:]) client = xmlrpclib.ServerProxy(options.url) generate_plugins_index(client, options.filename) - + print print '%s Updated.' % options.filename return 0 -#=================================================================================================== -# main -#=================================================================================================== if __name__ == '__main__': sys.exit(main(sys.argv)) diff -r 5840f22714e0e8f6a8441cf5215fc84682044b28 -r b37a5814428a54d41cb9ea0a908829a0c0147018 doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -4,64 +4,67 @@ import pytest -#=================================================================================================== -# test_plugins_index -#=================================================================================================== + at pytest.mark.xfail( + reason="issue405 fails, not py33 ready, not a core pytest test") +def test_plugins_index(tmpdir, monkeypatch): + """ + Blackbox testing for plugins_index script. Calls main() generating a file + and compares produced output to expected. - at pytest.mark.xfail(reason="issue405 fails, not py33 ready, not a core pytest test") -def test_plugins_index(tmpdir, monkeypatch): - ''' - Blackbox testing for plugins_index script. Calls main() generating a file and compares produced - output to expected. - - .. note:: if the test fails, a file named `test_plugins_index.obtained.rst` will be generated in - the same directory as this test file. Ensure the contents are correct and overwrite + .. note:: if the test fails, a file named + `test_plugins_index.obtained.rst` will be generated in the same directory + as this test file. Ensure the contents are correct and overwrite `test_plugins_index.expected.rst` with that file. - ''' + """ import plugins_index # dummy interface to xmlrpclib.ServerProxy class DummyProxy(object): expected_url = 'http://dummy.pypi' + def __init__(self, url): assert url == self.expected_url def search(self, query): - assert query == {'name' : 'pytest-'} + assert query == {'name': 'pytest-'} return [ - {'name': 'pytest-plugin1', 'version' : '0.8'}, - {'name': 'pytest-plugin1', 'version' : '1.0'}, - {'name': 'pytest-plugin2', 'version' : '1.2'}, + {'name': 'pytest-plugin1', 'version': '0.8'}, + {'name': 'pytest-plugin1', 'version': '1.0'}, + {'name': 'pytest-plugin2', 'version': '1.2'}, ] def release_data(self, package_name, version): results = { - ('pytest-plugin1', '1.0') : { - 'package_url' : 'http://plugin1', - 'release_url' : 'http://plugin1/1.0', - 'author' : 'someone', - 'author_email' : 'someone at py.com', - 'summary' : 'some plugin', - 'downloads': {'last_day': 1, 'last_month': 4, 'last_week': 2}, + ('pytest-plugin1', '1.0'): { + 'package_url': 'http://plugin1', + 'release_url': 'http://plugin1/1.0', + 'author': 'someone', + 'author_email': 'someone at py.com', + 'summary': 'some plugin', + 'downloads': {'last_day': 1, 'last_month': 4, + 'last_week': 2}, }, - ('pytest-plugin2', '1.2') : { - 'package_url' : 'http://plugin2', - 'release_url' : 'http://plugin2/1.2', - 'author' : 'other', - 'author_email' : 'other at py.com', - 'summary' : 'some other plugin', - 'downloads': {'last_day': 10, 'last_month': 40, 'last_week': 20}, + ('pytest-plugin2', '1.2'): { + 'package_url': 'http://plugin2', + 'release_url': 'http://plugin2/1.2', + 'author': 'other', + 'author_email': 'other at py.com', + 'summary': 'some other plugin', + 'downloads': {'last_day': 10, 'last_month': 40, + 'last_week': 20}, }, } return results[(package_name, version)] monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') - monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') + monkeypatch.setattr(plugins_index, '_get_today_as_str', + lambda: '2013-10-20') output_file = str(tmpdir.join('output.rst')) - assert plugins_index.main(['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 + assert plugins_index.main( + ['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 with file(output_file, 'rU') as f: obtained_output = f.read() @@ -79,13 +82,15 @@ """ :return: string with expected rst output from the plugins_index.py script. """ - expected_filename = os.path.join(os.path.dirname(__file__), 'test_plugins_index.expected.rst') + expected_filename = os.path.join(os.path.dirname(__file__), + 'test_plugins_index.expected.rst') expected_output = open(expected_filename, 'rU').read() - return expected_output.replace('pytest=2.X.Y', 'pytest={0}'.format(pytest.__version__)) + return expected_output.replace('pytest=2.X.Y', + 'pytest={0}'.format(pytest.__version__)) -#=================================================================================================== +#=============================================================================== # main -#=================================================================================================== +#=============================================================================== if __name__ == '__main__': pytest.main() https://bitbucket.org/hpk42/pytest/commits/0a2601358049/ Changeset: 0a2601358049 User: nicoddemus Date: 2013-12-18 00:42:51 Summary: plugins_index.py and test run under py33 changed a message a bit since issue405 has actually been resolved Affected #: 2 files diff -r b37a5814428a54d41cb9ea0a908829a0c0147018 -r 0a2601358049aa225a10c5a7a5b34bd7b289d857 doc/en/plugins_index/plugins_index.py --- a/doc/en/plugins_index/plugins_index.py +++ b/doc/en/plugins_index/plugins_index.py @@ -5,6 +5,7 @@ This will evolve to include test compatibility (pythons and pytest versions) information also. """ +from __future__ import print_function from collections import namedtuple import datetime from distutils.version import LooseVersion @@ -12,16 +13,29 @@ from optparse import OptionParser import os import sys -import xmlrpclib +import pytest -import pytest + +def get_proxy(url): + """ + wrapper function to obtain a xmlrpc proxy, taking in account import + differences between python 2.X and 3.X + + :param url: url to bind the proxy to + :return: a ServerProxy instance + """ + if sys.version_info < (3, 0): + from xmlrpclib import ServerProxy + else: + from xmlrpc.client import ServerProxy + return ServerProxy(url) def iter_plugins(client, search='pytest-'): """ Returns an iterator of (name, version) from PyPI. - :param client: xmlrpclib.ServerProxy + :param client: ServerProxy :param search: package names to search for """ for plug_data in client.search({'name': search}): @@ -50,17 +64,17 @@ should not be linked to anything. :param plugins: list of (name, version) - :param client: xmlrpclib.ServerProxy + :param client: ServerProxy """ rows = [] ColumnData = namedtuple('ColumnData', 'text link') headers = ['Name', 'Author', 'Downloads', 'Python 2.7', 'Python 3.3', 'Summary'] pytest_version = pytest.__version__ - print '*** pytest-{0} ***'.format(pytest_version) + print('*** pytest-{0} ***'.format(pytest_version)) plugins = list(plugins) for index, (package_name, version) in enumerate(plugins): - print package_name, version, '...', + print(package_name, version, '...', end='') release_data = client.release_data(package_name, version) download_count = release_data['downloads']['last_month'] @@ -84,7 +98,7 @@ assert len(row) == len(headers) rows.append(row) - print 'OK (%d%%)' % ((index + 1) * 100 / len(plugins)) + print('OK (%d%%)' % ((index + 1) * 100 / len(plugins))) return headers, rows @@ -118,32 +132,34 @@ def get_row_limiter(char): return ' '.join(char * length for length in column_lengths) - with file(filename, 'w') as f: + with open(filename, 'w') as f: # write welcome - print >> f, '.. _plugins_index:' - print >> f - print >> f, 'List of Third-Party Plugins' - print >> f, '===========================' - print >> f + print('.. _plugins_index:', file=f) + print(file=f) + print('List of Third-Party Plugins', file=f) + print('===========================', file=f) + print(file=f) # table - print >> f, get_row_limiter('=') - for i, header in enumerate(headers): - print >> f, '{0:^{fill}}'.format(header, fill=column_lengths[i]), - print >> f - print >> f, get_row_limiter('=') + print(get_row_limiter('='), file=f) + formatted_headers = [ + '{0:^{fill}}'.format(header, fill=column_lengths[i]) + for i, header in enumerate(headers)] + print(*formatted_headers, file=f) + print(get_row_limiter('='), file=f) for column_texts in table_texts: - for i, row_text in enumerate(column_texts): - print >> f, '{0:^{fill}}'.format(row_text, - fill=column_lengths[i]), - print >> f - print >> f - print >> f, get_row_limiter('=') - print >> f - print >> f, '*(Downloads are given from last month only)*' - print >> f - print >> f, '*(Updated on %s)*' % _get_today_as_str() + formatted_rows = [ + '{0:^{fill}}'.format(row_text, fill=column_lengths[i]) + for i, row_text in enumerate(column_texts) + ] + print(*formatted_rows, file=f) + print(file=f) + print(get_row_limiter('='), file=f) + print(file=f) + print('*(Downloads are given from last month only)*', file=f) + print(file=f) + print('*(Updated on %s)*' % _get_today_as_str(), file=f) def _get_today_as_str(): @@ -158,7 +174,7 @@ Generates an RST file with a table of the latest pytest plugins found in PyPI. - :param client: xmlrpclib.ServerProxy + :param client: ServerProxy :param filename: output filename """ plugins = get_latest_versions(iter_plugins(client)) @@ -182,12 +198,13 @@ help='url of PyPI server to obtain data from [default: %default]') (options, _) = parser.parse_args(argv[1:]) - client = xmlrpclib.ServerProxy(options.url) + client = get_proxy(options.url) generate_plugins_index(client, options.filename) - print - print '%s Updated.' % options.filename + print() + print('%s Updated.' % options.filename) return 0 + if __name__ == '__main__': sys.exit(main(sys.argv)) diff -r b37a5814428a54d41cb9ea0a908829a0c0147018 -r 0a2601358049aa225a10c5a7a5b34bd7b289d857 doc/en/plugins_index/test_plugins_index.py --- a/doc/en/plugins_index/test_plugins_index.py +++ b/doc/en/plugins_index/test_plugins_index.py @@ -1,11 +1,9 @@ import os -import xmlrpclib import pytest - at pytest.mark.xfail( - reason="issue405 fails, not py33 ready, not a core pytest test") + at pytest.mark.xfail(reason="not a core pytest test") def test_plugins_index(tmpdir, monkeypatch): """ Blackbox testing for plugins_index script. Calls main() generating a file @@ -58,7 +56,9 @@ } return results[(package_name, version)] - monkeypatch.setattr(xmlrpclib, 'ServerProxy', DummyProxy, 'foo') + + monkeypatch.setattr(plugins_index, 'get_proxy', lambda url: DummyProxy(url), + 'foo') monkeypatch.setattr(plugins_index, '_get_today_as_str', lambda: '2013-10-20') @@ -66,13 +66,13 @@ assert plugins_index.main( ['', '-f', output_file, '-u', DummyProxy.expected_url]) == 0 - with file(output_file, 'rU') as f: + with open(output_file, 'rU') as f: obtained_output = f.read() expected_output = get_expected_output() if obtained_output != expected_output: obtained_file = os.path.splitext(__file__)[0] + '.obtained.rst' - with file(obtained_file, 'w') as f: + with open(obtained_file, 'w') as f: f.write(obtained_output) assert obtained_output == expected_output https://bitbucket.org/hpk42/pytest/commits/f050bf9961c2/ Changeset: f050bf9961c2 User: nicoddemus Date: 2013-12-18 00:52:26 Summary: updated plugins_index for pytest 2.5.1 release Affected #: 1 file diff -r 0a2601358049aa225a10c5a7a5b34bd7b289d857 -r f050bf9961c2235f1cb1e5a8b7fd94008dbfdc0b doc/en/plugins_index/plugins_index.txt --- a/doc/en/plugins_index/plugins_index.txt +++ b/doc/en/plugins_index/plugins_index.txt @@ -6,59 +6,59 @@ ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= Name Author Downloads Python 2.7 Python 3.3 Summary ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= - `pytest-bdd-0.6.7 `_ `Oleg Pidsadnyi `_ 1640 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.7?py=py33&pytest=2.5.0 BDD for pytest - `pytest-bdd-splinter-0.5.96 `_ `Oleg Pidsadnyi `_ 3463 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.96?py=py33&pytest=2.5.0 Splinter subplugin for Pytest BDD plugin - `pytest-bench-0.2.5 `_ `Concordus Applications `_ 1588 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.5.0 Benchmark utility that plugs into pytest. - `pytest-blockage-0.1 `_ `UNKNOWN `_ 110 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.5.0 Disable network requests during a test run. - `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 61 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.5.0 BrowserMob proxy plugin for py.test. - `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 105 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.5.0 py.test bugzilla integration plugin - `pytest-cache-1.0 `_ `Holger Krekel `_ 5690 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.5.0 pytest plugin with mechanisms for caching across test runs - `pytest-capturelog-0.7 `_ `Meme Dough `_ 1615 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.5.0 py.test plugin to capture log messages - `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 408 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.5.0 pytest plugin to add source code sanity checks (pep8 and friends) - `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 101 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.5.0 Define pytest fixtures as context managers. - `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 215 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.5.0 py.test extension for per-test couchdb databases using couchdbkit - `pytest-cov-1.6 `_ `Meme Dough `_ 23787 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.5.0 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 6332 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.5.0 dbfixtures plugin for py.test. - `pytest-django-2.4 `_ `Andreas Pelme `_ 4935 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.5.0 A Django plugin for py.test. - `pytest-django-lite-0.1.0 `_ `David Cramer `_ 1075 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.5.0 The bare minimum to integrate py.test with Django. - `pytest-figleaf-1.0 `_ `holger krekel `_ 59 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.5.0 py.test figleaf coverage plugin - `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1203 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.5.0 pytest plugin to check source code with pyflakes - `pytest-greendots-0.2 `_ `UNKNOWN `_ 149 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.5.0 Green progress dots - `pytest-growl-0.1 `_ `Anthony Long `_ 65 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.5.0 Growl notifications for pytest results. - `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 192 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.5.0 an incremental test runner (pytest plugin) - `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 431 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.5.0 py.test plugin to show failures instantly - `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.5.0 A py.test plug-in to enable drop to ipdb debugger on test failure. - `pytest-jira-0.01 `_ `James Laska `_ 94 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.5.0 py.test JIRA integration plugin, using markers - `pytest-konira-0.2 `_ `Alfredo Deza `_ 99 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.5.0 Run Konira DSL tests with py.test - `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 470 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.5.0 py.test plugin to test server connections locally. - `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 205 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.5.0 py.test bugzilla integration plugin, using markers - `pytest-markfiltration-0.8 `_ `adam goucher `_ 269 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.5.0 UNKNOWN - `pytest-marks-0.4 `_ `adam goucher `_ 241 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.5.0 UNKNOWN - `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 132 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.5.0 pytest's monkeypatch subclass with extra functionalities - `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1087 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.5.0 Mozilla WebQA plugin for py.test. - `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 158 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.5.0 pytest plugin to test OpenERP modules - `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 200 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.5.0 OS X notifications for py.test results. - `pytest-paste-config-0.1 `_ `UNKNOWN `_ 169 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.5.0 Allow setting the path to a paste config file - `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 5971 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.5.0 pytest plugin to check PEP8 requirements - `pytest-poo-0.2 `_ `Andreas Pelme `_ 116 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.5.0 Visualize your crappy tests - `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 107 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.5.0 py.test plugin to connect to a remote debug server with PyDev or PyCharm. - `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 140 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.5.0 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. - `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 380 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.5.0 pytest plugin to generate random data inspired by QuickCheck - `pytest-rage-0.1 `_ `Leonardo Santagada `_ 64 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.5.0 pytest plugin to implement PEP712 - `pytest-random-0.02 `_ `Leah Klearman `_ 125 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.5.0 py.test plugin to randomize tests - `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 153 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.5.0 py.test plugin to re-run tests to eliminate flakey failures - `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 96 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.5.0 implement a --failed option for pytest - `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5726 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.5.0 UNKNOWN - `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 374 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.5.0 py.test plugin that adds instafail, ETA and neat graphics - `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4514 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.5.0 pytest plugin to abort tests after a timeout - `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 257 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.5.0 A twisted plugin for py.test. - `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 8103 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.5.0 py.test xdist plugin for distributed testing and loop-on-failing modes - `pytest-xprocess-0.8 `_ `Holger Krekel `_ 108 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.5.0 pytest plugin to manage external processes across test runs - `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 210 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.5.0 Run tests against wsgi apps defined in yaml - `pytest-zap-0.1 `_ `Dave Hunt `_ 69 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.5.0 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.5.0 OWASP ZAP plugin for py.test. + `pytest-bdd-0.6.8 `_ `Oleg Pidsadnyi `_ 2069 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.8?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-0.6.8?py=py33&pytest=2.5.1 BDD for pytest + `pytest-bdd-splinter-0.5.98 `_ `Oleg Pidsadnyi `_ 4423 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.98?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-splinter-0.5.98?py=py33&pytest=2.5.1 Splinter subplugin for Pytest BDD plugin + `pytest-bench-0.2.5 `_ `Concordus Applications `_ 537 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-0.2.5?py=py33&pytest=2.5.1 Benchmark utility that plugs into pytest. + `pytest-blockage-0.1 `_ `UNKNOWN `_ 109 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-0.1?py=py33&pytest=2.5.1 Disable network requests during a test run. + `pytest-browsermob-proxy-0.1 `_ `Dave Hunt `_ 60 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-0.1?py=py33&pytest=2.5.1 BrowserMob proxy plugin for py.test. + `pytest-bugzilla-0.2 `_ `Noufal Ibrahim `_ 109 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-0.2?py=py33&pytest=2.5.1 py.test bugzilla integration plugin + `pytest-cache-1.0 `_ `Holger Krekel `_ 5795 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-1.0?py=py33&pytest=2.5.1 pytest plugin with mechanisms for caching across test runs + `pytest-capturelog-0.7 `_ `Meme Dough `_ 1677 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-0.7?py=py33&pytest=2.5.1 py.test plugin to capture log messages + `pytest-codecheckers-0.2 `_ `Ronny Pfannschmidt `_ 440 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-0.2?py=py33&pytest=2.5.1 pytest plugin to add source code sanity checks (pep8 and friends) + `pytest-contextfixture-0.1.1 `_ `Andreas Pelme `_ 110 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-0.1.1?py=py33&pytest=2.5.1 Define pytest fixtures as context managers. + `pytest-couchdbkit-0.5.1 `_ `RonnyPfannschmidt `_ 237 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-0.5.1?py=py33&pytest=2.5.1 py.test extension for per-test couchdb databases using couchdbkit + `pytest-cov-1.6 `_ `Meme Dough `_ 23686 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-1.6?py=py33&pytest=2.5.1 py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + `pytest-dbfixtures-0.4.0 `_ `Clearcode - The A Room `_ 4800 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-0.4.0?py=py33&pytest=2.5.1 dbfixtures plugin for py.test. + `pytest-django-2.4 `_ `Andreas Pelme `_ 4754 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-2.4?py=py33&pytest=2.5.1 A Django plugin for py.test. + `pytest-django-lite-0.1.0 `_ `David Cramer `_ 1137 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-0.1.0?py=py33&pytest=2.5.1 The bare minimum to integrate py.test with Django. + `pytest-figleaf-1.0 `_ `holger krekel `_ 60 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-1.0?py=py33&pytest=2.5.1 py.test figleaf coverage plugin + `pytest-flakes-0.2 `_ `Florian Schulze, Holger Krekel and Ronny Pfannschmidt `_ 1037 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-0.2?py=py33&pytest=2.5.1 pytest plugin to check source code with pyflakes + `pytest-greendots-0.2 `_ `UNKNOWN `_ 150 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-0.2?py=py33&pytest=2.5.1 Green progress dots + `pytest-growl-0.1 `_ `Anthony Long `_ 66 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-0.1?py=py33&pytest=2.5.1 Growl notifications for pytest results. + `pytest-incremental-0.3.0 `_ `Eduardo Naufel Schettino `_ 197 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-0.3.0?py=py33&pytest=2.5.1 an incremental test runner (pytest plugin) + `pytest-instafail-0.1.1 `_ `Janne Vanhala `_ 441 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-0.1.1?py=py33&pytest=2.5.1 py.test plugin to show failures instantly + `pytest-ipdb-0.1-prerelease `_ `Matthew de Verteuil `_ 100 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-0.1-prerelease?py=py33&pytest=2.5.1 A py.test plug-in to enable drop to ipdb debugger on test failure. + `pytest-jira-0.01 `_ `James Laska `_ 91 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-0.01?py=py33&pytest=2.5.1 py.test JIRA integration plugin, using markers + `pytest-konira-0.2 `_ `Alfredo Deza `_ 104 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-0.2?py=py33&pytest=2.5.1 Run Konira DSL tests with py.test + `pytest-localserver-0.3.2 `_ `Sebastian Rahlf `_ 516 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-0.3.2?py=py33&pytest=2.5.1 py.test plugin to test server connections locally. + `pytest-marker-bugzilla-0.06 `_ `Eric Sammons `_ 223 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-0.06?py=py33&pytest=2.5.1 py.test bugzilla integration plugin, using markers + `pytest-markfiltration-0.8 `_ `adam goucher `_ 290 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-0.8?py=py33&pytest=2.5.1 UNKNOWN + `pytest-marks-0.4 `_ `adam goucher `_ 244 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-0.4?py=py33&pytest=2.5.1 UNKNOWN + `pytest-monkeyplus-1.1.0 `_ `Virgil Dupras `_ 145 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-1.1.0?py=py33&pytest=2.5.1 pytest's monkeypatch subclass with extra functionalities + `pytest-mozwebqa-1.1.1 `_ `Dave Hunt `_ 1029 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-1.1.1?py=py33&pytest=2.5.1 Mozilla WebQA plugin for py.test. + `pytest-oerp-0.2.0 `_ `Leonardo Santagada `_ 173 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-0.2.0?py=py33&pytest=2.5.1 pytest plugin to test OpenERP modules + `pytest-osxnotify-0.1.4 `_ `Daniel Bader `_ 220 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-0.1.4?py=py33&pytest=2.5.1 OS X notifications for py.test results. + `pytest-paste-config-0.1 `_ `UNKNOWN `_ 139 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-0.1?py=py33&pytest=2.5.1 Allow setting the path to a paste config file + `pytest-pep8-1.0.5 `_ `Holger Krekel and Ronny Pfannschmidt `_ 6025 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-1.0.5?py=py33&pytest=2.5.1 pytest plugin to check PEP8 requirements + `pytest-poo-0.2 `_ `Andreas Pelme `_ 121 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-0.2?py=py33&pytest=2.5.1 Visualize your crappy tests + `pytest-pydev-0.1 `_ `Sebastian Rahlf `_ 97 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-0.1?py=py33&pytest=2.5.1 py.test plugin to connect to a remote debug server with PyDev or PyCharm. + `pytest-qt-1.0.2 `_ `Bruno Oliveira `_ 147 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-1.0.2?py=py33&pytest=2.5.1 pytest plugin that adds fixtures for testing Qt (PyQt and PySide) applications. + `pytest-quickcheck-0.8 `_ `Tetsuya Morimoto `_ 389 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-0.8?py=py33&pytest=2.5.1 pytest plugin to generate random data inspired by QuickCheck + `pytest-rage-0.1 `_ `Leonardo Santagada `_ 66 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-0.1?py=py33&pytest=2.5.1 pytest plugin to implement PEP712 + `pytest-random-0.02 `_ `Leah Klearman `_ 131 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-0.02?py=py33&pytest=2.5.1 py.test plugin to randomize tests + `pytest-rerunfailures-0.03 `_ `Leah Klearman `_ 153 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-0.03?py=py33&pytest=2.5.1 py.test plugin to re-run tests to eliminate flakey failures + `pytest-runfailed-0.3 `_ `Dimitri Merejkowsky `_ 105 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-0.3?py=py33&pytest=2.5.1 implement a --failed option for pytest + `pytest-runner-2.0 `_ `Jason R. Coombs `_ 5705 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-2.0?py=py33&pytest=2.5.1 UNKNOWN + `pytest-sugar-0.2.2 `_ `Teemu, Janne Vanhala `_ 391 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-0.2.2?py=py33&pytest=2.5.1 py.test plugin that adds instafail, ETA and neat graphics + `pytest-timeout-0.3 `_ `Floris Bruynooghe `_ 4660 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-0.3?py=py33&pytest=2.5.1 pytest plugin to abort tests after a timeout + `pytest-twisted-1.4 `_ `Ralf Schmitt `_ 287 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-1.4?py=py33&pytest=2.5.1 A twisted plugin for py.test. + `pytest-xdist-1.9 `_ `holger krekel and contributors `_ 8311 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-1.9?py=py33&pytest=2.5.1 py.test xdist plugin for distributed testing and loop-on-failing modes + `pytest-xprocess-0.8 `_ `Holger Krekel `_ 106 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-0.8?py=py33&pytest=2.5.1 pytest plugin to manage external processes across test runs + `pytest-yamlwsgi-0.6 `_ `Ali Afshar `_ 232 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-0.6?py=py33&pytest=2.5.1 Run tests against wsgi apps defined in yaml + `pytest-zap-0.1 `_ `Dave Hunt `_ 70 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py27&pytest=2.5.1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-0.1?py=py33&pytest=2.5.1 OWASP ZAP plugin for py.test. ========================================================================================== ==================================================================================== ========= ====================================================================================================== ====================================================================================================== ============================================================================================================================================= *(Downloads are given from last month only)* -*(Updated on 2013-12-12)* +*(Updated on 2013-12-17)* 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 Dec 18 14:57:44 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 18 Dec 2013 13:57:44 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: fix issue409 -- better interoperate with cx_freeze by not Message-ID: <20131218135744.4495.71787@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/91925448ac06/ Changeset: 91925448ac06 User: hpk42 Date: 2013-12-18 14:56:45 Summary: fix issue409 -- better interoperate with cx_freeze by not trying to import from collections.abc which causes problems for py27/cx_freeze. Affected #: 4 files diff -r f050bf9961c2235f1cb1e5a8b7fd94008dbfdc0b -r 91925448ac067edf770b504d199a8998872a9f10 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +UNRELEASED +----------------------------------- + +- fix issue409 -- better interoperate with cx_freeze by not + trying to import from collections.abc which causes problems for py27/cx_freeze. + Thanks Wolfgang L. for reporting and tracking it down. + 2.5.1 ----------------------------------- diff -r f050bf9961c2235f1cb1e5a8b7fd94008dbfdc0b -r 91925448ac067edf770b504d199a8998872a9f10 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.5.1' +__version__ = '2.5.2.dev1' diff -r f050bf9961c2235f1cb1e5a8b7fd94008dbfdc0b -r 91925448ac067edf770b504d199a8998872a9f10 _pytest/assertion/util.py --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -2,13 +2,9 @@ import py try: - from collections.abc import Sequence + from collections import Sequence except ImportError: - try: - from collections import Sequence - except ImportError: - Sequence = list - + Sequence = list BuiltinAssertionError = py.builtin.builtins.AssertionError u = py.builtin._totext diff -r f050bf9961c2235f1cb1e5a8b7fd94008dbfdc0b -r 91925448ac067edf770b504d199a8998872a9f10 setup.py --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.5.1', + version='2.5.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 Dec 20 09:33:23 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Dec 2013 08:33:23 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131220083323.1843.36124@app08.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/1fbd66afdbe5/ Changeset: 1fbd66afdbe5 User: lukaszb Date: 2013-12-19 14:29:57 Summary: Updated error message to be more helpful Also, added misssing test Affected #: 2 files diff -r 91925448ac067edf770b504d199a8998872a9f10 -r 1fbd66afdbe50558b767d57d632bbb825d048d7d _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -169,7 +169,7 @@ def __getattr__(self, name): if name[0] == "_": - raise AttributeError(name) + raise AttributeError("Marker name must NOT start with underscore") if hasattr(self, '_config'): self._check(name) return MarkDecorator(name) diff -r 91925448ac067edf770b504d199a8998872a9f10 -r 1fbd66afdbe50558b767d57d632bbb825d048d7d testing/test_mark.py --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -15,6 +15,10 @@ mark = Mark() pytest.raises((AttributeError, TypeError), mark) + def test_pytest_mark_name_starts_with_underscore(self): + mark = Mark() + pytest.raises(AttributeError, getattr, mark, '_some_name') + def test_pytest_mark_bare(self): mark = Mark() def f(): https://bitbucket.org/hpk42/pytest/commits/a08359621e20/ Changeset: a08359621e20 User: hpk42 Date: 2013-12-19 16:13:13 Summary: Merge pull request #9 from lukaszb/mark-error-message Updated error message to be more helpful. Affected #: 2 files diff -r 91925448ac067edf770b504d199a8998872a9f10 -r a08359621e206ab04be9d9009f47d5b555adf3d5 _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -169,7 +169,7 @@ def __getattr__(self, name): if name[0] == "_": - raise AttributeError(name) + raise AttributeError("Marker name must NOT start with underscore") if hasattr(self, '_config'): self._check(name) return MarkDecorator(name) diff -r 91925448ac067edf770b504d199a8998872a9f10 -r a08359621e206ab04be9d9009f47d5b555adf3d5 testing/test_mark.py --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -15,6 +15,10 @@ mark = Mark() pytest.raises((AttributeError, TypeError), mark) + def test_pytest_mark_name_starts_with_underscore(self): + mark = Mark() + pytest.raises(AttributeError, getattr, mark, '_some_name') + def test_pytest_mark_bare(self): mark = Mark() def f(): 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 Dec 20 20:38:26 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Dec 2013 19:38:26 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20131220193826.19278.97940@app13.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/66ab57665ac2/ Changeset: 66ab57665ac2 User: pmuller42 Date: 2013-12-20 14:01:17 Summary: Fix minor typo in special.txt Affected #: 1 file diff -r a08359621e206ab04be9d9009f47d5b555adf3d5 -r 66ab57665ac2e5daf3c1f8fedbce00de3e24b407 doc/en/example/special.txt --- a/doc/en/example/special.txt +++ b/doc/en/example/special.txt @@ -1,5 +1,4 @@ - -A sesssion-fixture which can look at all collected tests +A session-fixture which can look at all collected tests ---------------------------------------------------------------- A session-scoped fixture effectively has access to all https://bitbucket.org/hpk42/pytest/commits/17a246750c75/ Changeset: 17a246750c75 User: hpk42 Date: 2013-12-20 20:37:39 Summary: Merge pull request #11 from pmuller/patch-1 Fix minor typo in special.txt Affected #: 1 file diff -r a08359621e206ab04be9d9009f47d5b555adf3d5 -r 17a246750c75f5eda01d065b9c72ab9fb0f1b544 doc/en/example/special.txt --- a/doc/en/example/special.txt +++ b/doc/en/example/special.txt @@ -1,5 +1,4 @@ - -A sesssion-fixture which can look at all collected tests +A session-fixture which can look at all collected tests ---------------------------------------------------------------- A session-scoped fixture effectively has access to all 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.