From commits-noreply at bitbucket.org Sun Mar 1 13:54:53 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 01 Mar 2015 12:54:53 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: allow to override parametrized fixtures with non-parametrized ones and vice versa Message-ID: <20150301125453.15448.3366@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/c42b1e36a89a/ Changeset: c42b1e36a89a Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-01 12:54:43+00:00 Summary: allow to override parametrized fixtures with non-parametrized ones and vice versa Affected #: 5 files diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r c42b1e36a89affdbc168833652f659025a8bc5b6 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,10 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- -- fix issue616: conftest.py files and their contained fixutres are now +- fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. - Many thanks to Eric Siegerman and his PR235 which contains + Many thanks to Eric Siegerman and his PR235 which contains systematic tests for conftest visibility and now passes. This change also introduces the concept of a ``rootdir`` which is printed as a new pytest header and documented in the pytest @@ -12,7 +12,7 @@ - change reporting of "diverted" tests, i.e. tests that are collected in one file but actually come from another (e.g. when tests in a test class - come from a base class in a different file). We now show the nodeid + come from a base class in a different file). We now show the nodeid and indicate via a postfix the other file. - add ability to set command line options by environment variable PYTEST_ADDOPTS. @@ -24,7 +24,7 @@ - fix issue650: new option ``--docttest-ignore-import-errors`` which will turn import errors in doctests into skips. Thanks Charles Cloud for the complete PR. - + - fix issue655: work around different ways that cause python2/3 to leak sys.exc_info into fixtures/tests causing failures in 3rd party code @@ -55,6 +55,7 @@ - "python_classes" and "python_functions" options now support glob-patterns for test discovery, as discussed in issue600. Thanks Ldiary Translations. +- allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). 2.6.4 ---------- diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r c42b1e36a89affdbc168833652f659025a8bc5b6 Makefile --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +# create virtual environment +PYTHON = python2.7 + +.env: + virtualenv .env -p $(PYTHON) + +# install all needed for development +develop: .env + .env/bin/pip install -e .[test] tox + +# clean the development envrironment +clean: + -rm -rf .env diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r c42b1e36a89affdbc168833652f659025a8bc5b6 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1714,7 +1714,7 @@ faclist = metafunc._arg2fixturedefs.get(argname) if faclist is None: continue # will raise FixtureLookupError at setup time - for fixturedef in faclist: + for fixturedef in faclist[-1:]: if fixturedef.params is not None: metafunc.parametrize(argname, fixturedef.params, indirect=True, scope=fixturedef.scope, diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r c42b1e36a89affdbc168833652f659025a8bc5b6 setup.py --- a/setup.py +++ b/setup.py @@ -13,7 +13,8 @@ ('Programming Language :: Python :: %s' % x) for x in '2 2.6 2.7 3 3.2 3.3 3.4'.split()] -long_description = open('README.rst').read() +with open('README.rst') as fd: + long_description = fd.read() def main(): diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r c42b1e36a89affdbc168833652f659025a8bc5b6 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -226,6 +226,114 @@ result = testdir.runpytest() assert result.ret == 0 + def test_override_parametrized_fixture_conftest_module(self, testdir): + """Test override of the parametrized fixture with non-parametrized one on the test module level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """) + testfile = testdir.makepyfile(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + + def test_spam(spam): + assert spam == 'spam' + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*1 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*1 passed*"]) + + def test_override_parametrized_fixture_conftest_conftest(self, testdir): + """Test override of the parametrized fixture with non-parametrized one on the conftest level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """) + subdir = testdir.mkpydir('subdir') + subdir.join("conftest.py").write(py.code.Source(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """)) + testfile = subdir.join("test_spam.py") + testfile.write(py.code.Source(""" + def test_spam(spam): + assert spam == "spam" + """)) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*1 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*1 passed*"]) + + def test_override_non_parametrized_fixture_conftest_module(self, testdir): + """Test override of the non-parametrized fixture with parametrized one on the test module level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """) + testfile = testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + + params = {'spam': 1} + + def test_spam(spam): + assert spam == params['spam'] + params['spam'] += 1 + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*3 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*3 passed*"]) + + def test_override_non_parametrized_fixture_conftest_conftest(self, testdir): + """Test override of the non-parametrized fixture with parametrized one on the conftest level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """) + subdir = testdir.mkpydir('subdir') + subdir.join("conftest.py").write(py.code.Source(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """)) + testfile = subdir.join("test_spam.py") + testfile.write(py.code.Source(""" + params = {'spam': 1} + + def test_spam(spam): + assert spam == params['spam'] + params['spam'] += 1 + """)) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*3 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*3 passed*"]) + def test_autouse_fixture_plugin(self, testdir): # A fixture from a plugin has no baseid set, which screwed up # the autouse fixture handling. Repository URL: https://bitbucket.org/pytest-dev/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 Mar 1 15:15:46 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 01 Mar 2015 14:15:46 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: support override of the parametrized fixture on the test level Message-ID: <20150301141546.32205.25260@app08.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/36e8f6d683da/ Changeset: 36e8f6d683da Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-01 14:15:37+00:00 Summary: support override of the parametrized fixture on the test level Affected #: 2 files diff -r c42b1e36a89affdbc168833652f659025a8bc5b6 -r 36e8f6d683da6908f9c5fe76c02c013302903808 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1716,9 +1716,12 @@ continue # will raise FixtureLookupError at setup time for fixturedef in faclist[-1:]: if fixturedef.params is not None: - metafunc.parametrize(argname, fixturedef.params, - indirect=True, scope=fixturedef.scope, - ids=fixturedef.ids) + func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) + # skip directly parametrized arguments + if argname not in func_params and argname not in func_params[0]: + metafunc.parametrize(argname, fixturedef.params, + indirect=True, scope=fixturedef.scope, + ids=fixturedef.ids) def pytest_collection_modifyitems(self, items): # separate parametrized setups diff -r c42b1e36a89affdbc168833652f659025a8bc5b6 -r 36e8f6d683da6908f9c5fe76c02c013302903808 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -401,6 +401,23 @@ rec.assertoutcome(passed=1) + def test_parametrize_overrides_parametrized_fixture(self, testdir): + """Test parametrization when parameter overrides existing parametrized fixture with same name.""" + testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[1, 2]) + def value(request): + return request.param + + @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/pytest-dev/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 builds at drone.io Sun Mar 1 15:31:12 2015 From: builds at drone.io (Drone.io Build) Date: Sun, 01 Mar 2015 14:31:12 +0000 Subject: [Pytest-commit] [FAIL] pytest-pep8 - # 1 Message-ID: <20150301143112.16406.6199@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8/1 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8 Repository : https://bitbucket.org/pytest-dev/pytest-pep8 Version : 45:b034b5aff93b Author : holger krekel Branch : default Message: bump versions -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Sun Mar 1 15:34:01 2015 From: builds at drone.io (Drone.io Build) Date: Sun, 01 Mar 2015 14:34:01 +0000 Subject: [Pytest-commit] [FAIL] pytest-pep8 - # 2 Message-ID: <20150301143401.15300.12026@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8/2 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-pep8 Repository : https://bitbucket.org/pytest-dev/pytest-pep8 Version : 46:a292883ad90b Author : Anatoly Bubenkov Branch : default Message: add badges -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Sun Mar 1 15:45:07 2015 From: builds at drone.io (Drone.io Build) Date: Sun, 01 Mar 2015 14:45:07 +0000 Subject: [Pytest-commit] [FAIL] pytest-xprocess - # 4 Message-ID: <20150301144507.19170.15712@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xprocess/4 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xprocess Repository : https://bitbucket.org/pytest-dev/pytest-xprocess Version : 13:a1d632ab326e Author : Anatoly Bubenkov Branch : default Message: README.rst edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Sun Mar 1 15:47:05 2015 From: builds at drone.io (Drone.io Build) Date: Sun, 01 Mar 2015 14:47:05 +0000 Subject: [Pytest-commit] [FAIL] pytest-xdist - # 4 Message-ID: <20150301144705.53143.30456@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist/4 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist Repository : https://bitbucket.org/pytest-dev/pytest-xdist Version : 203:00cfff4834e7 Author : Anatoly Bubenkov Branch : default Message: README.txt edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sun Mar 1 18:54:34 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sun, 01 Mar 2015 17:54:34 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: document fixture override techniques Message-ID: <20150301175434.24582.2085@app12.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/03d41bd86f9f/ Changeset: 03d41bd86f9f Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-01 17:54:24+00:00 Summary: document fixture override techniques Affected #: 1 file diff -r 36e8f6d683da6908f9c5fe76c02c013302903808 -r 03d41bd86f9fc0de41b349866d3f947c52ae6bd5 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -78,20 +78,20 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 1 items - + test_smtpsimple.py F - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 > assert "merlinux" in msg E TypeError: Type str doesn't support the buffer API - + test_smtpsimple.py:11: TypeError ========================= 1 failed in 0.28 seconds ========================= @@ -195,31 +195,31 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 2 items - + test_module.py FF - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError ________________________________ test_noop _________________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ========================= 2 failed in 0.28 seconds ========================= @@ -268,7 +268,7 @@ $ py.test -s -q --tb=no FFteardown smtp - + 2 failed in 0.21 seconds We see that the ``smtp`` instance is finalized after the two @@ -377,50 +377,50 @@ FFFF ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError __________________________ test_noop[merlinux.eu] __________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError -------------------------- Captured stdout setup --------------------------- finalizing ________________________ test_noop[mail.python.org] ________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError 4 failed in 7.02 seconds @@ -519,10 +519,10 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items - + test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - + ========================= 2 passed in 6.63 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two @@ -583,7 +583,7 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 8 items - + test_module.py::test_0[1] test0 1 PASSED test_module.py::test_0[2] test0 2 @@ -602,7 +602,7 @@ PASSED test_module.py::test_2[2-mod2] test2 2 mod2 PASSED - + ========================= 8 passed in 0.01 seconds ========================= You can see that the parametrized module-scoped ``modarg`` resource caused @@ -780,4 +780,182 @@ fixtures functions starts at test classes, then test modules, then ``conftest.py`` files and finally builtin and third party plugins. +Overriding fixtures on various levels +------------------------------------- +In relatively large test suite, you most likely need to ``override`` a ``global`` or ``root`` fixture with a ``locally`` +defined one, keeping the test code readable and maintainable. + +Override a fixture on a folder (conftest) level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + def test_username(username): + assert username == 'username' + + subfolder/ + __init__.py + + conftest.py + # content of tests/subfolder/conftest.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + test_something.py + # content of tests/subfolder/test_something.py + def test_username(username): + assert username == 'overridden-username' + +As you can see, a fixture with the same name can be overridden for certain test folder level. +Note that the ``base`` or ``super`` fixture can be accessed from the ``overriding`` +fixture easily - used in the example above. + +Override a fixture on a test module level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + def test_username(username): + assert username == 'overridden-username' + + test_something_else.py + # content of tests/test_something_else.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-else-' + username + + def test_username(username): + assert username == 'overridden-else-username' + +In the example above, a fixture with the same name can be overridden for certain test module. + + +Override a fixture with direct test parametrization +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + @pytest.fixture + def other_username(username): + return 'other-' + username + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.mark.parametrize('username', ['directly-overridden-username']) + def test_username(username): + assert username == 'directly-overridden-username' + + @pytest.mark.parametrize('username', ['directly-overridden-username-other']) + def test_username_other(other_username): + assert username == 'other-directly-overridden-username-other' + +In the example above, a fixture value is overridden by the test parameter value. Note that the value of the fixture +can be overridden this way even if the test doesn't use it directly (doesn't mention it in the function prototype). + + +Override a parametrized fixture with non-parametrized one and vice versa +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture(params=['one', 'two', 'three']) + def parametrized_username(request): + return request.param + + @pytest.fixture + def non_parametrized_username(request): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def parametrized_username(): + return 'overridden-username' + + @pytest.fixture(params=['one', 'two', 'three']) + def non_parametrized_username(request): + return request.param + + def test_username(parametrized_username): + assert parametrized_username == 'overridden-username' + + def test_parametrized_username(non_parametrized_username): + assert non_parametrized_username in ['one', 'two', 'three'] + + test_something_else.py + # content of tests/test_something_else.py + def test_username(parametrized_username): + assert parametrized_username in ['one', 'two', 'three'] + + def test_username(non_parametrized_username): + assert non_parametrized_username == 'username' + +In the example above, a parametrized fixture is overridden with a non-parametrized version, and +a non-parametrized fixture is overridden with a parametrized version for certain test module. +The same applies for the test folder level obviously. Repository URL: https://bitbucket.org/pytest-dev/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Sun Mar 1 20:04:51 2015 From: issues-reply at bitbucket.org (Ronny Pfannschmidt) Date: Sun, 01 Mar 2015 19:04:51 -0000 Subject: [Pytest-commit] Issue #225: create a standard for external tools to store data in tox.ini (hpk42/tox) Message-ID: <20150301190451.25649.61966@app11.ash-private.bitbucket.org> New issue 225: create a standard for external tools to store data in tox.ini https://bitbucket.org/hpk42/tox/issue/225/create-a-standard-for-external-tools-to Ronny Pfannschmidt: since https://bitbucket.org/pytest-dev/pytest/issue/567/use-of-pytest-in-setupcfg-collides-with i think its there is need for a standard ruling on how to put other things into tox.ini that will be collision-free in future i propose prefixing of sections of tools with external or tool so `[pytest]` would become `[tool:pytest]` From commits-noreply at bitbucket.org Mon Mar 2 08:56:07 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 07:56:07 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: make loop more readable Message-ID: <20150302075607.23593.25185@app13.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/6440449e3ca2/ Changeset: 6440449e3ca2 Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 07:55:57+00:00 Summary: make loop more readable Affected #: 3 files diff -r 03d41bd86f9fc0de41b349866d3f947c52ae6bd5 -r 6440449e3ca2915f7324da89bf3474bdcd0b1d85 Makefile --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # install all needed for development develop: .env - .env/bin/pip install -e .[test] tox + .env/bin/pip install -e . tox # clean the development envrironment clean: diff -r 03d41bd86f9fc0de41b349866d3f947c52ae6bd5 -r 6440449e3ca2915f7324da89bf3474bdcd0b1d85 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1712,9 +1712,8 @@ def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) - if faclist is None: - continue # will raise FixtureLookupError at setup time - for fixturedef in faclist[-1:]: + if faclist: + fixturedef = faclist[-1] if fixturedef.params is not None: func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) # skip directly parametrized arguments @@ -1722,6 +1721,8 @@ metafunc.parametrize(argname, fixturedef.params, indirect=True, scope=fixturedef.scope, ids=fixturedef.ids) + else: + continue # will raise FixtureLookupError at setup time def pytest_collection_modifyitems(self, items): # separate parametrized setups diff -r 03d41bd86f9fc0de41b349866d3f947c52ae6bd5 -r 6440449e3ca2915f7324da89bf3474bdcd0b1d85 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX +addopts= -rxsX -vl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 2 09:09:54 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 02 Mar 2015 08:09:54 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 18 Message-ID: <20150302080954.15308.40076@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/18 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3897:6440449e3ca2 Author : Anatoly Bubenkov Branch : parametrized-fixture-override Message: make loop more readable -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Mon Mar 2 12:32:12 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 02 Mar 2015 11:32:12 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 19 Message-ID: <20150302113212.19160.46795@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/19 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : Author : Branch : default Message: -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 2 14:38:15 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 13:38:15 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20150302133815.5009.95113@app01.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/d98609a4ab9b/ Changeset: d98609a4ab9b Branch: issue616 User: Eric Siegerman Date: 2015-03-01 22:32:00+00:00 Summary: Add comments Affected #: 1 file diff -r 525082e4ed8e3e214e22e0a9c7c2ae359a2d4cd5 -r d98609a4ab9be453850fc1925db68bc8b4b2fc25 testing/test_conftest.py --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -312,21 +312,25 @@ # N.B.: "swc" stands for "subdir with conftest.py" # "snc" stands for "subdir no [i.e. without] conftest.py" @pytest.mark.parametrize("chdir,testarg,expect_ntests_passed", [ + # Effective target: package/.. ("runner", "..", 3), ("package", "..", 3), ("swc", "../..", 3), ("snc", "../..", 3), + # Effective target: package ("runner", "../package", 3), ("package", ".", 3), ("swc", "..", 3), ("snc", "..", 3), + # Effective target: package/swc ("runner", "../package/swc", 1), ("package", "./swc", 1), ("swc", ".", 1), ("snc", "../swc", 1), + # Effective target: package/snc ("runner", "../package/snc", 1), ("package", "./snc", 1), ("swc", "../snc", 1), https://bitbucket.org/pytest-dev/pytest/commits/e26175bf8246/ Changeset: e26175bf8246 User: RonnyPfannschmidt Date: 2015-03-02 13:38:10+00:00 Summary: Merged in eks/pytest/issue616 (pull request #258) Add comments Affected #: 1 file diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r e26175bf8246f01fc5573e92359b3124624c31b7 testing/test_conftest.py --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -312,21 +312,25 @@ # N.B.: "swc" stands for "subdir with conftest.py" # "snc" stands for "subdir no [i.e. without] conftest.py" @pytest.mark.parametrize("chdir,testarg,expect_ntests_passed", [ + # Effective target: package/.. ("runner", "..", 3), ("package", "..", 3), ("swc", "../..", 3), ("snc", "../..", 3), + # Effective target: package ("runner", "../package", 3), ("package", ".", 3), ("swc", "..", 3), ("snc", "..", 3), + # Effective target: package/swc ("runner", "../package/swc", 1), ("package", "./swc", 1), ("swc", ".", 1), ("snc", "../swc", 1), + # Effective target: package/snc ("runner", "../package/snc", 1), ("package", "./snc", 1), ("swc", "../snc", 1), Repository URL: https://bitbucket.org/pytest-dev/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 Mar 2 14:38:16 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 13:38:16 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: Merged in eks/pytest/issue616 (pull request #258) Message-ID: <20150302133816.3329.56201@app11.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/e26175bf8246/ Changeset: e26175bf8246 User: RonnyPfannschmidt Date: 2015-03-02 13:38:10+00:00 Summary: Merged in eks/pytest/issue616 (pull request #258) Add comments Affected #: 1 file diff -r 163964f4f0f48204f9f42d080778f23d6673f0b0 -r e26175bf8246f01fc5573e92359b3124624c31b7 testing/test_conftest.py --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -312,21 +312,25 @@ # N.B.: "swc" stands for "subdir with conftest.py" # "snc" stands for "subdir no [i.e. without] conftest.py" @pytest.mark.parametrize("chdir,testarg,expect_ntests_passed", [ + # Effective target: package/.. ("runner", "..", 3), ("package", "..", 3), ("swc", "../..", 3), ("snc", "../..", 3), + # Effective target: package ("runner", "../package", 3), ("package", ".", 3), ("swc", "..", 3), ("snc", "..", 3), + # Effective target: package/swc ("runner", "../package/swc", 1), ("package", "./swc", 1), ("swc", ".", 1), ("snc", "../swc", 1), + # Effective target: package/snc ("runner", "../package/snc", 1), ("package", "./snc", 1), ("swc", "../snc", 1), Repository URL: https://bitbucket.org/pytest-dev/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 Mar 2 20:18:43 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 19:18:43 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20150302191843.1139.11264@app13.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/08f6d8931149/ Changeset: 08f6d8931149 Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 19:18:06+00:00 Summary: fix typo Affected #: 1 file diff -r 03d41bd86f9fc0de41b349866d3f947c52ae6bd5 -r 08f6d8931149c4fc43974c6fa32c44bc493ff506 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -393,9 +393,9 @@ return 'value' @pytest.mark.parametrize('value', - ['overrided']) - def test_overrided_via_param(value): - assert value == 'overrided' + ['overridden']) + def test_overridden_via_param(value): + assert value == 'overridden' """) rec = testdir.inline_run() rec.assertoutcome(passed=1) @@ -411,9 +411,9 @@ return request.param @pytest.mark.parametrize('value', - ['overrided']) - def test_overrided_via_param(value): - assert value == 'overrided' + ['overridden']) + def test_overridden_via_param(value): + assert value == 'overridden' """) rec = testdir.inline_run() rec.assertoutcome(passed=1) https://bitbucket.org/pytest-dev/pytest/commits/57a91987983a/ Changeset: 57a91987983a Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 19:18:31+00:00 Summary: merge with upstream Affected #: 3 files diff -r 08f6d8931149c4fc43974c6fa32c44bc493ff506 -r 57a91987983a794c05cfb887c6b335194c6b4918 Makefile --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # install all needed for development develop: .env - .env/bin/pip install -e .[test] tox + .env/bin/pip install -e . tox # clean the development envrironment clean: diff -r 08f6d8931149c4fc43974c6fa32c44bc493ff506 -r 57a91987983a794c05cfb887c6b335194c6b4918 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1712,9 +1712,8 @@ def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) - if faclist is None: - continue # will raise FixtureLookupError at setup time - for fixturedef in faclist[-1:]: + if faclist: + fixturedef = faclist[-1] if fixturedef.params is not None: func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) # skip directly parametrized arguments @@ -1722,6 +1721,8 @@ metafunc.parametrize(argname, fixturedef.params, indirect=True, scope=fixturedef.scope, ids=fixturedef.ids) + else: + continue # will raise FixtureLookupError at setup time def pytest_collection_modifyitems(self, items): # separate parametrized setups diff -r 08f6d8931149c4fc43974c6fa32c44bc493ff506 -r 57a91987983a794c05cfb887c6b335194c6b4918 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX +addopts= -rxsX -vl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 2 20:31:02 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 02 Mar 2015 19:31:02 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 23 Message-ID: <20150302193052.15294.611@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/23 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3899:57a91987983a Author : Anatoly Bubenkov Branch : parametrized-fixture-override Message: merge with upstream -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 2 20:48:25 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 19:48:25 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: use make develop in contribution guide Message-ID: <20150302194825.17193.64274@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/bae41ffae0c4/ Changeset: bae41ffae0c4 Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 19:48:09+00:00 Summary: use make develop in contribution guide Affected #: 1 file diff -r 57a91987983a794c05cfb887c6b335194c6b4918 -r bae41ffae0c4fc5d0e1852e320692d34395a2c90 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -30,8 +30,8 @@ mail pointing to your existing pytest plugin repository which must have the following: -- PyPI presence with a ``setup.py`` that contains a license, ``pytest-`` - prefixed, version number, authors, short and long description. +- PyPI presence with a ``setup.py`` that contains a license, ``pytest-`` + prefixed, version number, authors, short and long description. - a ``tox.ini`` for running tests using `tox `_. @@ -43,7 +43,7 @@ If no contributor strongly objects and two agree, the repo will be transferred to the ``pytest-dev`` organisation and you'll become a -member of the ``pytest-dev`` team, with commit rights to all projects. +member of the ``pytest-dev`` team, with commit rights to all projects. We recommend that each plugin has at least three people who have the right to release to pypi. @@ -128,22 +128,18 @@ The primary development platform for pytest is BitBucket. You can find all the issues there and submit your pull requests. -1. Fork the +#. Fork the `pytest BitBucket repository `__. It's fine to use ``pytest`` as your fork repository name because it will live under your user. -.. _virtualenvactivate: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -2. Create and activate a fork-specific virtualenv - (http://www.virtualenv.org/en/latest/):: + $ make develop + $ source .env/bin/activate - $ virtualenv pytest-venv - $ source pytest-venv/bin/activate - -.. _checkout: - -3. Clone your fork locally using `Mercurial `_ +#. Clone your fork locally using `Mercurial `_ (``hg``) and create a branch:: $ hg clone ssh://hg at bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest @@ -153,45 +149,46 @@ If you need some help with Mercurial, follow this quick start guide: http://mercurial.selenic.com/wiki/QuickStart -.. _testing-pytest: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -4. You can now edit your local working copy. To test you need to - install the "tox" tool into your virtualenv:: + $ make develop + $ source .env/bin/activate - $ pip install tox +#. You can now edit your local working copy. - You need to have Python 2.7 and 3.3 available in your system. Now - running tests is as simple as issuing this command:: + You need to have Python 2.7 and 3.4 available in your system. Now + running tests is as simple as issuing this command:: - $ python runtox.py -e py27,py33,flakes + $ python runtox.py -e py27,py34,flakes - This command will run tests via the "tox" tool against Python 2.7 and 3.3 - and also perform "flakes" coding-style checks. ``runtox.py`` is - a thin wrapper around ``tox`` which installs from a development package - index where newer (not yet released to pypi) versions of dependencies - (especially ``py``) might be present. + This command will run tests via the "tox" tool against Python 2.7 and 3.4 + and also perform "flakes" coding-style checks. ``runtox.py`` is + a thin wrapper around ``tox`` which installs from a development package + index where newer (not yet released to pypi) versions of dependencies + (especially ``py``) might be present. - To run tests on py27 and pass options (e.g. enter pdb on failure) - to pytest you can do:: + To run tests on py27 and pass options (e.g. enter pdb on failure) + to pytest you can do:: $ python runtox.py -e py27 -- --pdb - or to only run tests in a particular test module on py33:: + or to only run tests in a particular test module on py34:: - $ python runtox.py -e py33 -- testing/test_config.py + $ python runtox.py -e py34 -- testing/test_config.py -5. Commit and push once your tests pass and you are happy with your change(s):: +#. Commit and push once your tests pass and you are happy with your change(s):: $ hg commit -m"" $ hg push -b . -6. Finally, submit a pull request through the BitBucket website: +#. Finally, submit a pull request through the BitBucket website: - .. image:: img/pullrequest.png - :width: 700px - :align: center + .. image:: img/pullrequest.png + :width: 700px + :align: center - :: + :: source: YOUR_BITBUCKET_USERNAME/pytest branch: your-branch-name @@ -214,5 +211,3 @@ may try `gitifyhg `_ but are on your own and need to submit pull requests through the respective platform, nevertheless. - - Repository URL: https://bitbucket.org/pytest-dev/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 Mar 2 21:43:43 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 20:43:43 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: add docs target Message-ID: <20150302204343.6595.19528@app12.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/cca9e94489f0/ Changeset: cca9e94489f0 Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 20:43:31+00:00 Summary: add docs target Affected #: 2 files diff -r bae41ffae0c4fc5d0e1852e320692d34395a2c90 -r cca9e94489f0ffa7d0b18ceb8dbbef2696377f29 Makefile --- a/Makefile +++ b/Makefile @@ -1,13 +1,24 @@ -# create virtual environment +# Set of targets useful for development/release process PYTHON = python2.7 +PATH := $(PWD)/.env/bin:$(PATH) +# prepare virtual python environment .env: virtualenv .env -p $(PYTHON) # install all needed for development develop: .env - .env/bin/pip install -e . tox + pip install -e . tox -r requirements-docs.txt # clean the development envrironment clean: -rm -rf .env + +# generate documentation +docs: develop + cd doc/en; make html + find doc/en/ -name '*.txt' | xargs .env/bin/regendoc + +# upload documentation +upload-docs: develop + cd doc/en; make install diff -r bae41ffae0c4fc5d0e1852e320692d34395a2c90 -r cca9e94489f0ffa7d0b18ceb8dbbef2696377f29 requirements-docs.txt --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,2 @@ +sphinx==1.2.3 +hg+ssh://hg at bitbucket.org/RonnyPfannschmidt/regendoc#egg=regendoc Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 2 21:56:08 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 02 Mar 2015 20:56:08 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 25 Message-ID: <20150302205554.20307.81509@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/25 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3901:cca9e94489f0 Author : Anatoly Bubenkov Branch : parametrized-fixture-override Message: add docs target -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 2 22:07:55 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 02 Mar 2015 21:07:55 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: update regendocs Message-ID: <20150302210755.30795.74001@app06.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/d00b13a069c1/ Changeset: d00b13a069c1 Branch: parametrized-fixture-override User: bubenkoff Date: 2015-03-02 21:07:42+00:00 Summary: update regendocs Affected #: 1 file diff -r cca9e94489f0ffa7d0b18ceb8dbbef2696377f29 -r d00b13a069c1f97b95ac9b45913c6a5e8f6b7bba Makefile --- a/Makefile +++ b/Makefile @@ -16,9 +16,10 @@ # generate documentation docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc cd doc/en; make html - find doc/en/ -name '*.txt' | xargs .env/bin/regendoc # upload documentation upload-docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc --update cd doc/en; make install Repository URL: https://bitbucket.org/pytest-dev/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 Tue Mar 3 06:41:10 2015 From: issues-reply at bitbucket.org (meejah) Date: Tue, 03 Mar 2015 05:41:10 -0000 Subject: [Pytest-commit] Issue #691: move pytest-twisted plugin to pytest organization (pytest-dev/pytest) Message-ID: <20150303054110.9720.36103@app10.ash-private.bitbucket.org> New issue 691: move pytest-twisted plugin to pytest organization https://bitbucket.org/pytest-dev/pytest/issue/691/move-pytest-twisted-plugin-to-pytest meejah: As per a possible-bug I recently filed against the pytest-twisted plugin, it seem its author no longer wishes to maintain it. More details: https://github.com/schmir/pytest-twisted/issues/4 It would be a shame to see it languish, as it has worked for me with Twisted code I've tried it against -- and luckily isn't very much code. Hopefully, pytest can move it to their own organization/repositories etc. From bubenkoff at gmail.com Tue Mar 3 08:51:35 2015 From: bubenkoff at gmail.com (Anatoly Bubenkov) Date: Tue, 3 Mar 2015 08:51:35 +0100 Subject: [Pytest-commit] Issue #691: move pytest-twisted plugin to pytest organization (pytest-dev/pytest) In-Reply-To: <20150303054110.9720.36103@app10.ash-private.bitbucket.org> References: <20150303054110.9720.36103@app10.ash-private.bitbucket.org> Message-ID: this is exactly the case i wanted to eliminate by pushing the pytest-dev I would ask the author to move it under pytest-dev (and add pypi access as well) and then we can properly maintain it? For github, it requires adding him to the pytest-dev team upfront On 3 March 2015 at 06:41, meejah wrote: > New issue 691: move pytest-twisted plugin to pytest organization > > https://bitbucket.org/pytest-dev/pytest/issue/691/move-pytest-twisted-plugin-to-pytest > > meejah: > > As per a possible-bug I recently filed against the pytest-twisted plugin, > it seem its author no longer wishes to maintain it. More details: > > https://github.com/schmir/pytest-twisted/issues/4 > > It would be a shame to see it languish, as it has worked for me with > Twisted code I've tried it against -- and luckily isn't very much code. > Hopefully, pytest can move it to their own organization/repositories etc. > > > _______________________________________________ > pytest-commit mailing list > pytest-commit at python.org > https://mail.python.org/mailman/listinfo/pytest-commit > -- Anatoly Bubenkov -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Sat Mar 7 16:50:36 2015 From: issues-reply at bitbucket.org (henning sprang) Date: Sat, 07 Mar 2015 15:50:36 -0000 Subject: [Pytest-commit] Issue #692: xfail decorator seems not to honour "raises" parameter (pytest-dev/pytest) Message-ID: <20150307155036.10856.26114@app02.ash-private.bitbucket.org> New issue 692: xfail decorator seems not to honour "raises" parameter https://bitbucket.org/pytest-dev/pytest/issue/692/xfail-decorator-seems-not-to-honour-raises henning sprang: When trying to use the pytest "xfail" decorator together with it's "raises" parameter to become aware of changes in the application behaviour when currently dysfunctional part of the application start work again and we'll not get basic technical errors but actual assertion failure (or, eventually, a *different* not yet expected application error), I observe that the raises parameter is no taken into account at all. Whatever I put in there, and whatever reason the test fails inside (error when caling application or asertion, independent of which error or exception is thrown), the test is simply reported as expected to fail - unles it succeeds with absolutely no error and exception, then it's reported as xpassed. See example and discussion there: http://stackoverflow.com/questions/28916186/pytest-using-xfail-together-with-raises-test-keep-xfailiing-though-unexpected?noredirect=1#comment46090691_28916186 From issues-reply at bitbucket.org Sat Mar 7 21:52:30 2015 From: issues-reply at bitbucket.org (Anatoly Bubenkov) Date: Sat, 07 Mar 2015 20:52:30 -0000 Subject: [Pytest-commit] Issue #693: Have a way to skip forcing the test folder to be present in rsyncdirs (pytest-dev/pytest) Message-ID: <20150307205230.27922.86238@app07.ash-private.bitbucket.org> New issue 693: Have a way to skip forcing the test folder to be present in rsyncdirs https://bitbucket.org/pytest-dev/pytest/issue/693/have-a-way-to-skip-forcing-the-test-folder Anatoly Bubenkov: When user wants to avoid the execnet's rsync but instead use for example the native 'rsync' command he's forced to still use execnet's rsync for at least test folder, which slows down the whole test run From issues-reply at bitbucket.org Sun Mar 8 13:55:45 2015 From: issues-reply at bitbucket.org (thiefmaster) Date: Sun, 08 Mar 2015 12:55:45 -0000 Subject: [Pytest-commit] Issue #694: Add a directory whitelist option (pytest-dev/pytest) Message-ID: <20150308125545.22454.65320@app02.ash-private.bitbucket.org> New issue 694: Add a directory whitelist option https://bitbucket.org/pytest-dev/pytest/issue/694/add-a-directory-whitelist-option thiefmaster: Right now you can only blacklist directories using `norecursedirs`. However, especially in larger projects, it might be much nicer to simply whitelist the folders where you know that there are or might be tests. Another advantage of this would be avoiding collisions with people creating virtualenvs e.g. in `projectfolder/env` (personally I always add `env*` to `norecursedirs`, but what if someone uses a different folder for his environment?). Actually, it might make sense if pytest detected virtualenv folders and automatically skipped them... From commits-noreply at bitbucket.org Mon Mar 9 08:10:49 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Mar 2015 07:10:49 -0000 Subject: [Pytest-commit] commit/tox: hpk42: Merged in sontek/tox/fix-force-dep-with-reqs-file-with-pip (pull request #136) Message-ID: <20150309071049.8524.51522@app06.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/1c6afe4646fc/ Changeset: 1c6afe4646fc User: hpk42 Date: 2015-03-09 07:10:45+00:00 Summary: Merged in sontek/tox/fix-force-dep-with-reqs-file-with-pip (pull request #136) Support force dependencies with requirements.txt using pip Affected #: 2 files diff -r 69f9be62ef38ef3dca9a932d79f2df85c834258a -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1423,6 +1423,50 @@ r'*deps=*dep1, dep2==5.0*', ]) + def test_force_dep_with_requirements_txt_file(self, cmd, initproj): + """ + Make sure we can override dependencies configured in external reqs.txt + when using the command line option --force-dep. + """ + initproj("example123-0.5", filedefs={ + 'tox.ini': ''' + [tox] + + [testenv] + deps= + dep1==1.0 + -r{toxinidir}/reqs.txt + ''', + 'reqs.txt': ''' + -e git://hello/world/git#egg=Hello + # comment + dep2>=2.0 # comment + + + -i http://index.local/ + dep3 + dep4==4.0 + -r reqs2.txt + ''', + 'reqs2.txt': ''' + dep5>=2.2 + ''' + }) + config = parseconfig( + ['--force-dep=dep1==1.5', '--force-dep=dep2==2.1', + '--force-dep=dep3==3.0']) + assert config.option.force_dep == [ + 'dep1==1.5', 'dep2==2.1', 'dep3==3.0'] + + deps = config.envconfigs['python'].deps + assert len(deps) == 6 + expected = ['dep1==1.5', 'Hello', 'dep2==2.1', + 'dep3==3.0', 'dep4', 'dep5'] + + for index, dep in enumerate(deps): + assert dep.name == expected[index] + + class TestArgumentParser: def test_dash_e_single_1(self): diff -r 69f9be62ef38ef3dca9a932d79f2df85c834258a -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -9,7 +9,8 @@ import itertools from tox.interpreters import Interpreters - +from pip.req.req_file import parse_requirements +from pip.download import PipSession import py import tox @@ -371,6 +372,8 @@ vc.whitelist_externals = reader.getlist(section, "whitelist_externals") vc.deps = [] + requirement_files = [] + for depline in reader.getlist(section, "deps"): m = re.match(r":(\w+):\s*(\S+)", depline) if m: @@ -379,8 +382,29 @@ else: name = depline.strip() ixserver = None - name = self._replace_forced_dep(name, config) - vc.deps.append(DepConfig(name, ixserver)) + + + # We want to parse requirements.txt files last so that + # we can process them with forced dependencies + if name[:2] == '-r': + fname = name[2:].strip() + requirement_files.append(fname) + else: + name = self._replace_forced_dep(name, config) + vc.deps.append(DepConfig(name, ixserver)) + + pip_session = PipSession() + + for requirement_file in requirement_files: + req_deps = parse_requirements( + requirement_file, + session=pip_session + ) + + for r in req_deps: + name = self._replace_forced_dep(r.name, config) + vc.deps.append(DepConfig(name, ixserver)) + vc.distribute = reader.getbool(section, "distribute", False) vc.sitepackages = self.config.option.sitepackages or \ reader.getbool(section, "sitepackages", False) 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 Mar 9 08:10:48 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Mar 2015 07:10:48 -0000 Subject: [Pytest-commit] commit/tox: 4 new changesets Message-ID: <20150309071048.23068.75471@app10.ash-private.bitbucket.org> 4 new commits in tox: https://bitbucket.org/hpk42/tox/commits/aca6e943ba18/ Changeset: aca6e943ba18 Branch: fix-force-dep-with-reqs-file User: djeebus Date: 2014-11-03 22:50:29+00:00 Summary: Fix issues with external requirements files and force dep Using --force-dep while your [testenv] included a dep similar to "-r{toxinidir}/reqs.txt" would cause an unhandled exception similar to: ValueError: ('Expected version spec in', '-rrequirements-test.txt', 'at', 'requirements-test.txt') Affected #: 2 files diff -r 9d8f0d5319e77951c0542ece53c960dc3b2886e7 -r aca6e943ba184799252b50b31aa08928fb092c0b tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1384,6 +1384,59 @@ r'*deps=*dep1, dep2==5.0*', ]) + def test_force_dep_with_requirements_txt_file(self, cmd, initproj): + """ + Make sure we can override dependencies configured in external reqs.txt + when using the command line option --force-dep. + """ + initproj("example123-0.5", filedefs={ + 'tox.ini': ''' + [tox] + + [testenv] + deps= + dep1==1.0 + -r{toxinidir}/reqs.txt + ''', + 'reqs.txt': ''' + -e git://hello/world/git + dep2>=2.0 + -i http://index.local/ + dep3 + dep4==4.0 + -r reqs2.txt + ''', + 'reqs2.txt': ''' + dep5>=2.2 + ''' + }) + config = parseconfig( + ['--force-dep=dep1==1.5', '--force-dep=dep2==2.1', + '--force-dep=dep3==3.0']) + assert config.option.force_dep == [ + 'dep1==1.5', 'dep2==2.1', 'dep3==3.0'] + + deps = config.envconfigs['python'].deps + assert len(deps) == 2 + assert deps[0].name == 'dep1==1.5' + include_file = deps[1].name + assert include_file.startswith('-r') + with open(include_file[2:]) as reqs: + lines = [x.strip() for x in reqs.readlines()] + assert len(lines) == 6 + second_file = lines.pop(len(lines) - 1) + assert second_file.startswith('-r') + assert lines == [ + '-e git://hello/world/git', + 'dep2==2.1', + '-i http://index.local/', + 'dep3==3.0', + 'dep4==4.0', + ] + with open(second_file[2:]) as reqs2: + lines = [x.strip() for x in reqs2.readlines()] + assert lines == ['dep5>=2.2'] + class TestArgumentParser: def test_dash_e_single_1(self): diff -r 9d8f0d5319e77951c0542ece53c960dc3b2886e7 -r aca6e943ba184799252b50b31aa08928fb092c0b tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -1,4 +1,5 @@ import argparse +import tempfile import os import random import sys @@ -363,6 +364,7 @@ vc.whitelist_externals = reader.getlist(section, "whitelist_externals") vc.deps = [] + reqs_files = [] for depline in reader.getlist(section, "deps"): m = re.match(r":(\w+):\s*(\S+)", depline) if m: @@ -371,8 +373,41 @@ else: name = depline.strip() ixserver = None - name = self._replace_forced_dep(name, config) - vc.deps.append(DepConfig(name, ixserver)) + + if name[:2] == '-r': # not a dependency, but a file full of dependencies + fd, temp_path = tempfile.mkstemp() + reqs_files.append((name[2:].strip(), fd, temp_path)) + vc.deps.append(DepConfig('-r%s' % temp_path)) + elif name[0] == '-': # an option to be sent to pip + vc.deps.append(DepConfig(name, ixserver)) + else: + name = self._replace_forced_dep(name, config) + vc.deps.append(DepConfig(name, ixserver)) + + for reqs_file, fd, temp_path in reqs_files: + lines = [] + with open(reqs_file, 'r') as reqs: + for req in reqs.readlines(): + req = req.strip() + if not req: + continue + + if req.startswith('-'): + if req.startswith('-r'): + new_fd, new_temp_path = tempfile.mkstemp() + reqs_files.append((req[2:].strip(), new_fd, new_temp_path)) + lines.append('-r' + new_temp_path) + else: + lines.append(req) + continue + + name = self._replace_forced_dep(req, config) + lines.append(name) + + with open(temp_path, mode='w') as temp_reqs: + temp_reqs.writelines(os.linesep.join(lines)) + os.close(fd) + vc.distribute = reader.getbool(section, "distribute", False) vc.sitepackages = self.config.option.sitepackages or \ reader.getbool(section, "sitepackages", False) https://bitbucket.org/hpk42/tox/commits/80bb02e004fc/ Changeset: 80bb02e004fc Branch: fix-force-dep-with-reqs-file User: djeebus Date: 2014-11-04 00:51:30+00:00 Summary: Ignore comments Affected #: 2 files diff -r aca6e943ba184799252b50b31aa08928fb092c0b -r 80bb02e004fc52c57997977b5ae1f2255707f497 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1400,7 +1400,10 @@ ''', 'reqs.txt': ''' -e git://hello/world/git - dep2>=2.0 + # comment + dep2>=2.0 # comment + + -i http://index.local/ dep3 dep4==4.0 diff -r aca6e943ba184799252b50b31aa08928fb092c0b -r 80bb02e004fc52c57997977b5ae1f2255707f497 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -400,6 +400,8 @@ else: lines.append(req) continue + elif req.startswith('#'): + continue name = self._replace_forced_dep(req, config) lines.append(name) https://bitbucket.org/hpk42/tox/commits/4f704801ff0a/ Changeset: 4f704801ff0a Branch: fix-force-dep-with-reqs-file-with-pip User: sontek Date: 2015-03-06 00:42:07+00:00 Summary: Support force dependencies with requirements.txt using pip Affected #: 2 files diff -r 80bb02e004fc52c57997977b5ae1f2255707f497 -r 4f704801ff0a8b08ee7addce1cc0ca42c61877cb tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1399,7 +1399,7 @@ -r{toxinidir}/reqs.txt ''', 'reqs.txt': ''' - -e git://hello/world/git + -e git://hello/world/git#egg=Hello # comment dep2>=2.0 # comment @@ -1420,25 +1420,13 @@ 'dep1==1.5', 'dep2==2.1', 'dep3==3.0'] deps = config.envconfigs['python'].deps - assert len(deps) == 2 - assert deps[0].name == 'dep1==1.5' - include_file = deps[1].name - assert include_file.startswith('-r') - with open(include_file[2:]) as reqs: - lines = [x.strip() for x in reqs.readlines()] - assert len(lines) == 6 - second_file = lines.pop(len(lines) - 1) - assert second_file.startswith('-r') - assert lines == [ - '-e git://hello/world/git', - 'dep2==2.1', - '-i http://index.local/', - 'dep3==3.0', - 'dep4==4.0', - ] - with open(second_file[2:]) as reqs2: - lines = [x.strip() for x in reqs2.readlines()] - assert lines == ['dep5>=2.2'] + assert len(deps) == 6 + expected = ['dep1==1.5', 'Hello', 'dep2==2.1', + 'dep3==3.0', 'dep4', 'dep5'] + + for index, dep in enumerate(deps): + assert dep.name == expected[index] + class TestArgumentParser: diff -r 80bb02e004fc52c57997977b5ae1f2255707f497 -r 4f704801ff0a8b08ee7addce1cc0ca42c61877cb tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -1,5 +1,4 @@ import argparse -import tempfile import os import random import sys @@ -10,7 +9,8 @@ import itertools from tox.interpreters import Interpreters - +from pip.req.req_file import parse_requirements +from pip.download import PipSession import py import tox @@ -364,7 +364,8 @@ vc.whitelist_externals = reader.getlist(section, "whitelist_externals") vc.deps = [] - reqs_files = [] + requirement_files = [] + for depline in reader.getlist(section, "deps"): m = re.match(r":(\w+):\s*(\S+)", depline) if m: @@ -374,41 +375,27 @@ name = depline.strip() ixserver = None - if name[:2] == '-r': # not a dependency, but a file full of dependencies - fd, temp_path = tempfile.mkstemp() - reqs_files.append((name[2:].strip(), fd, temp_path)) - vc.deps.append(DepConfig('-r%s' % temp_path)) - elif name[0] == '-': # an option to be sent to pip - vc.deps.append(DepConfig(name, ixserver)) + + # We want to parse requirements.txt files last so that + # we can process them with forced dependencies + if name[:2] == '-r': + fname = name[2:].strip() + requirement_files.append(fname) else: name = self._replace_forced_dep(name, config) vc.deps.append(DepConfig(name, ixserver)) - for reqs_file, fd, temp_path in reqs_files: - lines = [] - with open(reqs_file, 'r') as reqs: - for req in reqs.readlines(): - req = req.strip() - if not req: - continue + pip_session = PipSession() - if req.startswith('-'): - if req.startswith('-r'): - new_fd, new_temp_path = tempfile.mkstemp() - reqs_files.append((req[2:].strip(), new_fd, new_temp_path)) - lines.append('-r' + new_temp_path) - else: - lines.append(req) - continue - elif req.startswith('#'): - continue + for requirement_file in requirement_files: + req_deps = parse_requirements( + requirement_file, + session=pip_session + ) - name = self._replace_forced_dep(req, config) - lines.append(name) - - with open(temp_path, mode='w') as temp_reqs: - temp_reqs.writelines(os.linesep.join(lines)) - os.close(fd) + for r in req_deps: + name = self._replace_forced_dep(r.name, config) + vc.deps.append(DepConfig(name, ixserver)) vc.distribute = reader.getbool(section, "distribute", False) vc.sitepackages = self.config.option.sitepackages or \ https://bitbucket.org/hpk42/tox/commits/1c6afe4646fc/ Changeset: 1c6afe4646fc User: hpk42 Date: 2015-03-09 07:10:45+00:00 Summary: Merged in sontek/tox/fix-force-dep-with-reqs-file-with-pip (pull request #136) Support force dependencies with requirements.txt using pip Affected #: 2 files diff -r 69f9be62ef38ef3dca9a932d79f2df85c834258a -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1423,6 +1423,50 @@ r'*deps=*dep1, dep2==5.0*', ]) + def test_force_dep_with_requirements_txt_file(self, cmd, initproj): + """ + Make sure we can override dependencies configured in external reqs.txt + when using the command line option --force-dep. + """ + initproj("example123-0.5", filedefs={ + 'tox.ini': ''' + [tox] + + [testenv] + deps= + dep1==1.0 + -r{toxinidir}/reqs.txt + ''', + 'reqs.txt': ''' + -e git://hello/world/git#egg=Hello + # comment + dep2>=2.0 # comment + + + -i http://index.local/ + dep3 + dep4==4.0 + -r reqs2.txt + ''', + 'reqs2.txt': ''' + dep5>=2.2 + ''' + }) + config = parseconfig( + ['--force-dep=dep1==1.5', '--force-dep=dep2==2.1', + '--force-dep=dep3==3.0']) + assert config.option.force_dep == [ + 'dep1==1.5', 'dep2==2.1', 'dep3==3.0'] + + deps = config.envconfigs['python'].deps + assert len(deps) == 6 + expected = ['dep1==1.5', 'Hello', 'dep2==2.1', + 'dep3==3.0', 'dep4', 'dep5'] + + for index, dep in enumerate(deps): + assert dep.name == expected[index] + + class TestArgumentParser: def test_dash_e_single_1(self): diff -r 69f9be62ef38ef3dca9a932d79f2df85c834258a -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -9,7 +9,8 @@ import itertools from tox.interpreters import Interpreters - +from pip.req.req_file import parse_requirements +from pip.download import PipSession import py import tox @@ -371,6 +372,8 @@ vc.whitelist_externals = reader.getlist(section, "whitelist_externals") vc.deps = [] + requirement_files = [] + for depline in reader.getlist(section, "deps"): m = re.match(r":(\w+):\s*(\S+)", depline) if m: @@ -379,8 +382,29 @@ else: name = depline.strip() ixserver = None - name = self._replace_forced_dep(name, config) - vc.deps.append(DepConfig(name, ixserver)) + + + # We want to parse requirements.txt files last so that + # we can process them with forced dependencies + if name[:2] == '-r': + fname = name[2:].strip() + requirement_files.append(fname) + else: + name = self._replace_forced_dep(name, config) + vc.deps.append(DepConfig(name, ixserver)) + + pip_session = PipSession() + + for requirement_file in requirement_files: + req_deps = parse_requirements( + requirement_file, + session=pip_session + ) + + for r in req_deps: + name = self._replace_forced_dep(r.name, config) + vc.deps.append(DepConfig(name, ixserver)) + vc.distribute = reader.getbool(section, "distribute", False) vc.sitepackages = self.config.option.sitepackages or \ reader.getbool(section, "sitepackages", False) 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 Mar 9 08:13:19 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 09 Mar 2015 07:13:19 -0000 Subject: [Pytest-commit] commit/tox: hpk42: add changelog and bump to dev version Message-ID: <20150309071319.30802.45294@app09.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/2bb340a10c90/ Changeset: 2bb340a10c90 User: hpk42 Date: 2015-03-09 07:13:11+00:00 Summary: add changelog and bump to dev version allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. Affected #: 3 files diff -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b -r 2bb340a10c90ec5f617013035e66a2a12ad27042 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +DEV +----------- + +- allow --force-deps to override dependencies in "-r" requirements + files. Thanks Sontek for the PR. + + 1.9.0 ----------- diff -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b -r 2bb340a10c90ec5f617013035e66a2a12ad27042 setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.0', + version='1.9.1.dev1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 1c6afe4646fcd4ccc8a6e4c20cc8bc19d6a4549b -r 2bb340a10c90ec5f617013035e66a2a12ad27042 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.0' +__version__ = '1.9.1.dev1' class exception: class Error(Exception): Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Mon Mar 9 17:22:18 2015 From: issues-reply at bitbucket.org (Alec Reiter) Date: Mon, 09 Mar 2015 16:22:18 -0000 Subject: [Pytest-commit] Issue #695: pytest.mark.parameterize "fixture input not found" (pytest-dev/pytest) Message-ID: <20150309162218.7271.46056@app03.ash-private.bitbucket.org> New issue 695: pytest.mark.parameterize "fixture input not found" https://bitbucket.org/pytest-dev/pytest/issue/695/pytestmarkparameterize-fixture-input-not Alec Reiter: I'm writing tests for a small library and I decided to use py.test after hearing so many good things about it. However, `pytest.mark.parameterize` is giving me some issues. At first, I thought maybe I just mismatched some parens and it went off looking for a fixture elsewhere. So I decided to start with the given example of parameterize: @pytest.mark.parametrize("input,expected", [ ("3+5", 8), ("2+4", 6), ("6*9", 42), ]) def test_eval(input, expected): assert eval(input) == expected But this gives the same error: > fixture 'input' not found > > available fixtures: capfd, pytestconfig, recwarn, capsys, tmpdir, monkeypatch > > use 'py.test --fixtures [testpath]' for help on them. I went off googling, but I couldn't find any answers that applied. Any ideas on how to approach this? I'm running Python 3.4.0 and py.test 2.6.4 inside of a virtualenv. From issues-reply at bitbucket.org Wed Mar 11 15:40:34 2015 From: issues-reply at bitbucket.org (BEN ZID ELGUEBSI Wael) Date: Wed, 11 Mar 2015 14:40:34 -0000 Subject: [Pytest-commit] Issue #226: ImportError: No module named 'httplib' in Python 3 (hpk42/tox) Message-ID: <20150311144034.12849.93851@app01.ash-private.bitbucket.org> New issue 226: ImportError: No module named 'httplib' in Python 3 https://bitbucket.org/hpk42/tox/issue/226/importerror-no-module-named-httplib-in BEN ZID ELGUEBSI Wael: Description of problem: When I run tox for python 3 envs I got an error, below a copy of traceback: tox -e py33 GLOB sdist-make: /home/wael/workspace/octopus/setup.py py33 inst-nodeps: /home/wael/workspace/octopus/.tox/dist/octopus-0.0.1.zip ERROR: invocation failed (exit code 1), logfile: /home/wael/workspace/octopus/.tox/py33/log/py33-6.log ERROR: actionid=py33 msg=installpkg cmdargs=[local('/home/wael/workspace/octopus/.tox/py33/bin/pip'), 'install', '--pre', '-U', '--no-deps', '/home/wael/workspace/octopus/.tox/dist/octopus-0.0.1.zip'] env={'INSTANCE': '', 'LC_NUMERIC': 'fr_FR.UTF-8', 'QT_IM_MODULE': 'ibus', 'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'USER': 'wael', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/wael', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LC_IDENTIFICATION': 'fr_FR.UTF-8', 'PYTHONHASHSEED': '3674672355', 'LC_CTYPE': 'fr_FR.UTF-8', 'XDG_CURRENT_DESKTOP': 'Unity', 'XDG_VTNR': '7', 'SESSION': 'ubuntu', 'LOGNAME': 'wael', 'XDG_SEAT': 'seat0', 'GNOME_KEYRING_CONTROL': '/run/user/1000/keyring-UJ7VW1', 'LC_PAPER': 'fr_FR.UTF-8', 'PATH': '/home/wael/workspace/octopus/.tox/py33/bin:/home/wael/virtualenvs/octopus/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'VIRTUALENVWRAPPER_SCRIPT': '/usr/local/bin/virtualenvwrapper.sh', 'ZSH': '/home/wael/.oh-my-zsh', 'DISPLAY': ':0', 'LANG': 'fr_FR.UTF-8', 'TERM': 'xterm', 'SHELL': '/usr/bin/zsh', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY': '/home/wael/.Xauthority', 'LAN GUAGE': 'fr:en', 'SESSION_MANAGER': 'local/PC:@/tmp/.ICE-unix/2204,unix/PC:/tmp/.ICE-unix/2204', 'LC_MEASUREMENT': 'fr_FR.UTF-8', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'TERMINATOR_UUID': 'urn:uuid:1f58a712-971f-41dc-9dc1-973bb4233ac6', 'JOB': 'dbus', 'COMPIZ_BIN_PATH': '/usr/bin/', 'TEXTDOMAIN': 'im-config', 'QT4_IM_MODULE': 'xim', 'CLUTTER_IM_MODULE': 'xim', 'WINDOWID': '33554436', 'ORBIT_SOCKETDIR': '/tmp/orbit-wael', 'SESSIONTYPE': 'gnome-session', 'IM_CONFIG_PHASE': '1', 'GIO_LAUNCHED_DESKTOP_FILE_PID': '2287', 'GPG_AGENT_INFO': '/run/user/1000/keyring-UJ7VW1/gpg:0:1', 'HOME': '/home/wael', 'SELINUX_INIT': 'YES', 'WORKON_HOME': '/home/wael/virtualenvs', 'GIO_LAUNCHED_DESKTOP_FILE': '/usr/share/applications/compiz.desktop', 'XDG_RUNTIME_DIR': '/run/user/1000', 'GTK_IM_MODULE': 'ibus', 'LC_ADDRESS': 'fr_FR.UTF-8', 'PYTHONPATH': '/home/wael/workspace/octopus:/home/wael/workspace/octopus/octopus', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'SHLVL': '1', 'VIRTUA L_ENV': '/home/wael/workspace/octopus/.tox/py33', 'SSH_AUTH_SOCK': '/run/user/1000/keyring-UJ7VW1/ssh', 'GDMSESSION': 'ubuntu', 'XMODIFIERS': '@im=ibus', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'PIP_VIRTUALENV_BASE': '/home/wael/virtualenvs', 'PS1': '(octopus)${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'XDG_SESSION_ID': 'c2', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-A1zexIdLIP', '_': '/home/wael/virtualenvs/octopus/bin/tox', 'GNOME_KEYRING_PID': '1996', 'VIRTUALENVWRAPPER_PROJECT_FILENAME': '.project', 'DESKTOP_SESSION': 'ubuntu', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'VIRTUALENVWRAPPER_HOOK_DIR': '/home/wael/virtualenvs', 'OLDPWD': '/home/wael/workspa ce/octopus/octopus/utils', 'GDM_LANG': 'fr', 'LC_TELEPHONE': 'fr_FR.UTF-8', 'GTK_MODULES': 'overlay-scrollbar:unity-gtk-module', 'LC_MONETARY': 'fr_FR.UTF-8', 'PWD': '/home/wael/workspace/octopus', 'TEXTDOMAINDIR': '/usr/share/locale/', 'COLORTERM': 'gnome-terminal', 'LC_NAME': 'fr_FR.UTF-8', 'XDG_MENU_PREFIX': 'gnome-', 'LC_TIME': 'fr_FR.UTF-8', 'LESS': '-R', 'PAGER': 'less', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/1000/2003'} Traceback (most recent call last): File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 9, in from http.client import HTTPConnection as _HTTPConnection, HTTPException ImportError: No module named 'http.client' During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".tox/py33/bin/pip", line 7, in from pip import main File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/__init__.py", line 15, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/vcs/mercurial.py", line 11, in from pip.download import path_to_url File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/download.py", line 30, in from pip._vendor import requests, six File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/__init__.py", line 58, in from . import utils File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/utils.py", line 26, in from .compat import parse_http_list as _parse_list_header File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/compat.py", line 7, in from .packages import chardet File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in from . import urllib3 File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 10, in from .connectionpool import ( File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 31, in from .connection import ( File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 11, in from httplib import HTTPConnection as _HTTPConnection, HTTPException ImportError: No module named 'httplib' ____________________________________________________________________ summary ____________________________________________________________________ ERROR: py33: InvocationError: /home/wael/workspace/octopus/.tox/py33/bin/pip install --pre -U --no-deps /home/wael/workspace/octopus/.tox/dist/octopus-0.0.1.zip (see /home/wael/workspace/octopus/.tox/py33/log/py33-6.log) (octopus)? octopus git:(request) ? tox -e py33 GLOB sdist-make: /home/wael/workspace/octopus/setup.py py33 recreate: /home/wael/workspace/octopus/.tox/py33 py33 installdeps: -r/home/wael/workspace/octopus/requirements/tox.txt ERROR: invocation failed (exit code 1), logfile: /home/wael/workspace/octopus/.tox/py33/log/py33-1.log ERROR: actionid=py33 msg=getenv cmdargs=[local('/home/wael/workspace/octopus/.tox/py33/bin/pip'), 'install', '--pre', '-r/home/wael/workspace/octopus/requirements/tox.txt'] env={'INSTANCE': '', 'LC_NUMERIC': 'fr_FR.UTF-8', 'QT_IM_MODULE': 'ibus', 'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'USER': 'wael', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/wael', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LC_IDENTIFICATION': 'fr_FR.UTF-8', 'PYTHONHASHSEED': '3695560043', 'LC_CTYPE': 'fr_FR.UTF-8', 'XDG_CURRENT_DESKTOP': 'Unity', 'XDG_VTNR': '7', 'SESSION': 'ubuntu', 'LOGNAME': 'wael', 'XDG_SEAT': 'seat0', 'GNOME_KEYRING_CONTROL': '/run/user/1000/keyring-UJ7VW1', 'LC_PAPER': 'fr_FR.UTF-8', 'PATH': '/home/wael/workspace/octopus/.tox/py33/bin:/home/wael/virtualenvs/octopus/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'VIRTUALENVWRAPPER_SCRIPT': '/usr/local/bin/virtualenvwrapper.sh', 'ZSH': '/home/wael/.oh-my-zsh', 'DISPLAY': ':0', 'LANG': 'fr_FR.UTF-8', 'TERM': 'xterm', 'SHELL': '/usr/bin/zsh', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY': '/home/wael/.Xauthority', 'LAN GUAGE': 'fr:en', 'SESSION_MANAGER': 'local/PC:@/tmp/.ICE-unix/2204,unix/PC:/tmp/.ICE-unix/2204', 'LC_MEASUREMENT': 'fr_FR.UTF-8', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'TERMINATOR_UUID': 'urn:uuid:1f58a712-971f-41dc-9dc1-973bb4233ac6', 'JOB': 'dbus', 'COMPIZ_BIN_PATH': '/usr/bin/', 'TEXTDOMAIN': 'im-config', 'QT4_IM_MODULE': 'xim', 'CLUTTER_IM_MODULE': 'xim', 'WINDOWID': '33554436', 'ORBIT_SOCKETDIR': '/tmp/orbit-wael', 'SESSIONTYPE': 'gnome-session', 'IM_CONFIG_PHASE': '1', 'GIO_LAUNCHED_DESKTOP_FILE_PID': '2287', 'GPG_AGENT_INFO': '/run/user/1000/keyring-UJ7VW1/gpg:0:1', 'HOME': '/home/wael', 'SELINUX_INIT': 'YES', 'WORKON_HOME': '/home/wael/virtualenvs', 'GIO_LAUNCHED_DESKTOP_FILE': '/usr/share/applications/compiz.desktop', 'XDG_RUNTIME_DIR': '/run/user/1000', 'GTK_IM_MODULE': 'ibus', 'LC_ADDRESS': 'fr_FR.UTF-8', 'PYTHONPATH': '/home/wael/workspace/octopus:/home/wael/workspace/octopus/octopus', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'SHLVL': '1', 'VIRTUA L_ENV': '/home/wael/workspace/octopus/.tox/py33', 'SSH_AUTH_SOCK': '/run/user/1000/keyring-UJ7VW1/ssh', 'GDMSESSION': 'ubuntu', 'XMODIFIERS': '@im=ibus', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'PIP_VIRTUALENV_BASE': '/home/wael/virtualenvs', 'PS1': '(octopus)${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'XDG_SESSION_ID': 'c2', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-A1zexIdLIP', '_': '/home/wael/virtualenvs/octopus/bin/tox', 'GNOME_KEYRING_PID': '1996', 'VIRTUALENVWRAPPER_PROJECT_FILENAME': '.project', 'DESKTOP_SESSION': 'ubuntu', 'LSCOLORS': 'Gxfxcxdxbxegedabagacad', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'VIRTUALENVWRAPPER_HOOK_DIR': '/home/wael/virtualenvs', 'OLDPWD': '/home/wael/workspa ce/octopus/octopus/utils', 'GDM_LANG': 'fr', 'LC_TELEPHONE': 'fr_FR.UTF-8', 'GTK_MODULES': 'overlay-scrollbar:unity-gtk-module', 'LC_MONETARY': 'fr_FR.UTF-8', 'PWD': '/home/wael/workspace/octopus', 'TEXTDOMAINDIR': '/usr/share/locale/', 'COLORTERM': 'gnome-terminal', 'LC_NAME': 'fr_FR.UTF-8', 'XDG_MENU_PREFIX': 'gnome-', 'LC_TIME': 'fr_FR.UTF-8', 'LESS': '-R', 'PAGER': 'less', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/1000/2003'} Traceback (most recent call last): File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 9, in from http.client import HTTPConnection as _HTTPConnection, HTTPException ImportError: No module named 'http.client' During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".tox/py33/bin/pip", line 7, in from pip import main File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/__init__.py", line 15, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/vcs/mercurial.py", line 11, in from pip.download import path_to_url File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/download.py", line 30, in from pip._vendor import requests, six File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/__init__.py", line 58, in from . import utils File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/utils.py", line 26, in from .compat import parse_http_list as _parse_list_header File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/compat.py", line 7, in from .packages import chardet File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/__init__.py", line 3, in from . import urllib3 File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py", line 10, in from .connectionpool import ( File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 31, in from .connection import ( File "/home/wael/workspace/octopus/.tox/py33/lib/python3.3/site-packages/pip/_vendor/requests/packages/urllib3/connection.py", line 11, in from httplib import HTTPConnection as _HTTPConnection, HTTPException ImportError: No module named 'httplib' ERROR: could not install deps [-r/home/wael/workspace/octopus/requirements/tox.txt]; v = InvocationError('/home/wael/workspace/octopus/.tox/py33/bin/pip install --pre -r/home/wael/workspace/octopus/requirements/tox.txt (see /home/wael/workspace/octopus/.tox/py33/log/py33-1.log)', 1) ____________________________________________________________________ summary ____________________________________________________________________ ERROR: py33: could not install deps [-r/home/wael/workspace/octopus/requirements/tox.txt]; v = InvocationError('/home/wael/workspace/octopus/.tox/py33/bin/pip install --pre -r/home/wael/workspace/octopus/requirements/tox.txt (see /home/wael/workspace/octopus/.tox/py33/log/py33-1.log)', 1) From issues-reply at bitbucket.org Wed Mar 11 19:59:51 2015 From: issues-reply at bitbucket.org (Marc-Andre Lemburg) Date: Wed, 11 Mar 2015 18:59:51 -0000 Subject: [Pytest-commit] Issue #227: tox doesn't work with pyrun (hpk42/tox) Message-ID: <20150311185951.13113.37382@app09.ash-private.bitbucket.org> New issue 227: tox doesn't work with pyrun https://bitbucket.org/hpk42/tox/issue/227/tox-doesnt-work-with-pyrun Marc-Andre Lemburg: When running tox, it sets up a virtualenv using the command line: -mvirtualenv --setuptools --python py27 This works with CPython, but is not really in line with the documented use of the -m option: -m mod : run library module as a script (terminates option list) pyrun uses a different command line parser, since it has to emulate the CPython in Python and does not know how to handle options which use arguments without separating space. Could this be changed to use "-m virtualenv" instead, to be in line with the Python documentation ? From commits-noreply at bitbucket.org Wed Mar 11 20:32:09 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Mar 2015 19:32:09 -0000 Subject: [Pytest-commit] commit/tox: hpk42: fix issue227: use "-m virtualenv" instead of "-m virtualenv" to make Message-ID: <20150311193209.32156.98245@app05.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/338b48333f7c/ Changeset: 338b48333f7c User: hpk42 Date: 2015-03-11 19:31:47+00:00 Summary: fix issue227: use "-m virtualenv" instead of "-m virtualenv" to make it work with pyrun. Affected #: 4 files diff -r 2bb340a10c90ec5f617013035e66a2a12ad27042 -r 338b48333f7cd3a4eab570498d93f69177ef8fb9 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,9 @@ - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. +- fix issue227: use "-m virtualenv" instead of "-m virtualenv" to make + it work with pyrun. + 1.9.0 ----------- diff -r 2bb340a10c90ec5f617013035e66a2a12ad27042 -r 338b48333f7cd3a4eab570498d93f69177ef8fb9 setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.1.dev1', + version='1.9.1.dev2', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 2bb340a10c90ec5f617013035e66a2a12ad27042 -r 338b48333f7cd3a4eab570498d93f69177ef8fb9 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.1.dev1' +__version__ = '1.9.1.dev2' class exception: class Error(Exception): diff -r 2bb340a10c90ec5f617013035e66a2a12ad27042 -r 338b48333f7cd3a4eab570498d93f69177ef8fb9 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -178,7 +178,7 @@ action = self.session.newaction(self, "create") config_interpreter = self.getsupportedinterpreter() - args = [sys.executable, '-mvirtualenv'] + args = [sys.executable, '-m', 'virtualenv'] if self.envconfig.distribute: args.append("--distribute") else: 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 Wed Mar 11 20:37:36 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Mar 2015 19:37:36 -0000 Subject: [Pytest-commit] commit/tox: hpk42: fix tests for "-m" virtualenv change of last commit Message-ID: <20150311193736.24818.8978@app13.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/013eceeffdfb/ Changeset: 013eceeffdfb User: hpk42 Date: 2015-03-11 19:37:30+00:00 Summary: fix tests for "-m" virtualenv change of last commit Affected #: 1 file diff -r 338b48333f7cd3a4eab570498d93f69177ef8fb9 -r 013eceeffdfbc0383ba7cd7d8efd27da46aeaba5 tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -55,7 +55,7 @@ l = mocksession._pcalls assert len(l) >= 1 args = l[0].args - assert "virtualenv" in str(args[1]) + assert "virtualenv" == str(args[2]) if sys.platform != "win32": # realpath is needed for stuff like the debian symlinks assert py.path.local(sys.executable).realpath() \ @@ -347,7 +347,7 @@ l = mocksession._pcalls assert len(l) == 1 args = l[0].args - assert str(args[1]).endswith('virtualenv') + assert str(args[2]) == 'virtualenv' l[:] = [] action = mocksession.newaction(venv, "hello") venv._install(["hello"], action=action) 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 Wed Mar 11 20:38:19 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Wed, 11 Mar 2015 19:38:19 -0000 Subject: [Pytest-commit] commit/tox: hpk42: fix changelog entry (sigh) Message-ID: <20150311193819.1907.46296@app02.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/aa5b7ce560ca/ Changeset: aa5b7ce560ca User: hpk42 Date: 2015-03-11 19:38:10+00:00 Summary: fix changelog entry (sigh) Affected #: 1 file diff -r 013eceeffdfbc0383ba7cd7d8efd27da46aeaba5 -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. -- fix issue227: use "-m virtualenv" instead of "-m virtualenv" to make +- fix issue227: use "-m virtualenv" instead of "-mvirtualenv" to make it work with pyrun. Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Wed Mar 11 21:22:01 2015 From: issues-reply at bitbucket.org (Marc-Andre Lemburg) Date: Wed, 11 Mar 2015 20:22:01 -0000 Subject: [Pytest-commit] Issue #228: tox doesn't work with older pip versions like 1.4.1 (hpk42/tox) Message-ID: <20150311202201.7632.53507@app05.ash-private.bitbucket.org> New issue 228: tox doesn't work with older pip versions like 1.4.1 https://bitbucket.org/hpk42/tox/issue/228/tox-doesnt-work-with-older-pip-versions Marc-Andre Lemburg: When running bin/tox with pip 1.4.1 (and pyrun) you get: Could not run 'bin/tox': No module named req_file Looking into the code, this line is causing it: lib/python2.7/site-packages/tox/_config.py: -- from pip.req.req_file import parse_requirements The current pip does come with a req_file module. It was added in Jan 2014 and released in version 6.0 of pip. The setup.py of tox does not define a dependency on pip: https://bitbucket.org/hpk42/tox/src/aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac/setup.py?at=default I guess it would be good to define the minimum version with which tox works. From commits-noreply at bitbucket.org Thu Mar 12 02:04:29 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 01:04:29 -0000 Subject: [Pytest-commit] commit/pytest: gutworth: update website sidebar links for repo move Message-ID: <20150312010429.3721.16329@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/b87ee369d93f/ Changeset: b87ee369d93f Branch: link-update User: gutworth Date: 2015-03-12 01:04:14+00:00 Summary: update website sidebar links for repo move Affected #: 1 file diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r b87ee369d93f6d7d80862aa174355551512f22db doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -3,9 +3,9 @@
  • The pytest Website
  • Contribution Guide
  • pytest @ PyPI
  • -
  • pytest @ Bitbucket
  • +
  • pytest @ Bitbucket
  • 3rd party plugins
  • -
  • Issue Tracker
  • +
  • Issue Tracker
  • PDF Documentation Repository URL: https://bitbucket.org/pytest-dev/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 Mar 12 08:11:49 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 07:11:49 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: Close branch link-update Message-ID: <20150312071149.31777.27087@app05.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/0162a268d2c6/ Changeset: 0162a268d2c6 Branch: link-update User: bubenkoff Date: 2015-03-12 07:11:46+00:00 Summary: Close branch link-update Affected #: 0 files Repository URL: https://bitbucket.org/pytest-dev/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 Mar 12 08:11:49 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 07:11:49 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: Merged in link-update (pull request #261) Message-ID: <20150312071149.19743.27030@app01.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/9789d975ff2b/ Changeset: 9789d975ff2b User: bubenkoff Date: 2015-03-12 07:11:46+00:00 Summary: Merged in link-update (pull request #261) update website sidebar links for repo move Affected #: 1 file diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r 9789d975ff2b60c072739800815f9ee0acef9408 doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -3,9 +3,9 @@
  • The pytest Website
  • Contribution Guide
  • pytest @ PyPI
  • -
  • pytest @ Bitbucket
  • +
  • pytest @ Bitbucket
  • 3rd party plugins
  • -
  • Issue Tracker
  • +
  • Issue Tracker
  • PDF Documentation Repository URL: https://bitbucket.org/pytest-dev/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 Mar 12 08:12:46 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 07:12:46 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: Merged in blueyed/pytest/strip-docstrings-from-fixtures (pull request #260) Message-ID: <20150312071246.26618.84708@app07.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/0bbfc95355d7/ Changeset: 0bbfc95355d7 User: bubenkoff Date: 2015-03-12 07:12:43+00:00 Summary: Merged in blueyed/pytest/strip-docstrings-from-fixtures (pull request #260) Strip docstrings in output with `--fixtures` Affected #: 2 files diff -r 9789d975ff2b60c072739800815f9ee0acef9408 -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -979,7 +979,7 @@ loc = getlocation(fixturedef.func, curdir) doc = fixturedef.func.__doc__ or "" if doc: - for line in doc.split("\n"): + for line in doc.strip().split("\n"): tw.line(" " + line.strip()) else: tw.line(" %s: no docstring available" %(loc,), diff -r 9789d975ff2b60c072739800815f9ee0acef9408 -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -500,7 +500,7 @@ reprec.assertoutcome(passed=3) def test_fixtures_sub_subdir_normalize_sep(self, testdir): - # this tests that normlization of nodeids takes place + # this tests that normalization of nodeids takes place b = testdir.mkdir("tests").mkdir("unit") b.join("conftest.py").write(py.code.Source(""" def pytest_funcarg__arg1(): @@ -2323,6 +2323,36 @@ *hello world* """) + def test_show_fixtures_trimmed_doc(self, testdir): + p = testdir.makepyfile(''' + import pytest + @pytest.fixture + def arg1(): + """ + line1 + line2 + + """ + @pytest.fixture + def arg2(): + """ + line1 + line2 + + """ + ''') + result = testdir.runpytest("--fixtures", p) + mark = dedent(""" + ------------- fixtures defined from test_show_fixtures_trimmed_doc ------------- + arg2 + line1 + line2 + arg1 + line1 + line2 + + """) + assert mark in result.stdout.str() class TestContextManagerFixtureFuncs: Repository URL: https://bitbucket.org/pytest-dev/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 Mar 12 08:12:46 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 07:12:46 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20150312071246.10373.2494@app08.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/252c230133fd/ Changeset: 252c230133fd Branch: strip-docstrings-from-fixtures User: blueyed Date: 2015-03-04 16:00:24+00:00 Summary: Strip docstrings in output with `--fixtures` Fixes https://bitbucket.org/pytest-dev/pytest/issue/550. Affected #: 2 files diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r 252c230133fd19679e56e855bff4284786feaed1 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -979,7 +979,7 @@ loc = getlocation(fixturedef.func, curdir) doc = fixturedef.func.__doc__ or "" if doc: - for line in doc.split("\n"): + for line in doc.strip().split("\n"): tw.line(" " + line.strip()) else: tw.line(" %s: no docstring available" %(loc,), diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r 252c230133fd19679e56e855bff4284786feaed1 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -500,7 +500,7 @@ reprec.assertoutcome(passed=3) def test_fixtures_sub_subdir_normalize_sep(self, testdir): - # this tests that normlization of nodeids takes place + # this tests that normalization of nodeids takes place b = testdir.mkdir("tests").mkdir("unit") b.join("conftest.py").write(py.code.Source(""" def pytest_funcarg__arg1(): @@ -2323,6 +2323,36 @@ *hello world* """) + def test_show_fixtures_trimmed_doc(self, testdir): + p = testdir.makepyfile(''' + import pytest + @pytest.fixture + def arg1(): + """ + line1 + line2 + + """ + @pytest.fixture + def arg2(): + """ + line1 + line2 + + """ + ''') + result = testdir.runpytest("--fixtures", p) + mark = dedent(""" + ------------- fixtures defined from test_show_fixtures_trimmed_doc ------------- + arg2 + line1 + line2 + arg1 + line1 + line2 + + """) + assert mark in result.stdout.str() class TestContextManagerFixtureFuncs: https://bitbucket.org/pytest-dev/pytest/commits/0bbfc95355d7/ Changeset: 0bbfc95355d7 User: bubenkoff Date: 2015-03-12 07:12:43+00:00 Summary: Merged in blueyed/pytest/strip-docstrings-from-fixtures (pull request #260) Strip docstrings in output with `--fixtures` Affected #: 2 files diff -r 9789d975ff2b60c072739800815f9ee0acef9408 -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -979,7 +979,7 @@ loc = getlocation(fixturedef.func, curdir) doc = fixturedef.func.__doc__ or "" if doc: - for line in doc.split("\n"): + for line in doc.strip().split("\n"): tw.line(" " + line.strip()) else: tw.line(" %s: no docstring available" %(loc,), diff -r 9789d975ff2b60c072739800815f9ee0acef9408 -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -500,7 +500,7 @@ reprec.assertoutcome(passed=3) def test_fixtures_sub_subdir_normalize_sep(self, testdir): - # this tests that normlization of nodeids takes place + # this tests that normalization of nodeids takes place b = testdir.mkdir("tests").mkdir("unit") b.join("conftest.py").write(py.code.Source(""" def pytest_funcarg__arg1(): @@ -2323,6 +2323,36 @@ *hello world* """) + def test_show_fixtures_trimmed_doc(self, testdir): + p = testdir.makepyfile(''' + import pytest + @pytest.fixture + def arg1(): + """ + line1 + line2 + + """ + @pytest.fixture + def arg2(): + """ + line1 + line2 + + """ + ''') + result = testdir.runpytest("--fixtures", p) + mark = dedent(""" + ------------- fixtures defined from test_show_fixtures_trimmed_doc ------------- + arg2 + line1 + line2 + arg1 + line1 + line2 + + """) + assert mark in result.stdout.str() class TestContextManagerFixtureFuncs: Repository URL: https://bitbucket.org/pytest-dev/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Thu Mar 12 11:41:23 2015 From: issues-reply at bitbucket.org (Vladislav Turbanov) Date: Thu, 12 Mar 2015 10:41:23 -0000 Subject: [Pytest-commit] Issue #696: 'ConftestImportFailure' when running in a LoopOnFail mode. (pytest-dev/pytest) Message-ID: <20150312104123.22594.24867@app14.ash-private.bitbucket.org> New issue 696: 'ConftestImportFailure' when running in a LoopOnFail mode. https://bitbucket.org/pytest-dev/pytest/issue/696/conftestimportfailure-when-running-in-a Vladislav Turbanov: Getting the following error, when running with an `-f` or `--looponfail` flags. Currently, I'm solving this with `export PYTHONPATH=` ``` #!bash $ py.test --looponfail Traceback (most recent call last): File "P:\msys64\mingw64\bin\py.test-script.py", line 9, in load_entry_point('pytest==2.6.4', 'console_scripts', 'py.test')() File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 41, in main return config.hook.pytest_cmdline_main(config=config) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 413, in __call__ return self._docall(methods, kwargs) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 424, in _docall res = mc.execute() File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 315, in execute res = method(**kwargs) File "P:/msys64/mingw64/lib/python2.7/site-packages/xdist/plugin.py", line 58, in pytest_cmdline_main looponfail_main(config) File "P:/msys64/mingw64/lib/python2.7/site-packages/xdist/looponfail.py", line 20, in looponfail_main remotecontrol.loop_once() File "P:/msys64/mingw64/lib/python2.7/site-packages/xdist/looponfail.py", line 87, in loop_once result = self.runsession() File "P:/msys64/mingw64/lib/python2.7/site-packages/xdist/looponfail.py", line 76, in runsession return self.channel.receive() File "P:/msys64/mingw64/lib/python2.7/site-packages/execnet/gateway_base.py", line 711, in receive raise self._getremoteerror() or EOFError() execnet.gateway_base.RemoteError: Traceback (most recent call last): File "P:/msys64/mingw64/lib/python2.7/site-packages/execnet/gateway_base.py", line 1043, in executetask function(channel, **kwargs) File "", line 17, in init_slave_session File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 666, in fromdictargs config._preparse(args, addopts=False) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 719, in _preparse args=args, parser=self._parser) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 413, in __call__ return self._docall(methods, kwargs) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 424, in _docall res = mc.execute() File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 315, in execute res = method(**kwargs) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/capture.py", line 52, in pytest_load_initial_conftests return __multicall__.execute() File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/core.py", line 315, in execute res = method(**kwargs) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 692, in pytest_load_initial_conftests self._conftest.setinitial(early_config.known_args_namespace) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 498, in setinitial self._try_load_conftest(anchor) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 509, in _try_load_conftest self.getconftestmodules(x) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 521, in getconftestmodules mod = self.importconftest(conftestpath) File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/config.py", line 545, in importconftest raise ConftestImportFailure(conftestpath, sys.exc_info()) ConftestImportFailure: (local('P:/projects.local/vdt/software/GameToolSet/Hg/GTGenerator/tests/conftest.py'), (, ImportError('No module named gtgen',), )) ``` From commits-noreply at bitbucket.org Thu Mar 12 13:40:59 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 12:40:59 -0000 Subject: [Pytest-commit] commit/pytest: nicoddemus: Close branch parametrized-fixture-override Message-ID: <20150312124059.10560.44072@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/89ce2fa326a6/ Changeset: 89ce2fa326a6 Branch: parametrized-fixture-override User: nicoddemus Date: 2015-03-12 12:40:56+00:00 Summary: Close branch parametrized-fixture-override Affected #: 0 files Repository URL: https://bitbucket.org/pytest-dev/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 Mar 12 13:41:00 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 12 Mar 2015 12:41:00 -0000 Subject: [Pytest-commit] commit/pytest: nicoddemus: Merged in parametrized-fixture-override (pull request #257) Message-ID: <20150312124100.2413.55013@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/da9d03b1f91d/ Changeset: da9d03b1f91d User: nicoddemus Date: 2015-03-12 12:40:56+00:00 Summary: Merged in parametrized-fixture-override (pull request #257) allow to override parametrized fixtures with non-parametrized ones and vice versa Affected #: 10 files diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,10 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- -- fix issue616: conftest.py files and their contained fixutres are now +- fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. - Many thanks to Eric Siegerman and his PR235 which contains + Many thanks to Eric Siegerman and his PR235 which contains systematic tests for conftest visibility and now passes. This change also introduces the concept of a ``rootdir`` which is printed as a new pytest header and documented in the pytest @@ -12,7 +12,7 @@ - change reporting of "diverted" tests, i.e. tests that are collected in one file but actually come from another (e.g. when tests in a test class - come from a base class in a different file). We now show the nodeid + come from a base class in a different file). We now show the nodeid and indicate via a postfix the other file. - add ability to set command line options by environment variable PYTEST_ADDOPTS. @@ -24,7 +24,7 @@ - fix issue650: new option ``--docttest-ignore-import-errors`` which will turn import errors in doctests into skips. Thanks Charles Cloud for the complete PR. - + - fix issue655: work around different ways that cause python2/3 to leak sys.exc_info into fixtures/tests causing failures in 3rd party code @@ -55,6 +55,7 @@ - "python_classes" and "python_functions" options now support glob-patterns for test discovery, as discussed in issue600. Thanks Ldiary Translations. +- allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). 2.6.4 ---------- diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -30,8 +30,8 @@ mail pointing to your existing pytest plugin repository which must have the following: -- PyPI presence with a ``setup.py`` that contains a license, ``pytest-`` - prefixed, version number, authors, short and long description. +- PyPI presence with a ``setup.py`` that contains a license, ``pytest-`` + prefixed, version number, authors, short and long description. - a ``tox.ini`` for running tests using `tox `_. @@ -43,7 +43,7 @@ If no contributor strongly objects and two agree, the repo will be transferred to the ``pytest-dev`` organisation and you'll become a -member of the ``pytest-dev`` team, with commit rights to all projects. +member of the ``pytest-dev`` team, with commit rights to all projects. We recommend that each plugin has at least three people who have the right to release to pypi. @@ -128,22 +128,18 @@ The primary development platform for pytest is BitBucket. You can find all the issues there and submit your pull requests. -1. Fork the +#. Fork the `pytest BitBucket repository `__. It's fine to use ``pytest`` as your fork repository name because it will live under your user. -.. _virtualenvactivate: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -2. Create and activate a fork-specific virtualenv - (http://www.virtualenv.org/en/latest/):: + $ make develop + $ source .env/bin/activate - $ virtualenv pytest-venv - $ source pytest-venv/bin/activate - -.. _checkout: - -3. Clone your fork locally using `Mercurial `_ +#. Clone your fork locally using `Mercurial `_ (``hg``) and create a branch:: $ hg clone ssh://hg at bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest @@ -153,45 +149,46 @@ If you need some help with Mercurial, follow this quick start guide: http://mercurial.selenic.com/wiki/QuickStart -.. _testing-pytest: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -4. You can now edit your local working copy. To test you need to - install the "tox" tool into your virtualenv:: + $ make develop + $ source .env/bin/activate - $ pip install tox +#. You can now edit your local working copy. - You need to have Python 2.7 and 3.3 available in your system. Now - running tests is as simple as issuing this command:: + You need to have Python 2.7 and 3.4 available in your system. Now + running tests is as simple as issuing this command:: - $ python runtox.py -e py27,py33,flakes + $ python runtox.py -e py27,py34,flakes - This command will run tests via the "tox" tool against Python 2.7 and 3.3 - and also perform "flakes" coding-style checks. ``runtox.py`` is - a thin wrapper around ``tox`` which installs from a development package - index where newer (not yet released to pypi) versions of dependencies - (especially ``py``) might be present. + This command will run tests via the "tox" tool against Python 2.7 and 3.4 + and also perform "flakes" coding-style checks. ``runtox.py`` is + a thin wrapper around ``tox`` which installs from a development package + index where newer (not yet released to pypi) versions of dependencies + (especially ``py``) might be present. - To run tests on py27 and pass options (e.g. enter pdb on failure) - to pytest you can do:: + To run tests on py27 and pass options (e.g. enter pdb on failure) + to pytest you can do:: $ python runtox.py -e py27 -- --pdb - or to only run tests in a particular test module on py33:: + or to only run tests in a particular test module on py34:: - $ python runtox.py -e py33 -- testing/test_config.py + $ python runtox.py -e py34 -- testing/test_config.py -5. Commit and push once your tests pass and you are happy with your change(s):: +#. Commit and push once your tests pass and you are happy with your change(s):: $ hg commit -m"" $ hg push -b . -6. Finally, submit a pull request through the BitBucket website: +#. Finally, submit a pull request through the BitBucket website: - .. image:: img/pullrequest.png - :width: 700px - :align: center + .. image:: img/pullrequest.png + :width: 700px + :align: center - :: + :: source: YOUR_BITBUCKET_USERNAME/pytest branch: your-branch-name @@ -214,5 +211,3 @@ may try `gitifyhg `_ but are on your own and need to submit pull requests through the respective platform, nevertheless. - - diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 Makefile --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# Set of targets useful for development/release process +PYTHON = python2.7 +PATH := $(PWD)/.env/bin:$(PATH) + +# prepare virtual python environment +.env: + virtualenv .env -p $(PYTHON) + +# install all needed for development +develop: .env + pip install -e . tox -r requirements-docs.txt + +# clean the development envrironment +clean: + -rm -rf .env + +# generate documentation +docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc + cd doc/en; make html + +# upload documentation +upload-docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc --update + cd doc/en; make install diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1712,13 +1712,17 @@ def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) - if faclist is None: + if faclist: + fixturedef = faclist[-1] + if fixturedef.params is not None: + func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) + # skip directly parametrized arguments + if argname not in func_params and argname not in func_params[0]: + metafunc.parametrize(argname, fixturedef.params, + indirect=True, scope=fixturedef.scope, + ids=fixturedef.ids) + else: continue # will raise FixtureLookupError at setup time - for fixturedef in faclist: - if fixturedef.params is not None: - metafunc.parametrize(argname, fixturedef.params, - indirect=True, scope=fixturedef.scope, - ids=fixturedef.ids) def pytest_collection_modifyitems(self, items): # separate parametrized setups diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -78,20 +78,20 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 1 items - + test_smtpsimple.py F - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 > assert "merlinux" in msg E TypeError: Type str doesn't support the buffer API - + test_smtpsimple.py:11: TypeError ========================= 1 failed in 0.28 seconds ========================= @@ -195,31 +195,31 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 2 items - + test_module.py FF - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError ________________________________ test_noop _________________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ========================= 2 failed in 0.28 seconds ========================= @@ -268,7 +268,7 @@ $ py.test -s -q --tb=no FFteardown smtp - + 2 failed in 0.21 seconds We see that the ``smtp`` instance is finalized after the two @@ -377,50 +377,50 @@ FFFF ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError __________________________ test_noop[merlinux.eu] __________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError -------------------------- Captured stdout setup --------------------------- finalizing ________________________ test_noop[mail.python.org] ________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError 4 failed in 7.02 seconds @@ -519,10 +519,10 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items - + test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - + ========================= 2 passed in 6.63 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two @@ -583,7 +583,7 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 8 items - + test_module.py::test_0[1] test0 1 PASSED test_module.py::test_0[2] test0 2 @@ -602,7 +602,7 @@ PASSED test_module.py::test_2[2-mod2] test2 2 mod2 PASSED - + ========================= 8 passed in 0.01 seconds ========================= You can see that the parametrized module-scoped ``modarg`` resource caused @@ -780,4 +780,182 @@ fixtures functions starts at test classes, then test modules, then ``conftest.py`` files and finally builtin and third party plugins. +Overriding fixtures on various levels +------------------------------------- +In relatively large test suite, you most likely need to ``override`` a ``global`` or ``root`` fixture with a ``locally`` +defined one, keeping the test code readable and maintainable. + +Override a fixture on a folder (conftest) level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + def test_username(username): + assert username == 'username' + + subfolder/ + __init__.py + + conftest.py + # content of tests/subfolder/conftest.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + test_something.py + # content of tests/subfolder/test_something.py + def test_username(username): + assert username == 'overridden-username' + +As you can see, a fixture with the same name can be overridden for certain test folder level. +Note that the ``base`` or ``super`` fixture can be accessed from the ``overriding`` +fixture easily - used in the example above. + +Override a fixture on a test module level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + def test_username(username): + assert username == 'overridden-username' + + test_something_else.py + # content of tests/test_something_else.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-else-' + username + + def test_username(username): + assert username == 'overridden-else-username' + +In the example above, a fixture with the same name can be overridden for certain test module. + + +Override a fixture with direct test parametrization +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + @pytest.fixture + def other_username(username): + return 'other-' + username + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.mark.parametrize('username', ['directly-overridden-username']) + def test_username(username): + assert username == 'directly-overridden-username' + + @pytest.mark.parametrize('username', ['directly-overridden-username-other']) + def test_username_other(other_username): + assert username == 'other-directly-overridden-username-other' + +In the example above, a fixture value is overridden by the test parameter value. Note that the value of the fixture +can be overridden this way even if the test doesn't use it directly (doesn't mention it in the function prototype). + + +Override a parametrized fixture with non-parametrized one and vice versa +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture(params=['one', 'two', 'three']) + def parametrized_username(request): + return request.param + + @pytest.fixture + def non_parametrized_username(request): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def parametrized_username(): + return 'overridden-username' + + @pytest.fixture(params=['one', 'two', 'three']) + def non_parametrized_username(request): + return request.param + + def test_username(parametrized_username): + assert parametrized_username == 'overridden-username' + + def test_parametrized_username(non_parametrized_username): + assert non_parametrized_username in ['one', 'two', 'three'] + + test_something_else.py + # content of tests/test_something_else.py + def test_username(parametrized_username): + assert parametrized_username in ['one', 'two', 'three'] + + def test_username(non_parametrized_username): + assert non_parametrized_username == 'username' + +In the example above, a parametrized fixture is overridden with a non-parametrized version, and +a non-parametrized fixture is overridden with a parametrized version for certain test module. +The same applies for the test folder level obviously. diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 requirements-docs.txt --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,2 @@ +sphinx==1.2.3 +hg+ssh://hg at bitbucket.org/RonnyPfannschmidt/regendoc#egg=regendoc diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 setup.py --- a/setup.py +++ b/setup.py @@ -13,7 +13,8 @@ ('Programming Language :: Python :: %s' % x) for x in '2 2.6 2.7 3 3.2 3.3 3.4'.split()] -long_description = open('README.rst').read() +with open('README.rst') as fd: + long_description = fd.read() def main(): diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -393,14 +393,31 @@ return 'value' @pytest.mark.parametrize('value', - ['overrided']) - def test_overrided_via_param(value): - assert value == 'overrided' + ['overridden']) + def test_overridden_via_param(value): + assert value == 'overridden' """) rec = testdir.inline_run() rec.assertoutcome(passed=1) + def test_parametrize_overrides_parametrized_fixture(self, testdir): + """Test parametrization when parameter overrides existing parametrized fixture with same name.""" + testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[1, 2]) + def value(request): + return request.param + + @pytest.mark.parametrize('value', + ['overridden']) + def test_overridden_via_param(value): + assert value == 'overridden' + """) + rec = testdir.inline_run() + rec.assertoutcome(passed=1) + def test_parametrize_with_mark(selfself, testdir): items = testdir.getitems(""" import pytest diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 testing/python/fixture.py --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -226,6 +226,114 @@ result = testdir.runpytest() assert result.ret == 0 + def test_override_parametrized_fixture_conftest_module(self, testdir): + """Test override of the parametrized fixture with non-parametrized one on the test module level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """) + testfile = testdir.makepyfile(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + + def test_spam(spam): + assert spam == 'spam' + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*1 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*1 passed*"]) + + def test_override_parametrized_fixture_conftest_conftest(self, testdir): + """Test override of the parametrized fixture with non-parametrized one on the conftest level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """) + subdir = testdir.mkpydir('subdir') + subdir.join("conftest.py").write(py.code.Source(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """)) + testfile = subdir.join("test_spam.py") + testfile.write(py.code.Source(""" + def test_spam(spam): + assert spam == "spam" + """)) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*1 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*1 passed*"]) + + def test_override_non_parametrized_fixture_conftest_module(self, testdir): + """Test override of the non-parametrized fixture with parametrized one on the test module level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """) + testfile = testdir.makepyfile(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + + params = {'spam': 1} + + def test_spam(spam): + assert spam == params['spam'] + params['spam'] += 1 + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*3 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*3 passed*"]) + + def test_override_non_parametrized_fixture_conftest_conftest(self, testdir): + """Test override of the non-parametrized fixture with parametrized one on the conftest level.""" + testdir.makeconftest(""" + import pytest + + @pytest.fixture + def spam(): + return 'spam' + """) + subdir = testdir.mkpydir('subdir') + subdir.join("conftest.py").write(py.code.Source(""" + import pytest + + @pytest.fixture(params=[1, 2, 3]) + def spam(request): + return request.param + """)) + testfile = subdir.join("test_spam.py") + testfile.write(py.code.Source(""" + params = {'spam': 1} + + def test_spam(spam): + assert spam == params['spam'] + params['spam'] += 1 + """)) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*3 passed*"]) + result = testdir.runpytest(testfile) + result.stdout.fnmatch_lines(["*3 passed*"]) + def test_autouse_fixture_plugin(self, testdir): # A fixture from a plugin has no baseid set, which screwed up # the autouse fixture handling. diff -r 0bbfc95355d7edf5cb0078bfe9a28b2a11657d13 -r da9d03b1f91d63ec97a989804bacfc03204b0e12 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX +addopts= -rxsX -vl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance Repository URL: https://bitbucket.org/pytest-dev/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Thu Mar 12 17:07:34 2015 From: issues-reply at bitbucket.org (BEN ZID ELGUEBSI Wael) Date: Thu, 12 Mar 2015 16:07:34 -0000 Subject: [Pytest-commit] Issue #229: Fails to install package before running tests (hpk42/tox) Message-ID: <20150312160734.25908.55773@app13.ash-private.bitbucket.org> New issue 229: Fails to install package before running tests https://bitbucket.org/hpk42/tox/issue/229/fails-to-install-package-before-running BEN ZID ELGUEBSI Wael: Description of problem: If I try to install my Python C extension manually, it's ok. But when I run tox -e py33 tox does not install the extension properly: It install an empty package: (py33) >>> import mypackage (py33) >>> dir(mypackage) ['__doc__', '__initializing__', '__loader__', '__name__', '__package__', '__path__'] However, If I run: $ python3 setup.py test # (1) It works well and the strange thing is: If I run now: $ tox -e py3 It will works we bacause command (1) created a shared library in the project directory I got no error From issues-reply at bitbucket.org Fri Mar 13 12:42:56 2015 From: issues-reply at bitbucket.org (Vladislav Turbanov) Date: Fri, 13 Mar 2015 11:42:56 -0000 Subject: [Pytest-commit] Issue #697: Support for the Michele Simionato's 'decorator' module. (pytest-dev/pytest) Message-ID: <20150313114256.7600.58839@app01.ash-private.bitbucket.org> New issue 697: Support for the Michele Simionato's 'decorator' module. https://bitbucket.org/pytest-dev/pytest/issue/697/support-for-the-michele-simionatos Vladislav Turbanov: I'm getting the following error, while using the Simionato's useful 'decorator' module https://pypi.python.org/pypi/decorator , which helps decorators preseve the original wrapped function signature. ``` #!bash INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/runner.py", line 217, in pytest_runtest_makereport INTERNALERROR> style=item.config.option.tbstyle) INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/python.py", line 593, in _repr_failure_py INTERNALERROR> style=style) INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/main.py", line 394, in _repr_failure_py INTERNALERROR> return excinfo.value.formatrepr() INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/site-packages/_pytest/python.py", line 1489, in formatrepr INTERNALERROR> lines, _ = inspect.getsourcelines(function) INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/inspect.py", line 690, in getsourcelines INTERNALERROR> lines, lnum = findsource(object) INTERNALERROR> File "P:/msys64/mingw64/lib/python2.7/inspect.py", line 538, in findsource INTERNALERROR> raise IOError('could not get source code') INTERNALERROR> IOError: could not get source code ``` The solution to the problem is here: http://micheles.googlecode.com/hg/decorator/documentation.html#getting-the-source-code The decorator's functions have a special member `__wrapped__` , which can be used to get the source code. So the following change in the `pytest/python.py:1489` file can eliminate the error. ``` #!python try: lines, _ = inspect.getsourcelines(function) except Exception, e: # Try to handle the Michele Simionato's decorator case. if hasattr(function, '__wrapped__'): lines, _ = inspect.getsourcelines(function.__wrapped__) else: raise e ``` I've also noticed, that you are already using this techinque in the same `python.py` file. Maybe, it is the way to get the source lines. Your technique is: ``` #!python while hasattr(realfunction, "__wrapped__"): realfunction = realfunction.__wrapped__ ``` From issues-reply at bitbucket.org Fri Mar 13 20:25:10 2015 From: issues-reply at bitbucket.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 Mar 2015 19:25:10 -0000 Subject: [Pytest-commit] Issue #698: Wrong test outputs in fixture docs (pytest-dev/pytest) Message-ID: <20150313192510.18860.17055@app10.ash-private.bitbucket.org> New issue 698: Wrong test outputs in fixture docs https://bitbucket.org/pytest-dev/pytest/issue/698/wrong-test-outputs-in-fixture-docs ?ric Araujo: Test outputs are wrong in the fixtures doc: In http://pytest.org/latest/fixture.html#fixtures-as-function-arguments ``` > assert "merlinux" in msg E TypeError: Type str doesn't support the buffer API ``` From commits-noreply at bitbucket.org Sat Mar 14 10:57:01 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 14 Mar 2015 09:57:01 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: move looponchange related code to the looponchange plugin Message-ID: <20150314095701.32741.97822@app03.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/b5727cc6632c/ Changeset: b5727cc6632c Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 09:56:49+00:00 Summary: move looponchange related code to the looponchange plugin Affected #: 2 files diff -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d -r b5727cc6632c148ce6b3ef27f46d980b0f90034f _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -135,12 +135,6 @@ def pytest_addoption(parser): - try: - outside_looponfail = pkg_resources.resource_exists( - 'xdist', 'looponfail.py') - except ImportError: - outside_looponfail = False - group = parser.getgroup("general") group.addoption( '--lf', action='store_true', dest="lf", @@ -157,25 +151,13 @@ group.addoption( '--clearcache', action='store_true', dest="clearcache", help="remove all cache contents at start of test run.") - group.addoption( - '--looponchange', action='store_true', dest='looponchange', - help='rerun every time the workdir changes') - if not outside_looponfail: - group._addoption( - '-f', '--looponfail', action='store_true', dest='looponfail', - help='rerun every time the workdir changes') - parser.addini( - "looponchangeroots", type="pathlist", - help="directories to check for changes", default=[py.path.local()]) + def pytest_cmdline_main(config): if config.option.showcache: from _pytest.main import wrap_session return wrap_session(config, showcache) - if config.option.looponchange or config.option.looponfail: - from .onchange import looponchange - return looponchange(config) @pytest.mark.tryfirst diff -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d -r b5727cc6632c148ce6b3ef27f46d980b0f90034f _pytest/onchange.py --- a/_pytest/onchange.py +++ b/_pytest/onchange.py @@ -7,8 +7,33 @@ """ +def pytest_addoption(parser): + try: + outside_looponfail = pkg_resources.resource_exists( + 'xdist', 'looponfail.py') + except ImportError: + outside_looponfail = False + + group = parser.getgroup("general") + group.addoption( + '--looponchange', action='store_true', dest='looponchange', + help='rerun every time the workdir changes') + if not outside_looponfail: + group._addoption( + '-f', '--looponfail', action='store_true', dest='looponfail', + help='rerun every time the workdir changes') + parser.addini( + "looponchangeroots", type="pathlist", + help="directories to check for changes", default=[py.path.local()]) + + +def pytest_cmdline_main(config): + if config.option.looponchange or config.option.looponfail: + return looponchange(config) + + def run_once(args, tw=None): - tw = py.io.TerminalWriter() + tw = tw or py.io.TerminalWriter() subprocess.call(args) tw.line() tw.sep('#', 'waiting for changes') @@ -21,6 +46,9 @@ newargs.remove('--looponchange') else: newargs.remove('-f') + if '--looponfail' in newargs: + newargs.remove('--looponfail') + newargs.append('--lf') stats = StatRecorder(config.getini('looponchangeroots')) command = py.std.functools.partial(run_once, [ py.std.sys.executable, '-c', SCRIPT % newargs]) Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Sat Mar 14 11:03:13 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 14 Mar 2015 10:03:13 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 32 Message-ID: <20150314095300.13227.51502@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/32 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3923:0693d6b045fb Author : Ronny Pfannschmidt Branch : merge-cache Message: finish bringing together the cache plugin code -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Sat Mar 14 11:03:24 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 14 Mar 2015 10:03:24 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 33 Message-ID: <20150314100324.27367.83942@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/33 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3924:b5727cc6632c Author : Ronny Pfannschmidt Branch : merge-cache Message: move looponchange related code to the looponchange plugin -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sat Mar 14 11:27:52 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 14 Mar 2015 10:27:52 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: finish last mistakes in onchage/cache Message-ID: <20150314102752.7396.65687@app04.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/552d1d498bf3/ Changeset: 552d1d498bf3 Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 10:27:43+00:00 Summary: finish last mistakes in onchage/cache Affected #: 3 files diff -r b5727cc6632c148ce6b3ef27f46d980b0f90034f -r 552d1d498bf39e4118f02eb9653bd6fad774c2db _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -1,7 +1,6 @@ import py import pytest import json -import pkg_resources from os.path import sep as _sep, altsep as _altsep @@ -63,7 +62,7 @@ like e. g. lists of dictionaries. """ path = self._getvaluepath(key) - path.dirpath().ensure(dir=1) + path.dirpath().ensure_dir() with path.open("w") as f: self.trace("cache-write %s: %r" % (key, value,)) json.dump(value, f, indent=2, sort_keys=True) @@ -184,7 +183,7 @@ basedir = config.cache._cachedir vdir = basedir.join("v") tw.sep("-", "cache values") - for valpath in vdir.visit(lambda x: x.check(file=1)): + for valpath in vdir.visit(lambda x: x.isfile()): key = valpath.relto(vdir).replace(valpath.sep, "/") val = config.cache.get(key, dummy) if val is dummy: @@ -198,12 +197,13 @@ tw.line(" " + line) ddir = basedir.join("d") - if ddir.check(dir=1) and ddir.listdir(): + if ddir.isdir() and ddir.listdir(): tw.sep("-", "cache directories") for p in basedir.join("d").visit(): #if p.check(dir=1): # print("%s/" % p.relto(basedir)) - if p.check(file=1): + if p.isfile(): key = p.relto(basedir) tw.line("%s is a file of length %d" % ( key, p.size())) + return 0 diff -r b5727cc6632c148ce6b3ef27f46d980b0f90034f -r 552d1d498bf39e4118f02eb9653bd6fad774c2db _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -51,7 +51,7 @@ default_plugins = ( "mark main terminal runner python pdb unittest capture skipping " "tmpdir monkeypatch recwarn pastebin helpconfig nose assertion genscript " - "junitxml resultlog doctest cache").split() + "junitxml resultlog doctest cache onchange").split() def _preloadplugins(): assert not _preinit diff -r b5727cc6632c148ce6b3ef27f46d980b0f90034f -r 552d1d498bf39e4118f02eb9653bd6fad774c2db _pytest/onchange.py --- a/_pytest/onchange.py +++ b/_pytest/onchange.py @@ -1,5 +1,6 @@ import py import subprocess +import pkg_resources SCRIPT = """ import pytest Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Sat Mar 14 11:41:47 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 14 Mar 2015 10:41:47 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 34 Message-ID: <20150314104147.30188.31122@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/34 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3925:552d1d498bf3 Author : Ronny Pfannschmidt Branch : merge-cache Message: finish last mistakes in onchage/cache -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sat Mar 14 12:35:40 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 14 Mar 2015 11:35:40 -0000 Subject: [Pytest-commit] commit/pytest: 2 new changesets Message-ID: <20150314113540.22432.59709@app04.ash-private.bitbucket.org> 2 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/6bec93260b60/ Changeset: 6bec93260b60 Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 10:45:44+00:00 Summary: changelog entries Affected #: 1 file diff -r 552d1d498bf39e4118f02eb9653bd6fad774c2db -r 6bec93260b60d258076a246028cef52f9faa9dfb CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- +- merge in pytest-cache code and ignore the external plugin + +- add looponchange which is a clone of xdists looponfail altered to use + cache and subprocess invocations + - fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. https://bitbucket.org/pytest-dev/pytest/commits/bf6f8a626afb/ Changeset: bf6f8a626afb Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 11:35:20+00:00 Summary: switch looponchange activation control to env var to protect against addopts Affected #: 1 file diff -r 6bec93260b60d258076a246028cef52f9faa9dfb -r bf6f8a626afb870b19a91ff3993203e264fc2e9c _pytest/onchange.py --- a/_pytest/onchange.py +++ b/_pytest/onchange.py @@ -1,11 +1,8 @@ import py import subprocess import pkg_resources - -SCRIPT = """ -import pytest -pytest.main(%r) -""" +import os +import sys def pytest_addoption(parser): @@ -42,17 +39,15 @@ def looponchange(config): + if 'PYTEST_LOOPONFAIL_ACTIVE' in os.environ: + return + os.environ['PYTEST_LOOPONFAIL_ACTIVE'] = '1' newargs = config._origargs[:] - if '--looponchange' in newargs: - newargs.remove('--looponchange') - else: - newargs.remove('-f') - if '--looponfail' in newargs: - newargs.remove('--looponfail') - newargs.append('--lf') stats = StatRecorder(config.getini('looponchangeroots')) - command = py.std.functools.partial(run_once, [ - py.std.sys.executable, '-c', SCRIPT % newargs]) + + def command(): + run_once([sys.executable, '-m', 'pytest'] + config._origargs) + command() loop_forever(stats, command) return 2 Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Sat Mar 14 12:50:40 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 14 Mar 2015 11:50:40 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 35 Message-ID: <20150314115040.27373.23136@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/35 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3927:bf6f8a626afb Author : Ronny Pfannschmidt Branch : merge-cache Message: switch looponchange activation control to env var to protect against addopts -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Sat Mar 14 10:38:47 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Sat, 14 Mar 2015 09:38:47 -0000 Subject: [Pytest-commit] commit/pytest: 7 new changesets Message-ID: <20150314093847.1372.44721@app13.ash-private.bitbucket.org> 7 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/9dce78a703b4/ Changeset: 9dce78a703b4 Branch: merge-cache User: RonnyPfannschmidt Date: 2015-02-28 08:09:27+00:00 Summary: some doc changes Affected #: 2 files diff -r aa0dc8752409f064fa6414289f2c8b19e9aa1b14 -r 9dce78a703b4f24c4bbfcfec40fe6a5a42126f34 doc/en/apiref.txt --- a/doc/en/apiref.txt +++ b/doc/en/apiref.txt @@ -17,6 +17,7 @@ capture.txt monkeypatch.txt xdist.txt + cache.txt tmpdir.txt mark.txt skipping.txt @@ -24,5 +25,4 @@ unittest.txt nose.txt doctest.txt - cache.txt diff -r aa0dc8752409f064fa6414289f2c8b19e9aa1b14 -r 9dce78a703b4f24c4bbfcfec40fe6a5a42126f34 doc/en/cache.txt --- a/doc/en/cache.txt +++ b/doc/en/cache.txt @@ -1,13 +1,9 @@ -pytest-cache: working with cross-testrun state -===================================================== +cache: working with cross-testrun state +======================================= Usage --------- -Install via:: - - pip install pytest-cache - after which other plugins can access a new `config.cache`_ object which helps sharing values between ``py.test`` invocations. @@ -32,7 +28,7 @@ @pytest.mark.parametrize("i", range(50)) def test_num(i): - if i in (17,25): + if i in (17, 25): pytest.fail("bad luck") If you run this for the first time you will see two failures:: https://bitbucket.org/pytest-dev/pytest/commits/a08399082bfa/ Changeset: a08399082bfa Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 08:46:36+00:00 Summary: some doc fixes for cache Affected #: 1 file diff -r 9dce78a703b4f24c4bbfcfec40fe6a5a42126f34 -r a08399082bfa05de5b13b807b332709017099cf1 doc/en/cache.txt --- a/doc/en/cache.txt +++ b/doc/en/cache.txt @@ -4,13 +4,12 @@ Usage --------- -after which other plugins can access a new `config.cache`_ object +plugins can access the `config.cache`_ object which helps sharing values between ``py.test`` invocations. The plugin provides two options to rerun failures, namely: * ``--lf`` (last failures) - to only re-run the failures. - * ``--ff`` (failures first) - to run the failures first and then the rest of the tests. @@ -229,34 +228,18 @@ servers where isolation and correctness is more important than speed. -Notes -------------- - -repository: http://bitbucket.org/hpk42/pytest-cache - -Issues: repository: http://bitbucket.org/hpk42/pytest-cache/issues - -more info on py.test: http://pytest.org - config.cache API ======================================== -The ``cache`` plugin adds a ``config.cache`` -object during the configure-initialization of pytest. -This allows other plugins, including ``conftest.py`` files, +The `config.cache`` object allows other plugins, +including ``conftest.py`` files, to safely and flexibly store and retrieve values across test runs because the ``config`` object is available in many places. Under the hood, the cache plugin uses the simple -`dumps/loads`_ API of the cross-interpreter -execnet_ communication library. It makes it safe -to store values e. g. under Python2 and retrieve -it later from a Python3 or PyPy interpreter. - -.. _`dumps/loads`: http://codespeak.net/execnet/basics.html#dumps-loads -.. _`execnet`: http://codespeak.net/execnet/ +dumps/loads API of the json stdlib module .. currentmodule:: pytest_cache https://bitbucket.org/pytest-dev/pytest/commits/4d97420fe29a/ Changeset: 4d97420fe29a Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 08:59:51+00:00 Summary: merge from default Affected #: 39 files diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d AUTHORS --- a/AUTHORS +++ b/AUTHORS @@ -47,3 +47,4 @@ Nicolas Delaby Tom Viner Dave Hunt +Charles Cloud diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,30 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- +- fix issue616: conftest.py files and their contained fixutres are now + properly considered for visibility, independently from the exact + current working directory and test arguments that are used. + Many thanks to Eric Siegerman and his PR235 which contains + systematic tests for conftest visibility and now passes. + This change also introduces the concept of a ``rootdir`` which + is printed as a new pytest header and documented in the pytest + customize web page. + +- change reporting of "diverted" tests, i.e. tests that are collected + in one file but actually come from another (e.g. when tests in a test class + come from a base class in a different file). We now show the nodeid + and indicate via a postfix the other file. + - add ability to set command line options by environment variable PYTEST_ADDOPTS. +- added documentation on the new pytest-dev teams on bitbucket and + github. See https://pytest.org/latest/contributing.html . + Thanks to Anatoly for pushing and initial work on this. + +- fix issue650: new option ``--docttest-ignore-import-errors`` which + will turn import errors in doctests into skips. Thanks Charles Cloud + for the complete PR. + - fix issue655: work around different ways that cause python2/3 to leak sys.exc_info into fixtures/tests causing failures in 3rd party code @@ -33,6 +55,7 @@ - "python_classes" and "python_functions" options now support glob-patterns for test discovery, as discussed in issue600. Thanks Ldiary Translations. +- allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). 2.6.4 ---------- diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,18 +1,59 @@ -============ -Contributing -============ +============================ +Contribution getting started +============================ Contributions are highly welcomed and appreciated. Every little help counts, so do not hesitate! +.. contents:: Contribution links + :depth: 2 -Types of contributions -====================== + +.. _submitplugin: + +Submit a plugin, co-develop pytest +---------------------------------- + +Pytest development of the core, some plugins and support code happens +in repositories living under: + +- `the pytest-dev bitbucket team `_ + +- `the pytest-dev github organisation `_ + +All pytest-dev team members have write access to all contained +repositories. pytest core and plugins are generally developed +using `pull requests`_ to respective repositories. + +You can submit your plugin by subscribing to the `pytest-dev mail list +`_ and writing a +mail pointing to your existing pytest plugin repository which must have +the following: + +- PyPI presence with a ``setup.py`` that contains a license, ``pytest-`` + prefixed, version number, authors, short and long description. + +- a ``tox.ini`` for running tests using `tox `_. + +- a ``README.txt`` describing how to use the plugin and on which + platforms it runs. + +- an issue tracker unless you rather want to use the core ``pytest`` + issue tracker. + +If no contributor strongly objects and two agree, the repo will be +transferred to the ``pytest-dev`` organisation and you'll become a +member of the ``pytest-dev`` team, with commit rights to all projects. +We recommend that each plugin has at least three people who have the +right to release to pypi. + + +.. _reportbugs: Report bugs ----------- -Report bugs at https://bitbucket.org/hpk42/pytest/issues. +Report bugs for pytest at https://bitbucket.org/pytest-dev/pytest/issues If you are reporting a bug, please include: @@ -22,13 +63,15 @@ installed libraries and pytest version. * Detailed steps to reproduce the bug. +.. _submitfeedback: + Submit feedback for developers ------------------------------ Do you like pytest? Share some love on Twitter or in your blog posts! We'd also like to hear about your propositions and suggestions. Feel free to -`submit them as issues `__ and: +`submit them as issues `__ and: * Set the "kind" to "enhancement" or "proposal" so that we can quickly find about them. @@ -37,21 +80,24 @@ * If you have required skills and/or knowledge, we are very happy for :ref:`pull requests `. +.. _fixbugs: Fix bugs -------- Look through the BitBucket issues for bugs. Here is sample filter you can use: -https://bitbucket.org/hpk42/pytest/issues?status=new&status=open&kind=bug +https://bitbucket.org/pytest-dev/pytest/issues?status=new&status=open&kind=bug :ref:`Talk ` to developers to find out how you can fix specific bugs. +.. _writeplugins: + Implement features ------------------ Look through the BitBucket issues for enhancements. Here is sample filter you can use: -https://bitbucket.org/hpk42/pytest/issues?status=new&status=open&kind=enhancement +https://bitbucket.org/pytest-dev/pytest/issues?status=new&status=open&kind=enhancement :ref:`Talk ` to developers to find out how you can implement specific features. @@ -66,37 +112,34 @@ * Docstrings. There's never too much of them. * Blog posts, articles and such -- they're all very appreciated. +.. _`pull requests`: .. _pull-requests: Preparing Pull Requests on Bitbucket -===================================== +------------------------------------ .. note:: What is a "pull request"? It informs project's core developers about the changes you want to review and merge. Pull requests are stored on - `BitBucket servers `__. + `BitBucket servers `__. Once you send pull request, we can discuss it's potential modifications and even add more commits to it later on. The primary development platform for pytest is BitBucket. You can find all the issues there and submit your pull requests. -1. Fork the - `pytest BitBucket repository `__. It's +#. Fork the + `pytest BitBucket repository `__. It's fine to use ``pytest`` as your fork repository name because it will live under your user. -.. _virtualenvactivate: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -2. Create and activate a fork-specific virtualenv - (http://www.virtualenv.org/en/latest/):: + $ make develop + $ source .env/bin/activate - $ virtualenv pytest-venv - $ source pytest-venv/bin/activate - -.. _checkout: - -3. Clone your fork locally using `Mercurial `_ +#. Clone your fork locally using `Mercurial `_ (``hg``) and create a branch:: $ hg clone ssh://hg at bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest @@ -106,55 +149,56 @@ If you need some help with Mercurial, follow this quick start guide: http://mercurial.selenic.com/wiki/QuickStart -.. _testing-pytest: +#. Create a development environment + (will implicitly use http://www.virtualenv.org/en/latest/):: -4. You can now edit your local working copy. To test you need to - install the "tox" tool into your virtualenv:: + $ make develop + $ source .env/bin/activate - $ pip install tox +#. You can now edit your local working copy. - You need to have Python 2.7 and 3.3 available in your system. Now - running tests is as simple as issuing this command:: + You need to have Python 2.7 and 3.4 available in your system. Now + running tests is as simple as issuing this command:: - $ python runtox.py -e py27,py33,flakes + $ python runtox.py -e py27,py34,flakes - This command will run tests via the "tox" tool against Python 2.7 and 3.3 - and also perform "flakes" coding-style checks. ``runtox.py`` is - a thin wrapper around ``tox`` which installs from a development package - index where newer (not yet released to pypi) versions of dependencies - (especially ``py``) might be present. + This command will run tests via the "tox" tool against Python 2.7 and 3.4 + and also perform "flakes" coding-style checks. ``runtox.py`` is + a thin wrapper around ``tox`` which installs from a development package + index where newer (not yet released to pypi) versions of dependencies + (especially ``py``) might be present. - To run tests on py27 and pass options (e.g. enter pdb on failure) - to pytest you can do:: + To run tests on py27 and pass options (e.g. enter pdb on failure) + to pytest you can do:: $ python runtox.py -e py27 -- --pdb - or to only run tests in a particular test module on py33:: + or to only run tests in a particular test module on py34:: - $ python runtox.py -e py33 -- testing/test_config.py + $ python runtox.py -e py34 -- testing/test_config.py -5. Commit and push once your tests pass and you are happy with your change(s):: +#. Commit and push once your tests pass and you are happy with your change(s):: $ hg commit -m"" $ hg push -b . -6. Finally, submit a pull request through the BitBucket website: +#. Finally, submit a pull request through the BitBucket website: - .. image:: img/pullrequest.png - :width: 700px - :align: center + .. image:: img/pullrequest.png + :width: 700px + :align: center - :: + :: source: YOUR_BITBUCKET_USERNAME/pytest branch: your-branch-name - target: hpk42/pytest + target: pytest-dev/pytest branch: default .. _contribution-using-git: -What about git (and so GitHub)? +Using git with bitbucket/hg ------------------------------- There used to be the pytest GitHub mirror. It was removed in favor of the @@ -162,10 +206,8 @@ put their issues and pull requests. Also it wasn't easily possible to automate the mirroring process. -However, it's still possible to use git to contribute to pytest using tools -like `gitifyhg `_ which allows you to -clone and work with Mercurial repo still using git. - -.. warning:: - Remember that git is **not** a default version control system for pytest and - you need to be careful using it. +In general we recommend to work with the same version control system of the +original repository. If you insist on using git with bitbucket/hg you +may try `gitifyhg `_ but are on your +own and need to submit pull requests through the respective platform, +nevertheless. diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d Makefile --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# Set of targets useful for development/release process +PYTHON = python2.7 +PATH := $(PWD)/.env/bin:$(PATH) + +# prepare virtual python environment +.env: + virtualenv .env -p $(PYTHON) + +# install all needed for development +develop: .env + pip install -e . tox -r requirements-docs.txt + +# clean the development envrironment +clean: + -rm -rf .env + +# generate documentation +docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc + cd doc/en; make html + +# upload documentation +upload-docs: develop + find doc/en -name '*.txt' -not -path 'doc/en/_build/*' | xargs .env/bin/regendoc --update + cd doc/en; make install diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d README.rst --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -.. image:: https://drone.io/bitbucket.org/hpk42/pytest/status.png - :target: https://drone.io/bitbucket.org/hpk42/pytest/latest +.. image:: https://drone.io/bitbucket.org/pytest-dev/pytest/status.png + :target: https://drone.io/bitbucket.org/pytest-dev/pytest/latest .. image:: https://pypip.in/v/pytest/badge.png :target: https://pypi.python.org/pypi/pytest @@ -7,9 +7,9 @@ Changelog: http://pytest.org/latest/changelog.html -Issues: https://bitbucket.org/hpk42/pytest/issues?status=open +Issues: https://bitbucket.org/pytest-dev/pytest/issues?status=open -CI: https://drone.io/bitbucket.org/hpk42/pytest +CI: https://drone.io/bitbucket.org/pytest-dev/pytest The ``pytest`` testing tool makes it easy to write small tests, yet scales to support complex functional testing. It provides @@ -44,11 +44,11 @@ and report bugs at: - http://bitbucket.org/hpk42/pytest/issues/ + http://bitbucket.org/pytest-dev/pytest/issues/ and checkout or fork repo at: - http://bitbucket.org/hpk42/pytest/ + http://bitbucket.org/pytest-dev/pytest/ Copyright Holger Krekel and others, 2004-2014 diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/config.py --- a/_pytest/config.py +++ b/_pytest/config.py @@ -657,6 +657,12 @@ sys.stderr.write("INTERNALERROR> %s\n" %line) sys.stderr.flush() + def cwd_relative_nodeid(self, nodeid): + # nodeid's are relative to the rootpath, compute relative to cwd + if self.invocation_dir != self.rootdir: + fullpath = self.rootdir.join(nodeid) + nodeid = self.invocation_dir.bestrelpath(fullpath) + return nodeid @classmethod def fromdictargs(cls, option_dict, args): @@ -691,14 +697,9 @@ def _initini(self, args): parsed_args = self._parser.parse_known_args(args) - if parsed_args.inifilename: - iniconfig = py.iniconfig.IniConfig(parsed_args.inifilename) - if 'pytest' in iniconfig.sections: - self.inicfg = iniconfig['pytest'] - else: - self.inicfg = {} - else: - self.inicfg = getcfg(args, ["pytest.ini", "tox.ini", "setup.cfg"]) + r = determine_setup(parsed_args.inifilename, parsed_args.file_or_dir) + self.rootdir, self.inifile, self.inicfg = r + self.invocation_dir = py.path.local() self._parser.addini('addopts', 'extra command line options', 'args') self._parser.addini('minversion', 'minimally required pytest version') @@ -859,8 +860,58 @@ if exists(p): iniconfig = py.iniconfig.IniConfig(p) if 'pytest' in iniconfig.sections: - return iniconfig['pytest'] - return {} + return base, p, iniconfig['pytest'] + elif inibasename == "pytest.ini": + # allowed to be empty + return base, p, {} + return None, None, None + + +def get_common_ancestor(args): + # args are what we get after early command line parsing (usually + # strings, but can be py.path.local objects as well) + common_ancestor = None + for arg in args: + if str(arg)[0] == "-": + continue + p = py.path.local(arg) + if common_ancestor is None: + common_ancestor = p + else: + if p.relto(common_ancestor) or p == common_ancestor: + continue + elif common_ancestor.relto(p): + common_ancestor = p + else: + shared = p.common(common_ancestor) + if shared is not None: + common_ancestor = shared + if common_ancestor is None: + common_ancestor = py.path.local() + elif not common_ancestor.isdir(): + common_ancestor = common_ancestor.dirpath() + return common_ancestor + + +def determine_setup(inifile, args): + if inifile: + iniconfig = py.iniconfig.IniConfig(inifile) + try: + inicfg = iniconfig["pytest"] + except KeyError: + inicfg = None + rootdir = get_common_ancestor(args) + else: + ancestor = get_common_ancestor(args) + rootdir, inifile, inicfg = getcfg( + [ancestor], ["pytest.ini", "tox.ini", "setup.cfg"]) + if rootdir is None: + for rootdir in ancestor.parts(reverse=True): + if rootdir.join("setup.py").exists(): + break + else: + rootdir = ancestor + return rootdir, inifile, inicfg or {} def setns(obj, dic): diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/doctest.py --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -17,6 +17,10 @@ action="store", default="test*.txt", metavar="pat", help="doctests file matching pattern, default: test*.txt", dest="doctestglob") + group.addoption("--doctest-ignore-import-errors", + action="store_true", default=False, + help="ignore doctest ImportErrors", + dest="doctest_ignore_import_errors") def pytest_collect_file(path, parent): config = parent.config @@ -130,7 +134,13 @@ if self.fspath.basename == "conftest.py": module = self.config._conftest.importconftest(self.fspath) else: - module = self.fspath.pyimport() + try: + module = self.fspath.pyimport() + except ImportError: + if self.config.getvalue('doctest_ignore_import_errors'): + pytest.skip('unable to import module %r' % self.fspath) + else: + raise # satisfy `FixtureRequest` constructor... self.funcargs = {} self._fixtureinfo = FuncFixtureInfo((), [], {}) @@ -138,9 +148,9 @@ doctest_globals = dict(getfixture=fixture_request.getfuncargvalue) # uses internal doctest module parsing mechanism finder = doctest.DocTestFinder() - optionflags= get_optionflags(self) + optionflags = get_optionflags(self) runner = doctest.DebugRunner(verbose=0, optionflags=optionflags) for test in finder.find(module, module.__name__, extraglobs=doctest_globals): - if test.examples: # skip empty doctests + if test.examples: # skip empty doctests yield DoctestItem(test.name, self, runner, test) diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/main.py --- a/_pytest/main.py +++ b/_pytest/main.py @@ -457,9 +457,7 @@ self.fspath = fspath def _makeid(self): - if self == self.session: - return "." - relpath = self.session.fspath.bestrelpath(self.fspath) + relpath = self.fspath.relto(self.config.rootdir) if os.sep != "/": relpath = relpath.replace(os.sep, "/") return relpath @@ -510,7 +508,7 @@ __module__ = 'builtins' # for py3 def __init__(self, config): - FSCollector.__init__(self, py.path.local(), parent=None, + FSCollector.__init__(self, config.rootdir, parent=None, config=config, session=self) self.config.pluginmanager.register(self, name="session", prepend=True) self._testsfailed = 0 @@ -520,6 +518,9 @@ self.startdir = py.path.local() self._fs2hookproxy = {} + def _makeid(self): + return "" + def pytest_collectstart(self): if self.shouldstop: raise self.Interrupted(self.shouldstop) @@ -663,7 +664,7 @@ arg = self._tryconvertpyarg(arg) parts = str(arg).split("::") relpath = parts[0].replace("/", os.sep) - path = self.fspath.join(relpath, abs=True) + path = self.config.invocation_dir.join(relpath, abs=True) if not path.check(): if self.config.option.pyargs: msg = "file or package not found: " diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/pytester.py --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -306,9 +306,8 @@ session = Session(config) assert '::' not in str(arg) p = py.path.local(arg) - x = session.fspath.bestrelpath(p) config.hook.pytest_sessionstart(session=session) - res = session.perform_collect([x], genitems=False)[0] + res = session.perform_collect([str(p)], genitems=False)[0] config.hook.pytest_sessionfinish(session=session, exitstatus=EXIT_OK) return res @@ -395,8 +394,7 @@ def parseconfigure(self, *args): config = self.parseconfig(*args) config.do_configure() - self.request.addfinalizer(lambda: - config.do_unconfigure()) + self.request.addfinalizer(config.do_unconfigure) return config def getitem(self, source, funcname="test_func"): diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -979,7 +979,7 @@ loc = getlocation(fixturedef.func, curdir) doc = fixturedef.func.__doc__ or "" if doc: - for line in doc.split("\n"): + for line in doc.strip().split("\n"): tw.line(" " + line.strip()) else: tw.line(" %s: no docstring available" %(loc,), @@ -1047,7 +1047,7 @@ if ExpectedException is AssertionError: # we want to catch a AssertionError # replace our subclass with the builtin one - # see https://bitbucket.org/hpk42/pytest/issue/176/pytestraises + # see https://bitbucket.org/pytest-dev/pytest/issue/176/pytestraises from _pytest.assertion.util import BuiltinAssertionError \ as ExpectedException msg = ("exceptions must be old-style classes or" @@ -1653,11 +1653,9 @@ # what fixtures are visible for particular tests (as denoted # by their test id) if p.basename.startswith("conftest.py"): - nodeid = self.session.fspath.bestrelpath(p.dirpath()) + nodeid = p.dirpath().relto(self.config.rootdir) if p.sep != "/": nodeid = nodeid.replace(p.sep, "/") - if nodeid == ".": - nodeid = "" self.parsefactories(plugin, nodeid) self._seenplugins.add(plugin) @@ -1714,13 +1712,17 @@ def pytest_generate_tests(self, metafunc): for argname in metafunc.fixturenames: faclist = metafunc._arg2fixturedefs.get(argname) - if faclist is None: + if faclist: + fixturedef = faclist[-1] + if fixturedef.params is not None: + func_params = getattr(getattr(metafunc.function, 'parametrize', None), 'args', [[None]]) + # skip directly parametrized arguments + if argname not in func_params and argname not in func_params[0]: + metafunc.parametrize(argname, fixturedef.params, + indirect=True, scope=fixturedef.scope, + ids=fixturedef.ids) + else: continue # will raise FixtureLookupError at setup time - for fixturedef in faclist: - if fixturedef.params is not None: - metafunc.parametrize(argname, fixturedef.params, - indirect=True, scope=fixturedef.scope, - ids=fixturedef.ids) def pytest_collection_modifyitems(self, items): # separate parametrized setups diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/skipping.py --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -218,14 +218,14 @@ failed = terminalreporter.stats.get(stat) if failed: for rep in failed: - pos = rep.nodeid - lines.append(format %(pos, )) + pos = terminalreporter.config.cwd_relative_nodeid(rep.nodeid) + lines.append(format %(pos,)) def show_xfailed(terminalreporter, lines): xfailed = terminalreporter.stats.get("xfailed") if xfailed: for rep in xfailed: - pos = rep.nodeid + pos = terminalreporter.config.cwd_relative_nodeid(rep.nodeid) reason = rep.wasxfail lines.append("XFAIL %s" % (pos,)) if reason: @@ -235,7 +235,7 @@ xpassed = terminalreporter.stats.get("xpassed") if xpassed: for rep in xpassed: - pos = rep.nodeid + pos = terminalreporter.config.cwd_relative_nodeid(rep.nodeid) reason = rep.wasxfail lines.append("XPASS %s %s" %(pos, reason)) diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d _pytest/terminal.py --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -95,7 +95,7 @@ self._numcollected = 0 self.stats = {} - self.startdir = self.curdir = py.path.local() + self.startdir = py.path.local() if file is None: file = sys.stdout self._tw = self.writer = py.io.TerminalWriter(file) @@ -111,12 +111,12 @@ char = {'xfailed': 'x', 'skipped': 's'}.get(char, char) return char in self.reportchars - def write_fspath_result(self, fspath, res): + def write_fspath_result(self, nodeid, res): + fspath = self.config.rootdir.join(nodeid.split("::")[0]) if fspath != self.currentfspath: self.currentfspath = fspath - #fspath = self.startdir.bestrelpath(fspath) + fspath = self.startdir.bestrelpath(fspath) self._tw.line() - #relpath = self.startdir.bestrelpath(fspath) self._tw.write(fspath + " ") self._tw.write(res) @@ -182,12 +182,12 @@ def pytest_runtest_logstart(self, nodeid, location): # ensure that the path is printed before the # 1st test of a module starts running - fspath = nodeid.split("::")[0] if self.showlongtestinfo: - line = self._locationline(fspath, *location) + line = self._locationline(nodeid, *location) self.write_ensure_prefix(line, "") elif self.showfspath: - self.write_fspath_result(fspath, "") + fsid = nodeid.split("::")[0] + self.write_fspath_result(fsid, "") def pytest_runtest_logreport(self, report): rep = report @@ -200,7 +200,7 @@ return if self.verbosity <= 0: if not hasattr(rep, 'node') and self.showfspath: - self.write_fspath_result(rep.fspath, letter) + self.write_fspath_result(rep.nodeid, letter) else: self._tw.write(letter) else: @@ -213,7 +213,7 @@ markup = {'red':True} elif rep.skipped: markup = {'yellow':True} - line = self._locationline(str(rep.fspath), *rep.location) + line = self._locationline(rep.nodeid, *rep.location) if not hasattr(rep, 'node'): self.write_ensure_prefix(line, word, **markup) #self._tw.write(word, **markup) @@ -237,7 +237,7 @@ items = [x for x in report.result if isinstance(x, pytest.Item)] self._numcollected += len(items) if self.hasmarkup: - #self.write_fspath_result(report.fspath, 'E') + #self.write_fspath_result(report.nodeid, 'E') self.report_collect() def report_collect(self, final=False): @@ -288,6 +288,10 @@ self.write_line(line) def pytest_report_header(self, config): + inifile = "" + if config.inifile: + inifile = config.rootdir.bestrelpath(config.inifile) + lines = ["rootdir: %s, inifile: %s" %(config.rootdir, inifile)] plugininfo = config.pluginmanager._plugin_distinfo if plugininfo: l = [] @@ -296,7 +300,8 @@ if name.startswith("pytest-"): name = name[7:] l.append(name) - return "plugins: %s" % ", ".join(l) + lines.append("plugins: %s" % ", ".join(l)) + return lines def pytest_collection_finish(self, session): if self.config.option.collectonly: @@ -378,19 +383,24 @@ else: excrepr.reprcrash.toterminal(self._tw) - def _locationline(self, collect_fspath, fspath, lineno, domain): + def _locationline(self, nodeid, fspath, lineno, domain): + def mkrel(nodeid): + line = self.config.cwd_relative_nodeid(nodeid) + if domain and line.endswith(domain): + line = line[:-len(domain)] + l = domain.split("[") + l[0] = l[0].replace('.', '::') # don't replace '.' in params + line += "[".join(l) + return line # collect_fspath comes from testid which has a "/"-normalized path - if fspath and fspath.replace("\\", "/") != collect_fspath: - fspath = "%s <- %s" % (collect_fspath, fspath) + if fspath: - line = str(fspath) - if domain: - split = str(domain).split('[') - split[0] = split[0].replace('.', '::') # don't replace '.' in params - line += "::" + '['.join(split) + res = mkrel(nodeid).replace("::()", "") # parens-normalization + if nodeid.split("::")[0] != fspath.replace("\\", "/"): + res += " <- " + self.startdir.bestrelpath(fspath) else: - line = "[location]" - return line + " " + res = "[location]" + return res + " " def _getfailureheadline(self, rep): if hasattr(rep, 'location'): diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/Makefile --- a/doc/en/Makefile +++ b/doc/en/Makefile @@ -42,7 +42,7 @@ clean: -rm -rf $(BUILDDIR)/* -SITETARGET=dev +SITETARGET=latest install: html # for access talk to someone with login rights to diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/_templates/links.html --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -3,9 +3,9 @@
  • The pytest Website
  • Contribution Guide
  • pytest @ PyPI
  • -
  • pytest @ Bitbucket
  • +
  • pytest @ Bitbucket
  • 3rd party plugins
  • -
  • Issue Tracker
  • +
  • Issue Tracker
  • PDF Documentation diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/adopt.txt --- a/doc/en/adopt.txt +++ b/doc/en/adopt.txt @@ -1,15 +1,15 @@ -April is "adopt pytest month" +April 2015 is "adopt pytest month" ============================================= Are you an enthusiastic pytest user, the local testing guru in your workplace? Or are you considering using pytest for your open source project, but not sure how to get started? Then you may be interested in "adopt pytest month"! We will pair experienced pytest users with open source projects, for a month's effort of getting new development teams started with pytest. -In 2015 we are trying this for the first time. In February and March we will gather volunteers on both sides, in April we will do the work, and in May we will evaluate how it went. This effort is being coordinated by Brianna Laugher. If you have any questions or comments, you can raise them on the `issue tracker`_ or the `pytest-dev mailing list`_. +In 2015 we are trying this for the first time. In February and March 2015 we will gather volunteers on both sides, in April we will do the work, and in May we will evaluate how it went. This effort is being coordinated by Brianna Laugher. If you have any questions or comments, you can raise them on the `@pytestdotorg twitter account `_ the `issue tracker`_ or the `pytest-dev mailing list`_. -.. _`issue tracker`: https://bitbucket.org/hpk42/pytest/issue/676/adopt-pytest-month-2015 +.. _`issue tracker`: https://bitbucket.org/pytest-dev/pytest/issue/676/adopt-pytest-month-2015 .. _`pytest-dev mailing list`: https://mail.python.org/mailman/listinfo/pytest-dev .. _``: diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/announce/release-2.6.0.txt --- a/doc/en/announce/release-2.6.0.txt +++ b/doc/en/announce/release-2.6.0.txt @@ -21,7 +21,7 @@ Note also that 2.6.0 departs with the "zero reported bugs" policy because it has been too hard to keep up with it, unfortunately. Instead we are for now rather bound to work on "upvoted" issues in -the https://bitbucket.org/hpk42/pytest/issues?status=new&status=open&sort=-votes +the https://bitbucket.org/pytest-dev/pytest/issues?status=new&status=open&sort=-votes issue tracker. See docs at: diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/contact.txt --- a/doc/en/contact.txt +++ b/doc/en/contact.txt @@ -29,7 +29,7 @@ - `merlinux.eu`_ offers pytest and tox-related professional teaching and consulting. -.. _`pytest issue tracker`: http://bitbucket.org/hpk42/pytest/issues/ +.. _`pytest issue tracker`: http://bitbucket.org/pytest-dev/pytest/issues/ .. _`old issue tracker`: http://bitbucket.org/hpk42/py-trunk/issues/ .. _`merlinux.eu`: http://merlinux.eu diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/customize.txt --- a/doc/en/customize.txt +++ b/doc/en/customize.txt @@ -12,37 +12,73 @@ This will display command line and configuration file settings which were registered by installed plugins. +.. _rootdir: .. _inifiles: -How test configuration is read from configuration INI-files -------------------------------------------------------------- +initialization: determining rootdir and inifile +----------------------------------------------- -``pytest`` searches for the first matching ini-style configuration file -in the directories of command line argument and the directories above. -It looks for file basenames in this order:: +.. versionadded:: 2.7 +pytest determines a "rootdir" for each test run which depends on +the command line arguments (specified test files, paths) and on +the existence of inifiles. The determined rootdir and ini-file are +printed as part of the pytest header. The rootdir is used for constructing +"nodeids" during collection and may also be used by plugins to store +project/testrun-specific information. + +Here is the algorithm which finds the rootdir from ``args``: + +- determine the common ancestor directory for the specified ``args``. + +- look for ``pytest.ini``, ``tox.ini`` and ``setup.cfg`` files in the + ancestor directory and upwards. If one is matched, it becomes the + ini-file and its directory becomes the rootdir. An existing + ``pytest.ini`` file will always be considered a match whereas + ``tox.ini`` and ``setup.cfg`` will only match if they contain + a ``[pytest]`` section. + +- if no ini-file was found, look for ``setup.py`` upwards from + the common ancestor directory to determine the ``rootdir``. + +- if no ini-file and no ``setup.py`` was found, use the already + determined common ancestor as root directory. This allows to + work with pytest in structures that are not part of a package + and don't have any particular ini-file configuration. + +Note that options from multiple ini-files candidates are never merged, +the first one wins (``pytest.ini`` always wins even if it does not +contain a ``[pytest]`` section). + +The ``config`` object will subsequently carry these attributes: + +- ``config.rootdir``: the determined root directory, guaranteed to exist. + +- ``config.inifile``: the determined ini-file, may be ``None``. + +The rootdir is used a reference directory for constructing test +addresses ("nodeids") and can be used also by plugins for storing +per-testrun information. + +Example:: + + py.test path/to/testdir path/other/ + +will determine the common ancestor as ``path`` and then +check for ini-files as follows:: + + # first look for pytest.ini files + path/pytest.ini + path/setup.cfg # must also contain [pytest] section to match + path/tox.ini # must also contain [pytest] section to match pytest.ini - tox.ini - setup.cfg + ... # all the way down to the root -Searching stops when the first ``[pytest]`` section is found in any of -these files. There is no merging of configuration values from multiple -files. Example:: + # now look for setup.py + path/setup.py + setup.py + ... # all the way down to the root - py.test path/to/testdir - -will look in the following dirs for a config file:: - - path/to/testdir/pytest.ini - path/to/testdir/tox.ini - path/to/testdir/setup.cfg - path/to/pytest.ini - path/to/tox.ini - path/to/setup.cfg - ... # up until root of filesystem - -If argument is provided to a ``pytest`` run, the current working directory -is used to start the search. .. _`how to change command line options defaults`: .. _`adding default options`: @@ -67,6 +103,8 @@ From now on, running ``pytest`` will add the specified options. + + Builtin configuration file options ---------------------------------------------- diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -78,20 +78,20 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 1 items - + test_smtpsimple.py F - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 > assert "merlinux" in msg E TypeError: Type str doesn't support the buffer API - + test_smtpsimple.py:11: TypeError ========================= 1 failed in 0.28 seconds ========================= @@ -195,31 +195,31 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 collected 2 items - + test_module.py FF - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError ________________________________ test_noop _________________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ========================= 2 failed in 0.28 seconds ========================= @@ -268,7 +268,7 @@ $ py.test -s -q --tb=no FFteardown smtp - + 2 failed in 0.21 seconds We see that the ``smtp`` instance is finalized after the two @@ -377,50 +377,50 @@ FFFF ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError __________________________ test_noop[merlinux.eu] __________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - + smtp = - + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError -------------------------- Captured stdout setup --------------------------- finalizing ________________________ test_noop[mail.python.org] ________________________ - + smtp = - + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError 4 failed in 7.02 seconds @@ -519,10 +519,10 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 2 items - + test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - + ========================= 2 passed in 6.63 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two @@ -583,7 +583,7 @@ =========================== test session starts ============================ platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 collecting ... collected 8 items - + test_module.py::test_0[1] test0 1 PASSED test_module.py::test_0[2] test0 2 @@ -602,7 +602,7 @@ PASSED test_module.py::test_2[2-mod2] test2 2 mod2 PASSED - + ========================= 8 passed in 0.01 seconds ========================= You can see that the parametrized module-scoped ``modarg`` resource caused @@ -780,4 +780,182 @@ fixtures functions starts at test classes, then test modules, then ``conftest.py`` files and finally builtin and third party plugins. +Overriding fixtures on various levels +------------------------------------- +In relatively large test suite, you most likely need to ``override`` a ``global`` or ``root`` fixture with a ``locally`` +defined one, keeping the test code readable and maintainable. + +Override a fixture on a folder (conftest) level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + def test_username(username): + assert username == 'username' + + subfolder/ + __init__.py + + conftest.py + # content of tests/subfolder/conftest.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + test_something.py + # content of tests/subfolder/test_something.py + def test_username(username): + assert username == 'overridden-username' + +As you can see, a fixture with the same name can be overridden for certain test folder level. +Note that the ``base`` or ``super`` fixture can be accessed from the ``overriding`` +fixture easily - used in the example above. + +Override a fixture on a test module level +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + @pytest.fixture + def username(): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-' + username + + def test_username(username): + assert username == 'overridden-username' + + test_something_else.py + # content of tests/test_something_else.py + import pytest + + @pytest.fixture + def username(username): + return 'overridden-else-' + username + + def test_username(username): + assert username == 'overridden-else-username' + +In the example above, a fixture with the same name can be overridden for certain test module. + + +Override a fixture with direct test parametrization +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture + def username(): + return 'username' + + @pytest.fixture + def other_username(username): + return 'other-' + username + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.mark.parametrize('username', ['directly-overridden-username']) + def test_username(username): + assert username == 'directly-overridden-username' + + @pytest.mark.parametrize('username', ['directly-overridden-username-other']) + def test_username_other(other_username): + assert username == 'other-directly-overridden-username-other' + +In the example above, a fixture value is overridden by the test parameter value. Note that the value of the fixture +can be overridden this way even if the test doesn't use it directly (doesn't mention it in the function prototype). + + +Override a parametrized fixture with non-parametrized one and vice versa +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Given the tests file structure is: + +:: + + tests/ + __init__.py + + conftest.py + # content of tests/conftest.py + import pytest + + @pytest.fixture(params=['one', 'two', 'three']) + def parametrized_username(request): + return request.param + + @pytest.fixture + def non_parametrized_username(request): + return 'username' + + test_something.py + # content of tests/test_something.py + import pytest + + @pytest.fixture + def parametrized_username(): + return 'overridden-username' + + @pytest.fixture(params=['one', 'two', 'three']) + def non_parametrized_username(request): + return request.param + + def test_username(parametrized_username): + assert parametrized_username == 'overridden-username' + + def test_parametrized_username(non_parametrized_username): + assert non_parametrized_username in ['one', 'two', 'three'] + + test_something_else.py + # content of tests/test_something_else.py + def test_username(parametrized_username): + assert parametrized_username in ['one', 'two', 'three'] + + def test_username(non_parametrized_username): + assert non_parametrized_username == 'username' + +In the example above, a parametrized fixture is overridden with a non-parametrized version, and +a non-parametrized fixture is overridden with a parametrized version for certain test module. +The same applies for the test folder level obviously. diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/index.txt --- a/doc/en/index.txt +++ b/doc/en/index.txt @@ -1,7 +1,8 @@ .. _features: +.. note:: - Are you an experienced pytest user, or an open source project that needs some help getting started with pytest? April 2015 is `adopt pytest month`_! + Are you an experienced pytest user, or an open source project that needs some help getting started with pytest? **April 2015** is `adopt pytest month`_! .. _`adopt pytest month`: adopt.html diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/nose.txt --- a/doc/en/nose.txt +++ b/doc/en/nose.txt @@ -39,13 +39,13 @@ it doesn't seem useful to duplicate the unittest-API like nose does. If you however rather think pytest should support the unittest-spelling on plain classes please post `to this issue - `_. + `_. - nose imports test modules with the same import path (e.g. ``tests.test_mod``) but different file system paths (e.g. ``tests/test_mode.py`` and ``other/tests/test_mode.py``) by extending sys.path/import semantics. pytest does not do that - but there is discussion in `issue268 `_ for adding some support. Note that + but there is discussion in `issue268 `_ for adding some support. Note that `nose2 choose to avoid this sys.path/import hackery `_. - nose-style doctests are not collected and executed correctly, diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/plugins.txt --- a/doc/en/plugins.txt +++ b/doc/en/plugins.txt @@ -1,7 +1,7 @@ .. _plugins: Working with plugins and conftest files -============================================= +======================================= ``pytest`` implements all aspects of configuration, collection, running and reporting by calling `well specified hooks`_. Virtually any Python module can be registered as a plugin. It can implement any number of hook functions (usually two or three) which all have a ``pytest_`` prefix, making hook functions easy to distinguish and find. There are three basic location types: @@ -9,14 +9,14 @@ * `external plugins`_: modules discovered through `setuptools entry points`_ * `conftest.py plugins`_: modules auto-discovered in test directories -.. _`pytest/plugin`: http://bitbucket.org/hpk42/pytest/src/tip/pytest/plugin/ +.. _`pytest/plugin`: http://bitbucket.org/pytest-dev/pytest/src/tip/pytest/plugin/ .. _`conftest.py plugins`: .. _`conftest.py`: .. _`localplugin`: .. _`conftest`: conftest.py: local per-directory plugins --------------------------------------------------------------- +---------------------------------------- local ``conftest.py`` plugins contain directory-specific hook implementations. Session and test running activities will @@ -55,7 +55,7 @@ .. _`extplugins`: Installing External Plugins / Searching ------------------------------------------------------- +--------------------------------------- Installing a plugin happens through any usual Python installation tool, for example:: @@ -112,17 +112,17 @@ To see a complete list of all plugins with their latest testing status against different py.test and Python versions, please visit -`pytest-plugs `_. +`plugincompat `_. You may also discover more plugins through a `pytest- pypi.python.org search`_. .. _`available installable plugins`: .. _`pytest- pypi.python.org search`: http://pypi.python.org/pypi?%3Aaction=search&term=pytest-&submit=search + Writing a plugin by looking at examples ------------------------------------------------------- +--------------------------------------- -.. _`Distribute`: http://pypi.python.org/pypi/distribute .. _`setuptools`: http://pypi.python.org/pypi/setuptools If you want to write a plugin, there are many real-life examples @@ -135,18 +135,22 @@ All of these plugins implement the documented `well specified hooks`_ to extend and add functionality. +You can also :ref:`contribute your plugin to pytest-dev` +once it has some happy users other than yourself. + + .. _`setuptools entry points`: Making your plugin installable by others ------------------------------------------------ +---------------------------------------- If you want to make your plugin externally available, you may define a so-called entry point for your distribution so that ``pytest`` finds your plugin module. Entry points are -a feature that is provided by `setuptools`_ or `Distribute`_. -pytest looks up the ``pytest11`` entrypoint to discover its +a feature that is provided by `setuptools`_. pytest looks up +the ``pytest11`` entrypoint to discover its plugins and you can thus make your plugin available by defining -it in your setuptools/distribute-based setup-invocation: +it in your setuptools-invocation: .. sourcecode:: python @@ -169,10 +173,11 @@ ``myproject.pluginmodule`` as a plugin which can define `well specified hooks`_. + .. _`pluginorder`: Plugin discovery order at tool startup --------------------------------------------- +-------------------------------------- ``pytest`` loads plugin modules at tool startup in the following way: @@ -199,7 +204,7 @@ Requiring/Loading plugins in a test module or conftest file -------------------------------------------------------------- +----------------------------------------------------------- You can require plugins in a test module or a conftest file like this:: @@ -214,7 +219,7 @@ Accessing another plugin by name --------------------------------------------- +-------------------------------- If a plugin wants to collaborate with code from another plugin it can obtain a reference through @@ -230,7 +235,7 @@ .. _`findpluginname`: Finding out which plugins are active ----------------------------------------------------------------------------- +------------------------------------ If you want to find out which plugins are active in your environment you can type:: @@ -244,7 +249,7 @@ .. _`cmdunregister`: Deactivating / unregistering a plugin by name ----------------------------------------------------------------------------- +--------------------------------------------- You can prevent plugins from loading or unregister them:: @@ -257,11 +262,11 @@ .. _`builtin plugins`: pytest default plugin reference -==================================== +=============================== You can find the source code for the following plugins -in the `pytest repository `_. +in the `pytest repository `_. .. autosummary:: @@ -291,10 +296,10 @@ .. _`well specified hooks`: pytest hook reference -==================================== +===================== Hook specification and validation ------------------------------------------ +--------------------------------- ``pytest`` calls hook functions to implement initialization, running, test execution and reporting. When ``pytest`` loads a plugin it validates @@ -305,7 +310,7 @@ hook name itself you get an error showing the available arguments. Initialization, command line and configuration hooks --------------------------------------------------------------------- +---------------------------------------------------- .. currentmodule:: _pytest.hookspec @@ -319,7 +324,7 @@ .. autofunction:: pytest_unconfigure Generic "runtest" hooks ------------------------------- +----------------------- All runtest related hooks receive a :py:class:`pytest.Item` object. @@ -339,7 +344,7 @@ the reporting hook to print information about a test run. Collection hooks ------------------------------- +---------------- ``pytest`` calls the following hooks for collecting files and directories: @@ -359,7 +364,7 @@ .. autofunction:: pytest_collection_modifyitems Reporting hooks ------------------------------- +--------------- Session related reporting hooks: @@ -375,7 +380,7 @@ Debugging/Interaction hooks --------------------------------------- +--------------------------- There are few hooks which can be used for special reporting or interaction with exceptions: @@ -400,7 +405,7 @@ For an example, see `newhooks.py`_ from :ref:`xdist`. -.. _`newhooks.py`: https://bitbucket.org/hpk42/pytest-xdist/src/52082f70e7dd04b00361091b8af906c60fd6700f/xdist/newhooks.py?at=default +.. _`newhooks.py`: https://bitbucket.org/pytest-dev/pytest-xdist/src/52082f70e7dd04b00361091b8af906c60fd6700f/xdist/newhooks.py?at=default Using hooks from 3rd party plugins @@ -468,7 +473,7 @@ Reference of objects involved in hooks -=========================================================== +====================================== .. autoclass:: _pytest.config.Config() :members: diff -r a08399082bfa05de5b13b807b332709017099cf1 -r 4d97420fe29ad351f9a1fe54e8063d21488e807d doc/en/plugins_index/index.txt --- a/doc/en/plugins_index/index.txt +++ b/doc/en/plugins_index/index.txt @@ -4,168 +4,224 @@ =========================== The table below contains a listing of plugins found in PyPI and -their status when tested using py.test **2.6.4.dev1** and python 2.7 and +their status when tested using py.test **2.7.0** and python 2.7 and 3.3. A complete listing can also be found at -`pytest-plugs `_, which contains tests +`plugincompat `_, which contains tests status against other py.test releases. -==================================================================================== ================================================================================================================= ================================================================================================================= =========================================================================== ============================================================================================================================================= - Name Py27 Py34 Home Summary -==================================================================================== ================================================================================================================= ================================================================================================================= =========================================================================== ============================================================================================================================================= - `pytest-allure-adaptor `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-allure-adaptor-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Plugin for py.test to generate allure xml reports - :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-allure-adaptor-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/allure-framework/allure-python - `pytest-bdd `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bdd-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png BDD for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bdd-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/olegpidsadnyi/pytest-bdd - `pytest-beds `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-beds-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Fixtures for testing Google Appengine (GAE) apps - :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-beds-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/kaste/pytest-beds - `pytest-bench `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bench-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Benchmark utility that plugs into pytest. - :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bench-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/concordusapps/pytest-bench - `pytest-blockage `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-blockage-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Disable network requests during a test run. - :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-blockage-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/rob-b/pytest-blockage - `pytest-browsermob-proxy `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png BrowserMob proxy plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/davehunt/pytest-browsermob-proxy - `pytest-bugzilla `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-bugzilla-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test bugzilla integration plugin - :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-bugzilla-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/nibrahim/pytest_bugzilla - `pytest-cache `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cache-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest plugin with mechanisms for caching across test runs - :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cache-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hpk42/pytest-cache/ - `pytest-capturelog `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-capturelog-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test plugin to capture log messages - :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-capturelog-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/memedough/pytest-capturelog/overview - `pytest-codecheckers `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-codecheckers-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest plugin to add source code sanity checks (pep8 and friends) - :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-codecheckers-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/ - `pytest-config `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-config-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Base configurations and utilities for developing your Python project test suite with pytest. - :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-config-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/buzzfeed/pytest_config - `pytest-contextfixture `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-contextfixture-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Define pytest fixtures as context managers. - :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-contextfixture-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/pelme/pytest-contextfixture/ - `pytest-couchdbkit `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-couchdbkit-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test extension for per-test couchdb databases using couchdbkit - :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-couchdbkit-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-couchdbkit - `pytest-cov `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cov-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing - :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cov-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/schlamar/pytest-cov - `pytest-cpp `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cpp-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-cpp-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Use pytest's runner to discover and execute C++ tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-cpp-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-cpp-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/nicoddemus/pytest-cpp - `pytest-dbfixtures `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbfixtures-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Databases fixtures plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbfixtures-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/ClearcodeHQ/pytest-dbfixtures - `pytest-dbus-notification `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-dbus-notification-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png D-BUS notifications for pytest results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-dbus-notification-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/bmathieu33/pytest-dbus-notification - `pytest-describe `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-describe-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-describe-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Describe-style plugin for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-describe-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-describe-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/ropez/pytest-describe - `pytest-diffeo `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-diffeo-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Common py.test support for Diffeo packages - :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-diffeo-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/diffeo/pytest-diffeo - `pytest-django `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-latest?py=py34&pytest=2.6.4.dev1 `link `_ A Django plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-latest?py=py34&pytest=2.6.4.dev1 - `pytest-django-haystack `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-haystack-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Cleanup your Haystack indexes between tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-haystack-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/rouge8/pytest-django-haystack - `pytest-django-lite `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-django-lite-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png The bare minimum to integrate py.test with Django. - :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-django-lite-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/dcramer/pytest-django-lite - `pytest-echo `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-echo-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-echo-latest?py=py34&pytest=2.6.4.dev1 `link `_ pytest plugin with mechanisms for echoing environment variables, package version and generic attributes - :target: http://pytest-plugs.herokuapp.com/output/pytest-echo-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-echo-latest?py=py34&pytest=2.6.4.dev1 - `pytest-eradicate `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-eradicate-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to check for commented out code - :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-eradicate-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/spil-johan/pytest-eradicate - `pytest-figleaf `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-figleaf-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test figleaf coverage plugin - :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-figleaf-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hpk42/pytest-figleaf - `pytest-fixture-tools `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-fixture-tools-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-fixture-tools-latest?py=py34&pytest=2.6.4.dev1 ? Plugin for pytest which provides tools for fixtures - :target: http://pytest-plugs.herokuapp.com/output/pytest-fixture-tools-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-fixture-tools-latest?py=py34&pytest=2.6.4.dev1 - `pytest-flakes `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flakes-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to check source code with pyflakes - :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-flakes-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/fschulze/pytest-flakes - `pytest-flask `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flask-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-flask-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png A set of py.test fixtures to test Flask applications. - :target: http://pytest-plugs.herokuapp.com/output/pytest-flask-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-flask-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/vitalk/pytest-flask - `pytest-greendots `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-greendots-latest?py=py34&pytest=2.6.4.dev1 ? Green progress dots - :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-greendots-latest?py=py34&pytest=2.6.4.dev1 - `pytest-growl `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-growl-latest?py=py34&pytest=2.6.4.dev1 ? Growl notifications for pytest results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-growl-latest?py=py34&pytest=2.6.4.dev1 - `pytest-httpbin `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpbin-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Easily test your HTTP library against a local copy of httpbin - :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpbin-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/kevin1024/pytest-httpbin - `pytest-httpretty `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-httpretty-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png A thin wrapper of HTTPretty for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-httpretty-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/papaeye/pytest-httpretty - `pytest-incremental `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-incremental-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png an incremental test runner (pytest plugin) - :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-incremental-latest?py=py34&pytest=2.6.4.dev1 :target: https://bitbucket.org/schettino72/pytest-incremental - `pytest-instafail `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-instafail-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test plugin to show failures instantly - :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-instafail-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/jpvanhal/pytest-instafail - `pytest-ipdb `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ipdb-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png A py.test plug-in to enable drop to ipdb debugger on test failure. - :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-ipdb-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/mverteuil/pytest-ipdb - `pytest-jira `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-jira-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test JIRA integration plugin, using markers - :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-jira-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/jlaska/pytest_jira - `pytest-knows `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-knows-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png A pytest plugin that can automaticly skip test case based on dependence info calculated by trace - :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-knows-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/mapix/ptknows - `pytest-konira `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-konira-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Run Konira DSL tests with py.test - :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-konira-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/alfredodeza/pytest-konira - `pytest-localserver `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-localserver-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test plugin to test server connections locally. - :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-localserver-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/basti/pytest-localserver/ - `pytest-marker-bugzilla `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test bugzilla integration plugin, using markers - :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/eanxgeek/pytest_marker_bugzilla - `pytest-markfiltration `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-markfiltration-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png UNKNOWN - :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-markfiltration-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/adamgoucher/pytest-markfiltration - `pytest-marks `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-marks-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png UNKNOWN - :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-marks-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/adamgoucher/pytest-marks - `pytest-mock `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mock-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Thin-wrapper around the mock package for easier use with py.test - :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-mock-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/nicoddemus/pytest-mock/ - `pytest-monkeyplus `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-monkeyplus-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest's monkeypatch subclass with extra functionalities - :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-monkeyplus-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hsoft/pytest-monkeyplus/ - `pytest-mozwebqa `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-mozwebqa-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Mozilla WebQA plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-mozwebqa-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/davehunt/pytest-mozwebqa - `pytest-oerp `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-oerp-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to test OpenERP modules - :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-oerp-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/santagada/pytest-oerp/ - `pytest-ordering `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-ordering-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to run your tests in a specific order - :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-ordering-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/ftobia/pytest-ordering - `pytest-osxnotify `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-osxnotify-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png OS X notifications for py.test results. - :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-osxnotify-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/dbader/pytest-osxnotify - `pytest-paste-config `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-paste-config-latest?py=py34&pytest=2.6.4.dev1 ? Allow setting the path to a paste config file - :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-paste-config-latest?py=py34&pytest=2.6.4.dev1 - `pytest-pep8 `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pep8-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest plugin to check PEP8 requirements - :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pep8-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hpk42/pytest-pep8/ - `pytest-pipeline `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pipeline-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pipeline-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Pytest plugin for functional testing of data analysis pipelines - :target: http://pytest-plugs.herokuapp.com/output/pytest-pipeline-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pipeline-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/bow/pytest_pipeline - `pytest-poo `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-poo-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Visualize your crappy tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-poo-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/pelme/pytest-poo - `pytest-pycharm `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pycharm-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Plugin for py.test to enter PyCharm debugger on uncaught exceptions - :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pycharm-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/jlubcke/pytest-pycharm - `pytest-pydev `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pydev-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test plugin to connect to a remote debug server with PyDev or PyCharm. - :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pydev-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/basti/pytest-pydev/ - `pytest-pythonpath `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-pythonpath-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin for adding to the PYTHONPATH from command line or configs. - :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-pythonpath-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/bigsassy/pytest-pythonpath - `pytest-qt `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-qt-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest support for PyQt and PySide applications - :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-qt-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/nicoddemus/pytest-qt - `pytest-quickcheck `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-quickcheck-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest plugin to generate random data inspired by QuickCheck - :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-quickcheck-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/t2y/pytest-quickcheck/ - `pytest-rage `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rage-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to implement PEP712 - :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-rage-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/santagada/pytest-rage/ - `pytest-raisesregexp `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-raisesregexp-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Simple pytest plugin to look for regex in Exceptions - :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-raisesregexp-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/Walkman/pytest_raisesregexp - `pytest-random `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-random-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test plugin to randomize tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-random-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/klrmn/pytest-random - `pytest-regtest `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-regtest-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-regtest-latest?py=py34&pytest=2.6.4.dev1 `link `_ py.test plugin for regression tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-regtest-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-regtest-latest?py=py34&pytest=2.6.4.dev1 - `pytest-rerunfailures `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-rerunfailures-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test plugin to re-run tests to eliminate flakey failures - :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-rerunfailures-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/klrmn/pytest-rerunfailures - `pytest-runfailed `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runfailed-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png implement a --failed option for pytest - :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-runfailed-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/dmerejkowsky/pytest-runfailed - `pytest-runner `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-runner-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png Invoke py.test as distutils command with dependency resolution. - :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-runner-latest?py=py34&pytest=2.6.4.dev1 :target: https://bitbucket.org/jaraco/pytest-runner - `pytest-sftpserver `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sftpserver-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test plugin to locally test sftp server connections. - :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-sftpserver-latest?py=py34&pytest=2.6.4.dev1 :target: http://github.com/ulope/pytest-sftpserver/ - `pytest-spec `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-spec-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png pytest plugin to display test execution output like a SPECIFICATION - :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-spec-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/pchomik/pytest-spec - `pytest-splinter `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-splinter-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Splinter plugin for pytest testing framework - :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-splinter-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/pytest-dev/pytest-splinter - `pytest-stepwise `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-stepwise-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png Run a test suite one failing test at a time. - :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-stepwise-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/nip3o/pytest-stepwise - `pytest-sugar `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-sugar-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png py.test is a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly). - :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-sugar-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/Frozenball/pytest-sugar - `pytest-timeout `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-timeout-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test plugin to abort hanging tests - :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-timeout-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/flub/pytest-timeout/ - `pytest-twisted `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-twisted-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png A twisted plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-twisted-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/schmir/pytest-twisted - `pytest-xdist `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xdist-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png py.test xdist plugin for distributed testing and loop-on-failing modes - :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-xdist-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hpk42/pytest-xdist - `pytest-xprocess `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-xprocess-latest?py=py34&pytest=2.6.4.dev1 .. image:: bitbucket.png pytest plugin to manage external processes across test runs - :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-xprocess-latest?py=py34&pytest=2.6.4.dev1 :target: http://bitbucket.org/hpk42/pytest-xprocess/ - `pytest-yamlwsgi `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-yamlwsgi-latest?py=py34&pytest=2.6.4.dev1 ? Run tests against wsgi apps defined in yaml - :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-yamlwsgi-latest?py=py34&pytest=2.6.4.dev1 - `pytest-zap `_ .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py27&pytest=2.6.4.dev1 .. image:: http://pytest-plugs.herokuapp.com/status/pytest-zap-latest?py=py34&pytest=2.6.4.dev1 .. image:: github.png OWASP ZAP plugin for py.test. - :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py27&pytest=2.6.4.dev1 :target: http://pytest-plugs.herokuapp.com/output/pytest-zap-latest?py=py34&pytest=2.6.4.dev1 :target: https://github.com/davehunt/pytest-zap +============================================================================================ ================================================================================================================ ================================================================================================================ =========================================================================== ============================================================================================================================================= + Name Py27 Py34 Home Summary +============================================================================================ ================================================================================================================ ================================================================================================================ =========================================================================== ============================================================================================================================================= + `pytest-allure-adaptor `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-allure-adaptor-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-allure-adaptor-latest?py=py34&pytest=2.7.0 .. image:: github.png Plugin for py.test to generate allure xml reports + :target: http://plugincompat.herokuapp.com/output/pytest-allure-adaptor-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-allure-adaptor-latest?py=py34&pytest=2.7.0 :target: https://github.com/allure-framework/allure-python + `pytest-ansible `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-ansible-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-ansible-latest?py=py34&pytest=2.7.0 .. image:: github.png UNKNOWN + :target: http://plugincompat.herokuapp.com/output/pytest-ansible-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-ansible-latest?py=py34&pytest=2.7.0 :target: http://github.com/jlaska/pytest-ansible + `pytest-autochecklog `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-autochecklog-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-autochecklog-latest?py=py34&pytest=2.7.0 .. image:: github.png automatically check condition and log all the checks + :target: http://plugincompat.herokuapp.com/output/pytest-autochecklog-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-autochecklog-latest?py=py34&pytest=2.7.0 :target: https://github.com/steven004/python-autochecklog + `pytest-bdd `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-bdd-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-bdd-latest?py=py34&pytest=2.7.0 .. image:: github.png BDD for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-bdd-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-bdd-latest?py=py34&pytest=2.7.0 :target: https://github.com/olegpidsadnyi/pytest-bdd + `pytest-beakerlib `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-beakerlib-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-beakerlib-latest?py=py34&pytest=2.7.0 `link `_ A pytest plugin that reports test results to the BeakerLib framework + :target: http://plugincompat.herokuapp.com/output/pytest-beakerlib-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-beakerlib-latest?py=py34&pytest=2.7.0 + `pytest-beds `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-beds-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-beds-latest?py=py34&pytest=2.7.0 .. image:: github.png Fixtures for testing Google Appengine (GAE) apps + :target: http://plugincompat.herokuapp.com/output/pytest-beds-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-beds-latest?py=py34&pytest=2.7.0 :target: https://github.com/kaste/pytest-beds + `pytest-bench `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-bench-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-bench-latest?py=py34&pytest=2.7.0 .. image:: github.png Benchmark utility that plugs into pytest. + :target: http://plugincompat.herokuapp.com/output/pytest-bench-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-bench-latest?py=py34&pytest=2.7.0 :target: http://github.com/concordusapps/pytest-bench + `pytest-benchmark `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-benchmark-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-benchmark-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test fixture for benchmarking code + :target: http://plugincompat.herokuapp.com/output/pytest-benchmark-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-benchmark-latest?py=py34&pytest=2.7.0 :target: https://github.com/ionelmc/pytest-benchmark + `pytest-blockage `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-blockage-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-blockage-latest?py=py34&pytest=2.7.0 .. image:: github.png Disable network requests during a test run. + :target: http://plugincompat.herokuapp.com/output/pytest-blockage-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-blockage-latest?py=py34&pytest=2.7.0 :target: https://github.com/rob-b/pytest-blockage + `pytest-bpdb `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-bpdb-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-bpdb-latest?py=py34&pytest=2.7.0 .. image:: github.png A py.test plug-in to enable drop to bpdb debugger on test failure. + :target: http://plugincompat.herokuapp.com/output/pytest-bpdb-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-bpdb-latest?py=py34&pytest=2.7.0 :target: https://github.com/slafs/pytest-bpdb + `pytest-browsermob-proxy `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-browsermob-proxy-latest?py=py34&pytest=2.7.0 .. image:: github.png BrowserMob proxy plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-browsermob-proxy-latest?py=py34&pytest=2.7.0 :target: https://github.com/davehunt/pytest-browsermob-proxy + `pytest-bugzilla `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-bugzilla-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-bugzilla-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test bugzilla integration plugin + :target: http://plugincompat.herokuapp.com/output/pytest-bugzilla-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-bugzilla-latest?py=py34&pytest=2.7.0 :target: http://github.com/nibrahim/pytest_bugzilla + `pytest-cache `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-cache-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-cache-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest plugin with mechanisms for caching across test runs + :target: http://plugincompat.herokuapp.com/output/pytest-cache-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-cache-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hpk42/pytest-cache/ + `pytest-cagoule `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-cagoule-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-cagoule-latest?py=py34&pytest=2.7.0 .. image:: github.png Pytest plugin to only run tests affected by changes + :target: http://plugincompat.herokuapp.com/output/pytest-cagoule-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-cagoule-latest?py=py34&pytest=2.7.0 :target: https://github.com/davidszotten/pytest-cagoule + `pytest-capturelog `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-capturelog-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-capturelog-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test plugin to capture log messages + :target: http://plugincompat.herokuapp.com/output/pytest-capturelog-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-capturelog-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/memedough/pytest-capturelog/overview + `pytest-catchlog `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-catchlog-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-catchlog-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin to catch log messages. This is a fork of pytest-capturelog. + :target: http://plugincompat.herokuapp.com/output/pytest-catchlog-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-catchlog-latest?py=py34&pytest=2.7.0 :target: https://github.com/eisensheng/pytest-catchlog + `pytest-circleci `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-circleci-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-circleci-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin for CircleCI + :target: http://plugincompat.herokuapp.com/output/pytest-circleci-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-circleci-latest?py=py34&pytest=2.7.0 :target: https://github.com/micktwomey/pytest-circleci + `pytest-cloud `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-cloud-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-cloud-latest?py=py34&pytest=2.7.0 .. image:: github.png Distributed tests planner plugin for pytest testing framework. + :target: http://plugincompat.herokuapp.com/output/pytest-cloud-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-cloud-latest?py=py34&pytest=2.7.0 :target: https://github.com/pytest-dev/pytest-cloud + `pytest-codecheckers `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-codecheckers-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-codecheckers-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest plugin to add source code sanity checks (pep8 and friends) + :target: http://plugincompat.herokuapp.com/output/pytest-codecheckers-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-codecheckers-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-codecheckers/ + `pytest-colordots `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-colordots-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-colordots-latest?py=py34&pytest=2.7.0 .. image:: github.png Colorizes the progress indicators + :target: http://plugincompat.herokuapp.com/output/pytest-colordots-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-colordots-latest?py=py34&pytest=2.7.0 :target: https://github.com/svenstaro/pytest-colordots + `pytest-config `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-config-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-config-latest?py=py34&pytest=2.7.0 .. image:: github.png Base configurations and utilities for developing your Python project test suite with pytest. + :target: http://plugincompat.herokuapp.com/output/pytest-config-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-config-latest?py=py34&pytest=2.7.0 :target: https://github.com/buzzfeed/pytest_config + `pytest-contextfixture `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-contextfixture-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-contextfixture-latest?py=py34&pytest=2.7.0 .. image:: github.png Define pytest fixtures as context managers. + :target: http://plugincompat.herokuapp.com/output/pytest-contextfixture-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-contextfixture-latest?py=py34&pytest=2.7.0 :target: http://github.com/pelme/pytest-contextfixture/ + `pytest-couchdbkit `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-couchdbkit-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-couchdbkit-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test extension for per-test couchdb databases using couchdbkit + :target: http://plugincompat.herokuapp.com/output/pytest-couchdbkit-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-couchdbkit-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/RonnyPfannschmidt/pytest-couchdbkit + `pytest-cov `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-cov-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-cov-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin for coverage reporting with support for both centralised and distributed testing, including subprocesses and multiprocessing + :target: http://plugincompat.herokuapp.com/output/pytest-cov-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-cov-latest?py=py34&pytest=2.7.0 :target: https://github.com/schlamar/pytest-cov + `pytest-cpp `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-cpp-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-cpp-latest?py=py34&pytest=2.7.0 .. image:: github.png Use pytest's runner to discover and execute C++ tests + :target: http://plugincompat.herokuapp.com/output/pytest-cpp-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-cpp-latest?py=py34&pytest=2.7.0 :target: http://github.com/pytest-dev/pytest-cpp + `pytest-dbfixtures `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-dbfixtures-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-dbfixtures-latest?py=py34&pytest=2.7.0 .. image:: github.png Databases fixtures plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-dbfixtures-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-dbfixtures-latest?py=py34&pytest=2.7.0 :target: https://github.com/ClearcodeHQ/pytest-dbfixtures + `pytest-dbus-notification `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-dbus-notification-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-dbus-notification-latest?py=py34&pytest=2.7.0 .. image:: github.png D-BUS notifications for pytest results. + :target: http://plugincompat.herokuapp.com/output/pytest-dbus-notification-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-dbus-notification-latest?py=py34&pytest=2.7.0 :target: https://github.com/bmathieu33/pytest-dbus-notification + `pytest-describe `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-describe-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-describe-latest?py=py34&pytest=2.7.0 .. image:: github.png Describe-style plugin for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-describe-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-describe-latest?py=py34&pytest=2.7.0 :target: https://github.com/ropez/pytest-describe + `pytest-diffeo `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-diffeo-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-diffeo-latest?py=py34&pytest=2.7.0 .. image:: github.png Common py.test support for Diffeo packages + :target: http://plugincompat.herokuapp.com/output/pytest-diffeo-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-diffeo-latest?py=py34&pytest=2.7.0 :target: https://github.com/diffeo/pytest-diffeo + `pytest-django `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-django-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-django-latest?py=py34&pytest=2.7.0 `link `_ A Django plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-django-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-django-latest?py=py34&pytest=2.7.0 + `pytest-django-haystack `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-django-haystack-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-django-haystack-latest?py=py34&pytest=2.7.0 .. image:: github.png Cleanup your Haystack indexes between tests + :target: http://plugincompat.herokuapp.com/output/pytest-django-haystack-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-django-haystack-latest?py=py34&pytest=2.7.0 :target: http://github.com/rouge8/pytest-django-haystack + `pytest-django-lite `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-django-lite-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-django-lite-latest?py=py34&pytest=2.7.0 .. image:: github.png The bare minimum to integrate py.test with Django. + :target: http://plugincompat.herokuapp.com/output/pytest-django-lite-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-django-lite-latest?py=py34&pytest=2.7.0 :target: https://github.com/dcramer/pytest-django-lite + `pytest-django-sqlcount `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-django-sqlcount-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-django-sqlcount-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin for reporting the number of SQLs executed per django testcase. + :target: http://plugincompat.herokuapp.com/output/pytest-django-sqlcount-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-django-sqlcount-latest?py=py34&pytest=2.7.0 :target: https://github.com/stj/pytest-django-sqlcount + `pytest-echo `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-echo-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-echo-latest?py=py34&pytest=2.7.0 `link `_ pytest plugin with mechanisms for echoing environment variables, package version and generic attributes + :target: http://plugincompat.herokuapp.com/output/pytest-echo-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-echo-latest?py=py34&pytest=2.7.0 + `pytest-env `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-env-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-env-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin that allows you to add environment variables. + :target: http://plugincompat.herokuapp.com/output/pytest-env-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-env-latest?py=py34&pytest=2.7.0 :target: https://github.com/MobileDynasty/pytest-env + `pytest-eradicate `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-eradicate-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-eradicate-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to check for commented out code + :target: http://plugincompat.herokuapp.com/output/pytest-eradicate-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-eradicate-latest?py=py34&pytest=2.7.0 :target: https://github.com/spil-johan/pytest-eradicate + `pytest-figleaf `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-figleaf-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-figleaf-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test figleaf coverage plugin + :target: http://plugincompat.herokuapp.com/output/pytest-figleaf-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-figleaf-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hpk42/pytest-figleaf + `pytest-fixture-tools `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-fixture-tools-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-fixture-tools-latest?py=py34&pytest=2.7.0 ? Plugin for pytest which provides tools for fixtures + :target: http://plugincompat.herokuapp.com/output/pytest-fixture-tools-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-fixture-tools-latest?py=py34&pytest=2.7.0 + `pytest-flakes `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-flakes-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-flakes-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to check source code with pyflakes + :target: http://plugincompat.herokuapp.com/output/pytest-flakes-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-flakes-latest?py=py34&pytest=2.7.0 :target: https://github.com/fschulze/pytest-flakes + `pytest-flask `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-flask-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-flask-latest?py=py34&pytest=2.7.0 .. image:: github.png A set of py.test fixtures to test Flask applications. + :target: http://plugincompat.herokuapp.com/output/pytest-flask-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-flask-latest?py=py34&pytest=2.7.0 :target: https://github.com/vitalk/pytest-flask + `pytest-greendots `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-greendots-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-greendots-latest?py=py34&pytest=2.7.0 ? Green progress dots + :target: http://plugincompat.herokuapp.com/output/pytest-greendots-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-greendots-latest?py=py34&pytest=2.7.0 + `pytest-growl `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-growl-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-growl-latest?py=py34&pytest=2.7.0 ? Growl notifications for pytest results. + :target: http://plugincompat.herokuapp.com/output/pytest-growl-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-growl-latest?py=py34&pytest=2.7.0 + `pytest-httpbin `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-httpbin-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-httpbin-latest?py=py34&pytest=2.7.0 .. image:: github.png Easily test your HTTP library against a local copy of httpbin + :target: http://plugincompat.herokuapp.com/output/pytest-httpbin-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-httpbin-latest?py=py34&pytest=2.7.0 :target: https://github.com/kevin1024/pytest-httpbin + `pytest-httpretty `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-httpretty-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-httpretty-latest?py=py34&pytest=2.7.0 .. image:: github.png A thin wrapper of HTTPretty for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-httpretty-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-httpretty-latest?py=py34&pytest=2.7.0 :target: http://github.com/papaeye/pytest-httpretty + `pytest-incremental `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-incremental-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-incremental-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png an incremental test runner (pytest plugin) + :target: http://plugincompat.herokuapp.com/output/pytest-incremental-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-incremental-latest?py=py34&pytest=2.7.0 :target: https://bitbucket.org/schettino72/pytest-incremental + `pytest-instafail `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-instafail-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-instafail-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin to show failures instantly + :target: http://plugincompat.herokuapp.com/output/pytest-instafail-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-instafail-latest?py=py34&pytest=2.7.0 :target: https://github.com/jpvanhal/pytest-instafail + `pytest-ipdb `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-ipdb-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-ipdb-latest?py=py34&pytest=2.7.0 .. image:: github.png A py.test plug-in to enable drop to ipdb debugger on test failure. + :target: http://plugincompat.herokuapp.com/output/pytest-ipdb-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-ipdb-latest?py=py34&pytest=2.7.0 :target: https://github.com/mverteuil/pytest-ipdb + `pytest-ipynb `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-ipynb-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-ipynb-latest?py=py34&pytest=2.7.0 .. image:: github.png Use pytest's runner to discover and execute tests as cells of IPython notebooks + :target: http://plugincompat.herokuapp.com/output/pytest-ipynb-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-ipynb-latest?py=py34&pytest=2.7.0 :target: http://github.com/zonca/pytest-ipynb + `pytest-jira `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-jira-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-jira-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test JIRA integration plugin, using markers + :target: http://plugincompat.herokuapp.com/output/pytest-jira-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-jira-latest?py=py34&pytest=2.7.0 :target: http://github.com/jlaska/pytest_jira + `pytest-knows `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-knows-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-knows-latest?py=py34&pytest=2.7.0 .. image:: github.png A pytest plugin that can automaticly skip test case based on dependence info calculated by trace + :target: http://plugincompat.herokuapp.com/output/pytest-knows-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-knows-latest?py=py34&pytest=2.7.0 :target: https://github.com/mapix/ptknows + `pytest-konira `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-konira-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-konira-latest?py=py34&pytest=2.7.0 .. image:: github.png Run Konira DSL tests with py.test + :target: http://plugincompat.herokuapp.com/output/pytest-konira-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-konira-latest?py=py34&pytest=2.7.0 :target: http://github.com/alfredodeza/pytest-konira + `pytest-localserver `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-localserver-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-localserver-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test plugin to test server connections locally. + :target: http://plugincompat.herokuapp.com/output/pytest-localserver-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-localserver-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/basti/pytest-localserver/ + `pytest-marker-bugzilla `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-marker-bugzilla-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test bugzilla integration plugin, using markers + :target: http://plugincompat.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-marker-bugzilla-latest?py=py34&pytest=2.7.0 :target: http://github.com/eanxgeek/pytest_marker_bugzilla + `pytest-markfiltration `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-markfiltration-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-markfiltration-latest?py=py34&pytest=2.7.0 .. image:: github.png UNKNOWN + :target: http://plugincompat.herokuapp.com/output/pytest-markfiltration-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-markfiltration-latest?py=py34&pytest=2.7.0 :target: https://github.com/adamgoucher/pytest-markfiltration + `pytest-marks `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-marks-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-marks-latest?py=py34&pytest=2.7.0 .. image:: github.png UNKNOWN + :target: http://plugincompat.herokuapp.com/output/pytest-marks-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-marks-latest?py=py34&pytest=2.7.0 :target: https://github.com/adamgoucher/pytest-marks + `pytest-mock `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-mock-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-mock-latest?py=py34&pytest=2.7.0 .. image:: github.png Thin-wrapper around the mock package for easier use with py.test + :target: http://plugincompat.herokuapp.com/output/pytest-mock-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-mock-latest?py=py34&pytest=2.7.0 :target: https://github.com/pytest-dev/pytest-mock/ + `pytest-monkeyplus `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-monkeyplus-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-monkeyplus-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest's monkeypatch subclass with extra functionalities + :target: http://plugincompat.herokuapp.com/output/pytest-monkeyplus-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-monkeyplus-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hsoft/pytest-monkeyplus/ + `pytest-mozwebqa `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-mozwebqa-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-mozwebqa-latest?py=py34&pytest=2.7.0 .. image:: github.png Mozilla WebQA plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-mozwebqa-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-mozwebqa-latest?py=py34&pytest=2.7.0 :target: https://github.com/mozilla/pytest-mozwebqa + `pytest-multihost `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-multihost-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-multihost-latest?py=py34&pytest=2.7.0 `link `_ Utility for writing multi-host tests for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-multihost-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-multihost-latest?py=py34&pytest=2.7.0 + `pytest-oerp `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-oerp-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-oerp-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to test OpenERP modules + :target: http://plugincompat.herokuapp.com/output/pytest-oerp-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-oerp-latest?py=py34&pytest=2.7.0 :target: http://github.com/santagada/pytest-oerp/ + `pytest-oot `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-oot-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-oot-latest?py=py34&pytest=2.7.0 `link `_ Run object-oriented tests in a simple format + :target: http://plugincompat.herokuapp.com/output/pytest-oot-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-oot-latest?py=py34&pytest=2.7.0 + `pytest-optional `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-optional-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-optional-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png include/exclude values of fixtures in pytest + :target: http://plugincompat.herokuapp.com/output/pytest-optional-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-optional-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/maho/pytest-optional + `pytest-ordering `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-ordering-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-ordering-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to run your tests in a specific order + :target: http://plugincompat.herokuapp.com/output/pytest-ordering-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-ordering-latest?py=py34&pytest=2.7.0 :target: https://github.com/ftobia/pytest-ordering + `pytest-osxnotify `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-osxnotify-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-osxnotify-latest?py=py34&pytest=2.7.0 .. image:: github.png OS X notifications for py.test results. + :target: http://plugincompat.herokuapp.com/output/pytest-osxnotify-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-osxnotify-latest?py=py34&pytest=2.7.0 :target: https://github.com/dbader/pytest-osxnotify + `pytest-paste-config `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-paste-config-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-paste-config-latest?py=py34&pytest=2.7.0 ? Allow setting the path to a paste config file + :target: http://plugincompat.herokuapp.com/output/pytest-paste-config-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-paste-config-latest?py=py34&pytest=2.7.0 + `pytest-pep257 `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pep257-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pep257-latest?py=py34&pytest=2.7.0 ? py.test plugin for pep257 + :target: http://plugincompat.herokuapp.com/output/pytest-pep257-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pep257-latest?py=py34&pytest=2.7.0 + `pytest-pep8 `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pep8-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pep8-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest plugin to check PEP8 requirements + :target: http://plugincompat.herokuapp.com/output/pytest-pep8-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pep8-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hpk42/pytest-pep8/ + `pytest-pipeline `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pipeline-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pipeline-latest?py=py34&pytest=2.7.0 .. image:: github.png Pytest plugin for functional testing of data analysis pipelines + :target: http://plugincompat.herokuapp.com/output/pytest-pipeline-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pipeline-latest?py=py34&pytest=2.7.0 :target: https://github.com/bow/pytest_pipeline + `pytest-poo `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-poo-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-poo-latest?py=py34&pytest=2.7.0 .. image:: github.png Visualize your crappy tests + :target: http://plugincompat.herokuapp.com/output/pytest-poo-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-poo-latest?py=py34&pytest=2.7.0 :target: http://github.com/pelme/pytest-poo + `pytest-poo-fail `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-poo-fail-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-poo-fail-latest?py=py34&pytest=2.7.0 .. image:: github.png Visualize your failed tests with poo + :target: http://plugincompat.herokuapp.com/output/pytest-poo-fail-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-poo-fail-latest?py=py34&pytest=2.7.0 :target: http://github.com/alyssa.barela/pytest-poo-fail + `pytest-pycharm `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pycharm-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pycharm-latest?py=py34&pytest=2.7.0 .. image:: github.png Plugin for py.test to enter PyCharm debugger on uncaught exceptions + :target: http://plugincompat.herokuapp.com/output/pytest-pycharm-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pycharm-latest?py=py34&pytest=2.7.0 :target: https://github.com/jlubcke/pytest-pycharm + `pytest-pydev `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pydev-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pydev-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test plugin to connect to a remote debug server with PyDev or PyCharm. + :target: http://plugincompat.herokuapp.com/output/pytest-pydev-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pydev-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/basti/pytest-pydev/ + `pytest-pyq `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pyq-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pyq-latest?py=py34&pytest=2.7.0 `link `_ Pytest fixture "q" for pyq + :target: http://plugincompat.herokuapp.com/output/pytest-pyq-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pyq-latest?py=py34&pytest=2.7.0 + `pytest-pythonpath `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-pythonpath-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-pythonpath-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin for adding to the PYTHONPATH from command line or configs. + :target: http://plugincompat.herokuapp.com/output/pytest-pythonpath-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-pythonpath-latest?py=py34&pytest=2.7.0 :target: https://github.com/bigsassy/pytest-pythonpath + `pytest-qt `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-qt-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-qt-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest support for PyQt and PySide applications + :target: http://plugincompat.herokuapp.com/output/pytest-qt-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-qt-latest?py=py34&pytest=2.7.0 :target: http://github.com/pytest-dev/pytest-qt + `pytest-quickcheck `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-quickcheck-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-quickcheck-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest plugin to generate random data inspired by QuickCheck + :target: http://plugincompat.herokuapp.com/output/pytest-quickcheck-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-quickcheck-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/t2y/pytest-quickcheck/ + `pytest-rage `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-rage-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-rage-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to implement PEP712 + :target: http://plugincompat.herokuapp.com/output/pytest-rage-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-rage-latest?py=py34&pytest=2.7.0 :target: http://github.com/santagada/pytest-rage/ + `pytest-raisesregexp `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-raisesregexp-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-raisesregexp-latest?py=py34&pytest=2.7.0 .. image:: github.png Simple pytest plugin to look for regex in Exceptions + :target: http://plugincompat.herokuapp.com/output/pytest-raisesregexp-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-raisesregexp-latest?py=py34&pytest=2.7.0 :target: https://github.com/Walkman/pytest_raisesregexp + `pytest-random `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-random-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-random-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin to randomize tests + :target: http://plugincompat.herokuapp.com/output/pytest-random-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-random-latest?py=py34&pytest=2.7.0 :target: https://github.com/klrmn/pytest-random + `pytest-readme `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-readme-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-readme-latest?py=py34&pytest=2.7.0 .. image:: github.png Test your README.md file + :target: http://plugincompat.herokuapp.com/output/pytest-readme-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-readme-latest?py=py34&pytest=2.7.0 :target: https://github.com/boxed/pytest-readme + `pytest-regtest `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-regtest-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-regtest-latest?py=py34&pytest=2.7.0 `link `_ py.test plugin for regression tests + :target: http://plugincompat.herokuapp.com/output/pytest-regtest-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-regtest-latest?py=py34&pytest=2.7.0 + `pytest-remove-stale-bytecode `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-remove-stale-bytecode-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-remove-stale-bytecode-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test plugin to remove stale byte code files. + :target: http://plugincompat.herokuapp.com/output/pytest-remove-stale-bytecode-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-remove-stale-bytecode-latest?py=py34&pytest=2.7.0 :target: https://bitbucket.org/gocept/pytest-remove-stale-bytecode/ + `pytest-rerunfailures `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-rerunfailures-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-rerunfailures-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin to re-run tests to eliminate flakey failures + :target: http://plugincompat.herokuapp.com/output/pytest-rerunfailures-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-rerunfailures-latest?py=py34&pytest=2.7.0 :target: https://github.com/klrmn/pytest-rerunfailures + `pytest-runfailed `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-runfailed-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-runfailed-latest?py=py34&pytest=2.7.0 .. image:: github.png implement a --failed option for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-runfailed-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-runfailed-latest?py=py34&pytest=2.7.0 :target: http://github.com/dmerejkowsky/pytest-runfailed + `pytest-runner `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-runner-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-runner-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png Invoke py.test as distutils command with dependency resolution. + :target: http://plugincompat.herokuapp.com/output/pytest-runner-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-runner-latest?py=py34&pytest=2.7.0 :target: https://bitbucket.org/jaraco/pytest-runner + `pytest-services `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-services-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-services-latest?py=py34&pytest=2.7.0 .. image:: github.png Services plugin for pytest testing framework + :target: http://plugincompat.herokuapp.com/output/pytest-services-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-services-latest?py=py34&pytest=2.7.0 :target: https://github.com/pytest-dev/pytest-services + `pytest-sftpserver `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-sftpserver-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-sftpserver-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test plugin to locally test sftp server connections. + :target: http://plugincompat.herokuapp.com/output/pytest-sftpserver-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-sftpserver-latest?py=py34&pytest=2.7.0 :target: http://github.com/ulope/pytest-sftpserver/ + `pytest-smartcov `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-smartcov-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-smartcov-latest?py=py34&pytest=2.7.0 .. image:: github.png Smart coverage plugin for pytest. + :target: http://plugincompat.herokuapp.com/output/pytest-smartcov-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-smartcov-latest?py=py34&pytest=2.7.0 :target: https://github.com/carljm/pytest-smartcov/ + `pytest-sourceorder `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-sourceorder-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-sourceorder-latest?py=py34&pytest=2.7.0 `link `_ Test-ordering plugin for pytest + :target: http://plugincompat.herokuapp.com/output/pytest-sourceorder-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-sourceorder-latest?py=py34&pytest=2.7.0 + `pytest-spec `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-spec-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-spec-latest?py=py34&pytest=2.7.0 .. image:: github.png pytest plugin to display test execution output like a SPECIFICATION + :target: http://plugincompat.herokuapp.com/output/pytest-spec-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-spec-latest?py=py34&pytest=2.7.0 :target: https://github.com/pchomik/pytest-spec + `pytest-splinter `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-splinter-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-splinter-latest?py=py34&pytest=2.7.0 .. image:: github.png Splinter plugin for pytest testing framework + :target: http://plugincompat.herokuapp.com/output/pytest-splinter-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-splinter-latest?py=py34&pytest=2.7.0 :target: https://github.com/pytest-dev/pytest-splinter + `pytest-stepwise `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-stepwise-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-stepwise-latest?py=py34&pytest=2.7.0 .. image:: github.png Run a test suite one failing test at a time. + :target: http://plugincompat.herokuapp.com/output/pytest-stepwise-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-stepwise-latest?py=py34&pytest=2.7.0 :target: https://github.com/nip3o/pytest-stepwise + `pytest-sugar `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-sugar-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-sugar-latest?py=py34&pytest=2.7.0 .. image:: github.png py.test is a plugin for py.test that changes the default look and feel of py.test (e.g. progressbar, show tests that fail instantly). + :target: http://plugincompat.herokuapp.com/output/pytest-sugar-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-sugar-latest?py=py34&pytest=2.7.0 :target: https://github.com/Frozenball/pytest-sugar + `pytest-timeout `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-timeout-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-timeout-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test plugin to abort hanging tests + :target: http://plugincompat.herokuapp.com/output/pytest-timeout-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-timeout-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/flub/pytest-timeout/ + `pytest-tornado `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-tornado-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-tornado-latest?py=py34&pytest=2.7.0 .. image:: github.png A py.test plugin providing fixtures and markers to simplify testing of asynchronous tornado applications. + :target: http://plugincompat.herokuapp.com/output/pytest-tornado-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-tornado-latest?py=py34&pytest=2.7.0 :target: https://github.com/eugeniy/pytest-tornado + `pytest-translations `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-translations-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-translations-latest?py=py34&pytest=2.7.0 .. image:: github.png Test your translation files + :target: http://plugincompat.herokuapp.com/output/pytest-translations-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-translations-latest?py=py34&pytest=2.7.0 :target: https://github.com/thermondo/pytest-translations + `pytest-twisted `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-twisted-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-twisted-latest?py=py34&pytest=2.7.0 .. image:: github.png A twisted plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-twisted-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-twisted-latest?py=py34&pytest=2.7.0 :target: https://github.com/schmir/pytest-twisted + `pytest-unmarked `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-unmarked-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-unmarked-latest?py=py34&pytest=2.7.0 .. image:: github.png Run only unmarked tests + :target: http://plugincompat.herokuapp.com/output/pytest-unmarked-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-unmarked-latest?py=py34&pytest=2.7.0 :target: http://github.com/alyssa.barela/pytest-unmarked + `pytest-watch `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-watch-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-watch-latest?py=py34&pytest=2.7.0 .. image:: github.png Local continuous test runner with pytest and watchdog. + :target: http://plugincompat.herokuapp.com/output/pytest-watch-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-watch-latest?py=py34&pytest=2.7.0 :target: http://github.com/joeyespo/pytest-watch + `pytest-xdist `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-xdist-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-xdist-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png py.test xdist plugin for distributed testing and loop-on-failing modes + :target: http://plugincompat.herokuapp.com/output/pytest-xdist-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-xdist-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hpk42/pytest-xdist + `pytest-xprocess `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-xprocess-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-xprocess-latest?py=py34&pytest=2.7.0 .. image:: bitbucket.png pytest plugin to manage external processes across test runs + :target: http://plugincompat.herokuapp.com/output/pytest-xprocess-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-xprocess-latest?py=py34&pytest=2.7.0 :target: http://bitbucket.org/hpk42/pytest-xprocess/ + `pytest-yamlwsgi `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-yamlwsgi-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-yamlwsgi-latest?py=py34&pytest=2.7.0 ? Run tests against wsgi apps defined in yaml + :target: http://plugincompat.herokuapp.com/output/pytest-yamlwsgi-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-yamlwsgi-latest?py=py34&pytest=2.7.0 + `pytest-zap `_ .. image:: http://plugincompat.herokuapp.com/status/pytest-zap-latest?py=py27&pytest=2.7.0 .. image:: http://plugincompat.herokuapp.com/status/pytest-zap-latest?py=py34&pytest=2.7.0 .. image:: github.png OWASP ZAP plugin for py.test. + :target: http://plugincompat.herokuapp.com/output/pytest-zap-latest?py=py27&pytest=2.7.0 :target: http://plugincompat.herokuapp.com/output/pytest-zap-latest?py=py34&pytest=2.7.0 :target: https://github.com/davehunt/pytest-zap -==================================================================================== ================================================================================================================= ================================================================================================================= =========================================================================== ============================================================================================================================================= +============================================================================================ ================================================================================================================ ================================================================================================================ =========================================================================== ============================================================================================================================================= -*(Updated on 2014-09-27)* +*(Updated on 2015-02-28)* This diff is so big that we needed to truncate the remainder. https://bitbucket.org/pytest-dev/pytest/commits/2962128b86a1/ Changeset: 2962128b86a1 Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 09:16:55+00:00 Summary: use rootdir from the fix of issue 616 Affected #: 1 file diff -r 4d97420fe29ad351f9a1fe54e8063d21488e807d -r 2962128b86a1fa8bb9d236d363f2ef55dfe4f16b _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -7,7 +7,7 @@ class Cache: def __init__(self, config): self.config = config - self._cachedir = getrootdir(config, ".cache") + self._cachedir = config.rootdir.join(".cache") self.trace = config.trace.root.get("cache") if config.getvalue("clearcache"): self.trace("clearing cachedir") @@ -76,46 +76,6 @@ json.dump(value, f, indent=2, sort_keys=True) -### XXX consider shifting part of the below to pytest config object - -def getrootdir(config, name): - """ return a best-effort root subdir for this test run. - - Starting from files specified at the command line (or cwd) - search starts upward for the first "tox.ini", "pytest.ini", - "setup.cfg" or "setup.py" file. The first directory containing - such a file will be used to return a named subdirectory - (py.path.local object). - - """ - if config.inicfg: - p = py.path.local(config.inicfg.config.path).dirpath() - else: - inibasenames = ["setup.py", "setup.cfg", "tox.ini", "pytest.ini"] - for x in getroot(config.args, inibasenames): - p = x.dirpath() - break - else: - p = py.path.local() - config.trace.get("warn")("no rootdir found, using %s" % p) - subdir = p.join(name) - config.trace("root %s: %s" % (name, subdir)) - return subdir - -def getroot(args, inibasenames): - args = [x for x in args if not str(x).startswith("-")] - if not args: - args = [py.path.local()] - for arg in args: - arg = py.path.local(arg) - for base in arg.parts(reverse=True): - for inibasename in inibasenames: - p = base.join(inibasename) - if p.check(): - yield p - - - def pytest_addoption(parser): try: ls = pkg_resources.resource_listdir('xdist', '.') https://bitbucket.org/pytest-dev/pytest/commits/8cbed53ef5b2/ Changeset: 8cbed53ef5b2 Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 09:17:32+00:00 Summary: enhance cache directtory and key handling wrt path separators Affected #: 1 file diff -r 2962128b86a1fa8bb9d236d363f2ef55dfe4f16b -r 8cbed53ef5b2b8268d27e8b1d571d61873718635 _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -3,7 +3,7 @@ import json import sys import pkg_resources - +from os.path import sep as _sep, altsetp as _altsep class Cache: def __init__(self, config): self.config = config @@ -25,21 +25,12 @@ Make sure the name contains your plugin or application identifiers to prevent clashes with other cache users. """ - if name.count("/") != 0: - raise ValueError("name is not allowed to contain '/'") - p = self._cachedir.join("d/" + name) - p.ensure(dir=1) - return p - - def _getpath(self, key): - if not key.count("/") > 1: - raise KeyError("Key must be of format 'dir/.../subname") - return self._cachedir.join(key) + if _sep in name or _altsep is not None and _altsep in name: + raise ValueError("name is not allowed to contain path separators") + return self._cachedir.ensure_dir("d", name) def _getvaluepath(self, key): - p = self._getpath("v/" + key) - p.dirpath().ensure(dir=1) - return p + return self._cachedir.join('v', *key.split('/')) def get(self, key, default): """ return cached value for the given key. If no value @@ -71,6 +62,7 @@ like e. g. lists of dictionaries. """ path = self._getvaluepath(key) + path.dirpath().ensure(dir=1) with path.open("w") as f: self.trace("cache-write %s: %r" % (key, value,)) json.dump(value, f, indent=2, sort_keys=True) https://bitbucket.org/pytest-dev/pytest/commits/38b9cb4b96db/ Changeset: 38b9cb4b96db Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 09:17:58+00:00 Summary: use resource_exists for xdist looponfail detection Affected #: 1 file diff -r 8cbed53ef5b2b8268d27e8b1d571d61873718635 -r 38b9cb4b96db2d225f4da350b18c44e9c4c0674e _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -70,11 +70,10 @@ def pytest_addoption(parser): try: - ls = pkg_resources.resource_listdir('xdist', '.') - except: + outside_looponfail = pkg_resources.resource_exists( + 'xdist', 'looponfail.py') + except ImportError: outside_looponfail = False - else: - outside_looponfail = 'looponfail.py' in ls group = parser.getgroup("general") group.addoption( https://bitbucket.org/pytest-dev/pytest/commits/0693d6b045fb/ Changeset: 0693d6b045fb Branch: merge-cache User: RonnyPfannschmidt Date: 2015-03-14 09:37:32+00:00 Summary: finish bringing together the cache plugin code Affected #: 4 files diff -r 38b9cb4b96db2d225f4da350b18c44e9c4c0674e -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d _pytest/cache.py --- a/_pytest/cache.py +++ b/_pytest/cache.py @@ -1,9 +1,10 @@ import py import pytest import json -import sys import pkg_resources -from os.path import sep as _sep, altsetp as _altsep +from os.path import sep as _sep, altsep as _altsep + + class Cache: def __init__(self, config): self.config = config @@ -68,6 +69,71 @@ json.dump(value, f, indent=2, sort_keys=True) +class LFPlugin: + """ Plugin which implements the --lf (run last-failing) option """ + def __init__(self, config): + self.config = config + active_keys = 'lf', 'failedfirst', 'looponfail' + self.active = any(config.getvalue(key) for key in active_keys) + if self.active: + self.lastfailed = config.cache.get("cache/lastfailed", {}) + else: + self.lastfailed = {} + + def pytest_report_header(self): + if self.active: + if not self.lastfailed: + mode = "run all (no recorded failures)" + else: + mode = "rerun last %d failures%s" % ( + len(self.lastfailed), + " first" if self.config.getvalue("failedfirst") else "") + return "run-last-failure: %s" % mode + + def pytest_runtest_logreport(self, report): + if report.failed and "xfail" not in report.keywords: + self.lastfailed[report.nodeid] = True + elif not report.failed: + if report.when == "call": + self.lastfailed.pop(report.nodeid, None) + + def pytest_collectreport(self, report): + passed = report.outcome in ('passed', 'skipped') + if passed: + if report.nodeid in self.lastfailed: + self.lastfailed.pop(report.nodeid) + self.lastfailed.update( + (item.nodeid, True) + for item in report.result) + else: + self.lastfailed[report.nodeid] = True + + def pytest_collection_modifyitems(self, session, config, items): + if self.active and self.lastfailed: + previously_failed = [] + previously_passed = [] + for item in items: + if item.nodeid in self.lastfailed: + previously_failed.append(item) + else: + previously_passed.append(item) + if not previously_failed and previously_passed: + # running a subset of all tests with recorded failures outside + # of the set of tests currently executing + pass + elif self.config.getvalue("failedfirst"): + items[:] = previously_failed + previously_passed + else: + items[:] = previously_failed + config.hook.pytest_deselected(items=previously_passed) + + def pytest_sessionfinish(self, session): + config = self.config + if config.getvalue("showcache") or hasattr(config, "slaveinput"): + return + config.cache.set("cache/lastfailed", self.lastfailed) + + def pytest_addoption(parser): try: outside_looponfail = pkg_resources.resource_exists( @@ -78,11 +144,13 @@ group = parser.getgroup("general") group.addoption( '--lf', action='store_true', dest="lf", - help="rerun only the tests that failed at the last run (or all if none failed)") + help="rerun only the tests that failed " + "at the last run (or all if none failed)") group.addoption( '--ff', action='store_true', dest="failedfirst", - help="run all tests but run the last failures first. This may re-order " - "tests and thus lead to repeated fixture setup/teardown") + help="run all tests but run the last failures first. " + "This may re-order tests and thus lead to " + "repeated fixture setup/teardown") group.addoption( '--cache', action='store_true', dest="showcache", help="show cache contents, don't perform collection or tests") @@ -113,14 +181,15 @@ @pytest.mark.tryfirst def pytest_configure(config): from .cache import Cache - from .lastfail import LFPlugin - config.cache = cache = Cache(config) + config.cache = Cache(config) config.pluginmanager.register(LFPlugin(config), "lfplugin") + def pytest_report_header(config): if config.option.verbose: relpath = py.path.local().bestrelpath(config.cache._cachedir) - return "cachedir: %s" % config.cache._cachedir + return "cachedir: %s" % relpath + def showcache(config, session): from pprint import pprint diff -r 38b9cb4b96db2d225f4da350b18c44e9c4c0674e -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d _pytest/lastfail.py --- a/_pytest/lastfail.py +++ /dev/null @@ -1,65 +0,0 @@ - - -class LFPlugin: - """ Plugin which implements the --lf (run last-failing) option """ - def __init__(self, config): - self.config = config - active_keys = 'lf', 'failedfirst', 'looponfail' - self.active = any(config.getvalue(key) for key in active_keys) - if self.active: - self.lastfailed = config.cache.get("cache/lastfailed", {}) - else: - self.lastfailed = {} - - def pytest_report_header(self): - if self.active: - if not self.lastfailed: - mode = "run all (no recorded failures)" - else: - mode = "rerun last %d failures%s" % ( - len(self.lastfailed), - " first" if self.config.getvalue("failedfirst") else "") - return "run-last-failure: %s" % mode - - def pytest_runtest_logreport(self, report): - if report.failed and "xfail" not in report.keywords: - self.lastfailed[report.nodeid] = True - elif not report.failed: - if report.when == "call": - self.lastfailed.pop(report.nodeid, None) - - def pytest_collectreport(self, report): - passed = report.outcome in ('passed', 'skipped') - if passed: - if report.nodeid in self.lastfailed: - self.lastfailed.pop(report.nodeid) - self.lastfailed.update( - (item.nodeid, True) - for item in report.result) - else: - self.lastfailed[report.nodeid] = True - - def pytest_collection_modifyitems(self, session, config, items): - if self.active and self.lastfailed: - previously_failed = [] - previously_passed = [] - for item in items: - if item.nodeid in self.lastfailed: - previously_failed.append(item) - else: - previously_passed.append(item) - if not previously_failed and previously_passed: - # running a subset of all tests with recorded failures outside - # of the set of tests currently executing - pass - elif self.config.getvalue("failedfirst"): - items[:] = previously_failed + previously_passed - else: - items[:] = previously_failed - config.hook.pytest_deselected(items=previously_passed) - - def pytest_sessionfinish(self, session): - config = self.config - if config.getvalue("showcache") or hasattr(config, "slaveinput"): - return - config.cache.set("cache/lastfailed", self.lastfailed) diff -r 38b9cb4b96db2d225f4da350b18c44e9c4c0674e -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d testing/test_cache.py --- a/testing/test_cache.py +++ b/testing/test_cache.py @@ -9,8 +9,9 @@ def test_config_cache_makedir(self, testdir): testdir.makeini("[pytest]") config = testdir.parseconfigure() - pytest.raises(ValueError, lambda: - config.cache.makedir("key/name")) + with pytest.raises(ValueError): + config.cache.makedir("key/name") + p = config.cache.makedir("name") assert p.check() @@ -52,3 +53,44 @@ result = testdir.runpytest() assert result.ret == 0 result.stdout.fnmatch_lines(["*1 passed*"]) + + + +def test_cache_reportheader(testdir): + p = testdir.makepyfile(""" + def test_hello(): + pass + """) + result = testdir.runpytest("-v") + result.stdout.fnmatch_lines([ + "cachedir: .cache" + ]) + +def test_cache_show(testdir): + result = testdir.runpytest("--cache") + assert result.ret == 0 + result.stdout.fnmatch_lines([ + "*cache is empty*" + ]) + p = testdir.makeconftest(""" + def pytest_configure(config): + config.cache.set("my/name", [1,2,3]) + config.cache.set("other/some", {1:2}) + dp = config.cache.makedir("mydb") + dp.ensure("hello") + dp.ensure("world") + """) + result = testdir.runpytest() + assert result.ret == 0 + result = testdir.runpytest("--cache") + result.stdout.fnmatch_lines_random([ + "*cachedir:*", + "-*cache values*-", + "*my/name contains:", + " [1, 2, 3]", + "*other/some contains*", + " {*1*: 2}", + "-*cache directories*-", + "*mydb/hello*length 0*", + "*mydb/world*length 0*", + ]) diff -r 38b9cb4b96db2d225f4da350b18c44e9c4c0674e -r 0693d6b045fbf3dbf807cf26d6f9eacbc850e35d testing/test_plugin.py --- a/testing/test_plugin.py +++ /dev/null @@ -1,47 +0,0 @@ -import os -import pytest -import shutil -import py - -pytest_plugins = "pytester", - - -def test_cache_reportheader(testdir): - p = testdir.makepyfile(""" - def test_hello(): - pass - """) - cachedir = p.dirpath(".cache") - result = testdir.runpytest("-v") - result.stdout.fnmatch_lines([ - "cachedir: %s" % cachedir, - ]) - -def test_cache_show(testdir): - result = testdir.runpytest("--cache") - assert result.ret == 0 - result.stdout.fnmatch_lines([ - "*cache is empty*" - ]) - p = testdir.makeconftest(""" - def pytest_configure(config): - config.cache.set("my/name", [1,2,3]) - config.cache.set("other/some", {1:2}) - dp = config.cache.makedir("mydb") - dp.ensure("hello") - dp.ensure("world") - """) - result = testdir.runpytest() - assert result.ret == 0 - result = testdir.runpytest("--cache") - result.stdout.fnmatch_lines_random([ - "*cachedir:*", - "-*cache values*-", - "*my/name contains:", - " [1, 2, 3]", - "*other/some contains*", - " {*1*: 2}", - "-*cache directories*-", - "*mydb/hello*length 0*", - "*mydb/world*length 0*", - ]) Repository URL: https://bitbucket.org/pytest-dev/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Sun Mar 15 21:58:15 2015 From: issues-reply at bitbucket.org (Leonardo Santagada) Date: Sun, 15 Mar 2015 20:58:15 -0000 Subject: [Pytest-commit] Issue #699: Move pytest to Github (pytest-dev/pytest) Message-ID: <20150315205815.29785.95227@app11.ash-private.bitbucket.org> New issue 699: Move pytest to Github https://bitbucket.org/pytest-dev/pytest/issue/699/move-pytest-to-github Leonardo Santagada: Why isn't pytest on github? There is no explanation anywhere about why not use git/github so I thought it is a good idea to have this explanation here and maybe moved to a faq on the site or something. I don't really want to force anyone to move, but I would guess that there more people like me that would like to know if there is any advantages for the project in being on bitbucket. From issues-reply at bitbucket.org Tue Mar 17 04:30:39 2015 From: issues-reply at bitbucket.org (Leonardo Santagada) Date: Tue, 17 Mar 2015 03:30:39 -0000 Subject: [Pytest-commit] Issue #700: Broken images and old link on pytest plugins page (pytest-dev/pytest) Message-ID: <20150317033039.32590.48495@app05.ash-private.bitbucket.org> New issue 700: Broken images and old link on pytest plugins page https://bitbucket.org/pytest-dev/pytest/issue/700/broken-images-and-old-link-on-pytest Leonardo Santagada: http://pytest.org/latest/plugins_index/index.html has broken images and point to an old heroku app that then points to http://plugincompat.herokuapp.com/ From issues-reply at bitbucket.org Tue Mar 17 22:58:09 2015 From: issues-reply at bitbucket.org (psantoro) Date: Tue, 17 Mar 2015 21:58:09 -0000 Subject: [Pytest-commit] Issue #701: py.test.exe - failed to create process (pytest-dev/pytest) Message-ID: <20150317215809.10261.22440@app13.ash-private.bitbucket.org> New issue 701: py.test.exe - failed to create process https://bitbucket.org/pytest-dev/pytest/issue/701/pytestexe-failed-to-create-process psantoro: I've been using pytest 2.6.4 successfully with python 3.4.2 64bit for a while now on Windows 7 and Linux. My Windows 7 python 3.4.2 installation directory was "c:\bin\python34". I recently upgraded (i.e. remove, followed by install) to Python 3.4.3 64bit, but installed it into "c:\program files\python34". I believe this is a more secure location and I've read that Python 3.5 will default to using the standard Windows software installation directories. When I reinstalled pytest 2.6.4 via "pip install pytest" for python 3.4.3, the install appeared to complete successfully. However, when I try to execute either of the py.test exes in the python scripts directory, I get a "failed to create process" error. The py.test script files appear to work fine. I then uninstalled pytest via pip. I then used pip to install the pytest-2.6.4-py2.py3-none-any.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/. The included exes in the whl appear to work fine. I also tried these tests using a console window opened via "Run as Administrator", but this did not change the outcome. I was also able to duplicate the above on my home notebook. I haven't had any new issues with other python packages and scripts (including many that I've written myself) since upgrading to python 3.4.3. Perhaps there's something in the pytest setup logic that doesn't like spaces in directory names? From issues-reply at bitbucket.org Thu Mar 19 11:39:53 2015 From: issues-reply at bitbucket.org (punch_card) Date: Thu, 19 Mar 2015 10:39:53 -0000 Subject: [Pytest-commit] Issue #702: "import file mismatch" despite different names (only Windows 7?) (pytest-dev/pytest) Message-ID: <20150319103953.27398.92462@app03.ash-private.bitbucket.org> New issue 702: "import file mismatch" despite different names (only Windows 7?) https://bitbucket.org/pytest-dev/pytest/issue/702/import-file-mismatch-despite-different punch_card: I have published a full description of the problem at [StackOverflow](http://stackoverflow.com/questions/29074967/py-test-import-file-mismatch-despite-different-names-only-windows), but here follows a terse summary. I have tried to device a simple set of black box tests, following the directory structure and naming recommendations. When I try to run all tests from the top of the structure, I consistently get error messages of this kind: ERROR collecting /prgm_A/test/test_A.py import file mismatch: imported module 'test_A' has this __file__ attribute: X:\prgm_A\test\test_A.py which is not the same as the test file we want to collect: X:\\prgm_A\test\test_A.py HINT: remove \_\_pycache\_\_ / ... My workaround, to step down into the individual test directories for each subprogram and run the subsets of tests from there, stopped working when our computers were migrated to 7. I don't see this happen under linux. Note that the page at StackOverflow includes a minimal code example which reproduces this problem. From commits-noreply at bitbucket.org Thu Mar 19 13:07:48 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 19 Mar 2015 12:07:48 -0000 Subject: [Pytest-commit] commit/pytest: flub: Mention requirement for licensing information Message-ID: <20150319120748.13662.12647@app08.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/39361b33346e/ Changeset: 39361b33346e User: flub Date: 2015-03-19 11:53:32+00:00 Summary: Mention requirement for licensing information Repositories should always have proper licensing information. Affected #: 1 file diff -r da9d03b1f91d63ec97a989804bacfc03204b0e12 -r 39361b33346e784e4f6359dbdba9c9957a8e4cd7 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -38,6 +38,9 @@ - a ``README.txt`` describing how to use the plugin and on which platforms it runs. +- a ``LICENSE.txt`` file or equivalent containing the licensing + information, with matching info in ``setup.py``. + - an issue tracker unless you rather want to use the core ``pytest`` issue tracker. Repository URL: https://bitbucket.org/pytest-dev/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 Mar 20 14:14:16 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Mar 2015 13:14:16 -0000 Subject: [Pytest-commit] commit/tox: hpk42: Merged in fschulze/tox/complex-projname-initproj (pull request #137) Message-ID: <20150320131416.28117.82940@app02.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/ce2979a973dc/ Changeset: ce2979a973dc User: hpk42 Date: 2015-03-20 13:14:12+00:00 Summary: Merged in fschulze/tox/complex-projname-initproj (pull request #137) Enhanced initproj fixture to accept a tuple for name/version specifier. Affected #: 2 files diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -598,7 +598,7 @@ def test_separate_sdist_no_sdistfile(cmd, initproj): distshare = cmd.tmpdir.join("distshare") - initproj("pkg123-0.7", filedefs={ + initproj(("pkg123-foo", "0.7"), filedefs={ 'tox.ini': """ [tox] distshare=%s @@ -609,7 +609,7 @@ l = distshare.listdir() assert len(l) == 1 sdistfile = l[0] - assert 'pkg123-0.7.zip' in str(sdistfile) + assert 'pkg123-foo-0.7.zip' in str(sdistfile) def test_separate_sdist(cmd, initproj): distshare = cmd.tmpdir.join("distshare") diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -2,7 +2,7 @@ import tox import os import sys -from py.builtin import print_ +from py.builtin import _isbytes, _istext, print_ from fnmatch import fnmatch import time from tox._config import parseconfig @@ -263,13 +263,16 @@ @pytest.fixture def initproj(request, tmpdir): """ create a factory function for creating example projects. """ - def initproj(name, filedefs=None): + def initproj(nameversion, filedefs=None): if filedefs is None: filedefs = {} - parts = name.split("-") - if len(parts) == 1: - parts.append("0.1") - name, version = parts + if _istext(nameversion) or _isbytes(nameversion): + parts = nameversion.split("-") + if len(parts) == 1: + parts.append("0.1") + name, version = parts + else: + name, version = nameversion base = tmpdir.ensure(name, dir=1) create_files(base, filedefs) if 'setup.py' not in filedefs: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Mar 20 14:14:16 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Mar 2015 13:14:16 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20150320131416.8782.42739@app01.ash-private.bitbucket.org> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/89eda908cc6a/ Changeset: 89eda908cc6a Branch: complex-projname-initproj User: fschulze Date: 2015-03-20 12:06:32+00:00 Summary: Enhanced initproj fixture to accept a tuple for name/version specifier. This allows projects with dashes in their name. This fixture is used in devpi where this functionality is needed. Affected #: 2 files diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r 89eda908cc6a6ef0fc1dba67611a5a6e198f9821 tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -598,7 +598,7 @@ def test_separate_sdist_no_sdistfile(cmd, initproj): distshare = cmd.tmpdir.join("distshare") - initproj("pkg123-0.7", filedefs={ + initproj(("pkg123-foo", "0.7"), filedefs={ 'tox.ini': """ [tox] distshare=%s @@ -609,7 +609,7 @@ l = distshare.listdir() assert len(l) == 1 sdistfile = l[0] - assert 'pkg123-0.7.zip' in str(sdistfile) + assert 'pkg123-foo-0.7.zip' in str(sdistfile) def test_separate_sdist(cmd, initproj): distshare = cmd.tmpdir.join("distshare") diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r 89eda908cc6a6ef0fc1dba67611a5a6e198f9821 tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -2,7 +2,7 @@ import tox import os import sys -from py.builtin import print_ +from py.builtin import _isbytes, _istext, print_ from fnmatch import fnmatch import time from tox._config import parseconfig @@ -263,13 +263,16 @@ @pytest.fixture def initproj(request, tmpdir): """ create a factory function for creating example projects. """ - def initproj(name, filedefs=None): + def initproj(nameversion, filedefs=None): if filedefs is None: filedefs = {} - parts = name.split("-") - if len(parts) == 1: - parts.append("0.1") - name, version = parts + if _istext(nameversion) or _isbytes(nameversion): + parts = nameversion.split("-") + if len(parts) == 1: + parts.append("0.1") + name, version = parts + else: + name, version = nameversion base = tmpdir.ensure(name, dir=1) create_files(base, filedefs) if 'setup.py' not in filedefs: https://bitbucket.org/hpk42/tox/commits/ce2979a973dc/ Changeset: ce2979a973dc User: hpk42 Date: 2015-03-20 13:14:12+00:00 Summary: Merged in fschulze/tox/complex-projname-initproj (pull request #137) Enhanced initproj fixture to accept a tuple for name/version specifier. Affected #: 2 files diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 tests/test_z_cmdline.py --- a/tests/test_z_cmdline.py +++ b/tests/test_z_cmdline.py @@ -598,7 +598,7 @@ def test_separate_sdist_no_sdistfile(cmd, initproj): distshare = cmd.tmpdir.join("distshare") - initproj("pkg123-0.7", filedefs={ + initproj(("pkg123-foo", "0.7"), filedefs={ 'tox.ini': """ [tox] distshare=%s @@ -609,7 +609,7 @@ l = distshare.listdir() assert len(l) == 1 sdistfile = l[0] - assert 'pkg123-0.7.zip' in str(sdistfile) + assert 'pkg123-foo-0.7.zip' in str(sdistfile) def test_separate_sdist(cmd, initproj): distshare = cmd.tmpdir.join("distshare") diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -2,7 +2,7 @@ import tox import os import sys -from py.builtin import print_ +from py.builtin import _isbytes, _istext, print_ from fnmatch import fnmatch import time from tox._config import parseconfig @@ -263,13 +263,16 @@ @pytest.fixture def initproj(request, tmpdir): """ create a factory function for creating example projects. """ - def initproj(name, filedefs=None): + def initproj(nameversion, filedefs=None): if filedefs is None: filedefs = {} - parts = name.split("-") - if len(parts) == 1: - parts.append("0.1") - name, version = parts + if _istext(nameversion) or _isbytes(nameversion): + parts = nameversion.split("-") + if len(parts) == 1: + parts.append("0.1") + name, version = parts + else: + name, version = nameversion base = tmpdir.ensure(name, dir=1) create_files(base, filedefs) if 'setup.py' not in filedefs: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Mar 20 19:46:18 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Mar 2015 18:46:18 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20150320184618.22971.55574@app07.ash-private.bitbucket.org> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/e5a405a78986/ Changeset: e5a405a78986 Branch: file-instead-of-pipe User: fschulze Date: 2015-03-20 13:36:30+00:00 Summary: Use a file instead of a pipe for command output in "--result-json". Affected #: 2 files diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r e5a405a7898622aee926055566f4848eb417d3e9 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ DEV ----------- +- use a file instead of a pipe for command output in "--result-json". + - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. diff -r aa5b7ce560ca7cc27ed609fad8d2678a9e6836ac -r e5a405a7898622aee926055566f4848eb417d3e9 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -11,7 +11,6 @@ import os import sys import subprocess -import time from tox._verlib import NormalizedVersion, IrrationalVersionError from tox._venv import VirtualEnv from tox._config import parseconfig @@ -83,15 +82,14 @@ stdout = outpath = None resultjson = self.session.config.option.resultjson if resultjson or redirect: - f = self._initlogpath(self.id) - f.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( + fout = self._initlogpath(self.id) + fout.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( self.id, self.msg, args, env)) - f.flush() - self.popen_outpath = outpath = py.path.local(f.name) - if resultjson: - stdout = subprocess.PIPE - else: - stdout = f + fout.flush() + self.popen_outpath = outpath = py.path.local(fout.name) + fin = outpath.open() + fin.read() # read the header, so it won't be written to stdout + stdout = fout elif returnout: stdout = subprocess.PIPE if cwd is None: @@ -115,23 +113,28 @@ if resultjson and not redirect: assert popen.stderr is None # prevent deadlock out = None - last_time = time.time() + last_time = now() while 1: + fin_pos = fin.tell() # we have to read one byte at a time, otherwise there # might be no output for a long time with slow tests - data = popen.stdout.read(1) + data = fin.read(1) if data: sys.stdout.write(data) - if '\n' in data or (time.time() - last_time) > 5: - # we flush on newlines or after 5 seconds to + if '\n' in data or (now() - last_time) > 1: + # we flush on newlines or after 1 second to # provide quick enough feedback to the user # when printing a dot per test sys.stdout.flush() - last_time = time.time() - f.write(data) + last_time = now() elif popen.poll() is not None: - popen.stdout.close() + if popen.stdout is not None: + popen.stdout.close() break + else: + py.std.time.sleep(0.1) + fin.seek(fin_pos) + fin.close() else: out, err = popen.communicate() except KeyboardInterrupt: https://bitbucket.org/hpk42/tox/commits/9d3605e2389a/ Changeset: 9d3605e2389a User: hpk42 Date: 2015-03-20 18:46:14+00:00 Summary: Merged in fschulze/tox/file-instead-of-pipe (pull request #138) Use a file instead of a pipe for command output in "--result-json". Affected #: 2 files diff -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ DEV ----------- +- use a file instead of a pipe for command output in "--result-json". + - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. diff -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -11,7 +11,6 @@ import os import sys import subprocess -import time from tox._verlib import NormalizedVersion, IrrationalVersionError from tox._venv import VirtualEnv from tox._config import parseconfig @@ -83,15 +82,14 @@ stdout = outpath = None resultjson = self.session.config.option.resultjson if resultjson or redirect: - f = self._initlogpath(self.id) - f.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( + fout = self._initlogpath(self.id) + fout.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( self.id, self.msg, args, env)) - f.flush() - self.popen_outpath = outpath = py.path.local(f.name) - if resultjson: - stdout = subprocess.PIPE - else: - stdout = f + fout.flush() + self.popen_outpath = outpath = py.path.local(fout.name) + fin = outpath.open() + fin.read() # read the header, so it won't be written to stdout + stdout = fout elif returnout: stdout = subprocess.PIPE if cwd is None: @@ -115,23 +113,28 @@ if resultjson and not redirect: assert popen.stderr is None # prevent deadlock out = None - last_time = time.time() + last_time = now() while 1: + fin_pos = fin.tell() # we have to read one byte at a time, otherwise there # might be no output for a long time with slow tests - data = popen.stdout.read(1) + data = fin.read(1) if data: sys.stdout.write(data) - if '\n' in data or (time.time() - last_time) > 5: - # we flush on newlines or after 5 seconds to + if '\n' in data or (now() - last_time) > 1: + # we flush on newlines or after 1 second to # provide quick enough feedback to the user # when printing a dot per test sys.stdout.flush() - last_time = time.time() - f.write(data) + last_time = now() elif popen.poll() is not None: - popen.stdout.close() + if popen.stdout is not None: + popen.stdout.close() break + else: + py.std.time.sleep(0.1) + fin.seek(fin_pos) + fin.close() else: out, err = popen.communicate() except KeyboardInterrupt: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Mar 20 19:46:18 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 20 Mar 2015 18:46:18 -0000 Subject: [Pytest-commit] commit/tox: hpk42: Merged in fschulze/tox/file-instead-of-pipe (pull request #138) Message-ID: <20150320184618.26821.71806@app13.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/9d3605e2389a/ Changeset: 9d3605e2389a User: hpk42 Date: 2015-03-20 18:46:14+00:00 Summary: Merged in fschulze/tox/file-instead-of-pipe (pull request #138) Use a file instead of a pipe for command output in "--result-json". Affected #: 2 files diff -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ DEV ----------- +- use a file instead of a pipe for command output in "--result-json". + - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. diff -r ce2979a973dc98ca803825a01d1a83b1b8cb5984 -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -11,7 +11,6 @@ import os import sys import subprocess -import time from tox._verlib import NormalizedVersion, IrrationalVersionError from tox._venv import VirtualEnv from tox._config import parseconfig @@ -83,15 +82,14 @@ stdout = outpath = None resultjson = self.session.config.option.resultjson if resultjson or redirect: - f = self._initlogpath(self.id) - f.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( + fout = self._initlogpath(self.id) + fout.write("actionid=%s\nmsg=%s\ncmdargs=%r\nenv=%s\n" %( self.id, self.msg, args, env)) - f.flush() - self.popen_outpath = outpath = py.path.local(f.name) - if resultjson: - stdout = subprocess.PIPE - else: - stdout = f + fout.flush() + self.popen_outpath = outpath = py.path.local(fout.name) + fin = outpath.open() + fin.read() # read the header, so it won't be written to stdout + stdout = fout elif returnout: stdout = subprocess.PIPE if cwd is None: @@ -115,23 +113,28 @@ if resultjson and not redirect: assert popen.stderr is None # prevent deadlock out = None - last_time = time.time() + last_time = now() while 1: + fin_pos = fin.tell() # we have to read one byte at a time, otherwise there # might be no output for a long time with slow tests - data = popen.stdout.read(1) + data = fin.read(1) if data: sys.stdout.write(data) - if '\n' in data or (time.time() - last_time) > 5: - # we flush on newlines or after 5 seconds to + if '\n' in data or (now() - last_time) > 1: + # we flush on newlines or after 1 second to # provide quick enough feedback to the user # when printing a dot per test sys.stdout.flush() - last_time = time.time() - f.write(data) + last_time = now() elif popen.poll() is not None: - popen.stdout.close() + if popen.stdout is not None: + popen.stdout.close() break + else: + py.std.time.sleep(0.1) + fin.seek(fin_pos) + fin.close() else: out, err = popen.communicate() except KeyboardInterrupt: 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 builds at drone.io Sat Mar 21 17:47:07 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 21 Mar 2015 16:47:07 +0000 Subject: [Pytest-commit] [FAIL] pytest-xdist - # 6 Message-ID: <20150321164707.30056.75162@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist/6 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist Repository : https://bitbucket.org/pytest-dev/pytest-xdist Version : 203:00cfff4834e7 Author : Anatoly Bubenkov Branch : default Message: README.txt edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Sat Mar 21 17:53:56 2015 From: builds at drone.io (Drone.io Build) Date: Sat, 21 Mar 2015 16:53:56 +0000 Subject: [Pytest-commit] [FAIL] pytest-xdist - # 5 Message-ID: <20150321164346.11910.56548@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist/5 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist Repository : https://bitbucket.org/pytest-dev/pytest-xdist Version : 203:00cfff4834e7 Author : Anatoly Bubenkov Branch : default Message: README.txt edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 23 10:17:43 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 09:17:43 -0000 Subject: [Pytest-commit] commit/pytest: 5 new changesets Message-ID: <20150323091743.13432.38632@app13.ash-private.bitbucket.org> 5 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/9bf89ebf665e/ Changeset: 9bf89ebf665e User: hpk42 Date: 2015-03-17 12:19:26+00:00 Summary: remove default-verbose running Affected #: 1 file diff -r da9d03b1f91d63ec97a989804bacfc03204b0e12 -r 9bf89ebf665e35f1ae925ce1133b1538b7317a71 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX -vl +addopts= -rxsX rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance https://bitbucket.org/pytest-dev/pytest/commits/c4b0b5b71a6d/ Changeset: c4b0b5b71a6d User: hpk42 Date: 2015-03-17 12:21:44+00:00 Summary: add a project someone reported a while ago Affected #: 2 files diff -r 9bf89ebf665e35f1ae925ce1133b1538b7317a71 -r c4b0b5b71a6d3fb145ed8d2eee058f67e8dfe091 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -67,7 +67,6 @@ def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - assert "merlinux" in msg assert 0 # for demo purposes Here, the ``test_ehlo`` needs the ``smtp`` fixture value. pytest diff -r 9bf89ebf665e35f1ae925ce1133b1538b7317a71 -r c4b0b5b71a6d3fb145ed8d2eee058f67e8dfe091 doc/en/projects.txt --- a/doc/en/projects.txt +++ b/doc/en/projects.txt @@ -26,6 +26,7 @@ `21000 tests `_ * the `MoinMoin `_ Wiki Engine * `sentry `_, realtime app-maintenance and exception tracking +* `Astropy `_ and `affiliated packages `_ * `tox `_, virtualenv/Hudson integration tool * `PIDA `_ framework for integrated development * `PyPM `_ ActiveState's package manager https://bitbucket.org/pytest-dev/pytest/commits/b6a56641f783/ Changeset: b6a56641f783 Branch: fix-reload User: blueyed Date: 2015-03-04 15:21:27+00:00 Summary: Fix `reload()` with modules handled via `python_files` If a module exists in `sys.modules` already, `load_module` has to return it. Fixes https://bitbucket.org/pytest-dev/pytest/issue/435 Affected #: 2 files diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r b6a56641f783b8ed18ba0ded97278875217453d3 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -146,6 +146,12 @@ return self def load_module(self, name): + # If there is an existing module object named 'fullname' in + # sys.modules, the loader must use that existing module. (Otherwise, + # the reload() builtin will not work correctly.) + if name in sys.modules: + return sys.modules[name] + co, pyc = self.modules.pop(name) # I wish I could just call imp.load_compiled here, but __file__ has to # be set properly. In Python 3.2+, this all would be handled correctly diff -r e26175bf8246f01fc5573e92359b3124624c31b7 -r b6a56641f783b8ed18ba0ded97278875217453d3 testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -641,3 +641,27 @@ pyc.write(contents[:strip_bytes], mode='wb') assert _read_pyc(source, str(pyc)) is None # no error + + def test_reload_is_same(self, testdir): + # A file that will be picked up during collecting. + testdir.tmpdir.join("file.py").ensure() + testdir.tmpdir.join("pytest.ini").write(py.std.textwrap.dedent(""" + [pytest] + python_files = *.py + """)) + + testdir.makepyfile(test_fun=""" + import sys + try: + from imp import reload + except ImportError: + pass + + def test_loader(): + import file + assert sys.modules["file"] is reload(file) + """) + result = testdir.runpytest('-s') + result.stdout.fnmatch_lines([ + "* 1 passed*", + ]) https://bitbucket.org/pytest-dev/pytest/commits/c4fadf6761ea/ Changeset: c4fadf6761ea User: hpk42 Date: 2015-03-23 09:08:47+00:00 Summary: fix issue435: make reload() work when assert rewriting is active. Thanks Daniel Hahler. Affected #: 3 files diff -r c4b0b5b71a6d3fb145ed8d2eee058f67e8dfe091 -r c4fadf6761eaf425e624af90394b102f45122172 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- +- fix issue435: make reload() work when assert rewriting is active. + Thanks Daniel Hahler. + - fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. diff -r c4b0b5b71a6d3fb145ed8d2eee058f67e8dfe091 -r c4fadf6761eaf425e624af90394b102f45122172 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -146,6 +146,12 @@ return self def load_module(self, name): + # If there is an existing module object named 'fullname' in + # sys.modules, the loader must use that existing module. (Otherwise, + # the reload() builtin will not work correctly.) + if name in sys.modules: + return sys.modules[name] + co, pyc = self.modules.pop(name) # I wish I could just call imp.load_compiled here, but __file__ has to # be set properly. In Python 3.2+, this all would be handled correctly diff -r c4b0b5b71a6d3fb145ed8d2eee058f67e8dfe091 -r c4fadf6761eaf425e624af90394b102f45122172 testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -641,3 +641,27 @@ pyc.write(contents[:strip_bytes], mode='wb') assert _read_pyc(source, str(pyc)) is None # no error + + def test_reload_is_same(self, testdir): + # A file that will be picked up during collecting. + testdir.tmpdir.join("file.py").ensure() + testdir.tmpdir.join("pytest.ini").write(py.std.textwrap.dedent(""" + [pytest] + python_files = *.py + """)) + + testdir.makepyfile(test_fun=""" + import sys + try: + from imp import reload + except ImportError: + pass + + def test_loader(): + import file + assert sys.modules["file"] is reload(file) + """) + result = testdir.runpytest('-s') + result.stdout.fnmatch_lines([ + "* 1 passed*", + ]) https://bitbucket.org/pytest-dev/pytest/commits/8d263ae18b5f/ Changeset: 8d263ae18b5f User: hpk42 Date: 2015-03-23 09:10:26+00:00 Summary: merge Affected #: 1 file diff -r c4fadf6761eaf425e624af90394b102f45122172 -r 8d263ae18b5fb1388cfdbfd26e8cdf09487f32f7 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -38,6 +38,9 @@ - a ``README.txt`` describing how to use the plugin and on which platforms it runs. +- a ``LICENSE.txt`` file or equivalent containing the licensing + information, with matching info in ``setup.py``. + - an issue tracker unless you rather want to use the core ``pytest`` issue tracker. Repository URL: https://bitbucket.org/pytest-dev/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 Mar 23 10:29:26 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 09:29:26 -0000 Subject: [Pytest-commit] commit/tox: 3 new changesets Message-ID: <20150323092926.7188.75977@app01.ash-private.bitbucket.org> 3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/7ccc0b0bd25e/ Changeset: 7ccc0b0bd25e User: hpk42 Date: 2015-03-23 09:25:16+00:00 Summary: bump to version 1.9.1 Affected #: 3 files diff -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 -r 7ccc0b0bd25e1e01dfd861b890ada69042a32c3a CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,13 +1,14 @@ -DEV +1.9.1 ----------- - use a file instead of a pipe for command output in "--result-json". + Fixes some termination issues with python2.6. - allow --force-deps to override dependencies in "-r" requirements files. Thanks Sontek for the PR. - fix issue227: use "-m virtualenv" instead of "-mvirtualenv" to make - it work with pyrun. + it work with pyrun. Thanks Marc-Andre Lemburg. 1.9.0 diff -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 -r 7ccc0b0bd25e1e01dfd861b890ada69042a32c3a setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.1.dev2', + version='1.9.1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 9d3605e2389a042f246b8720bdf7fdcaa9ff0a17 -r 7ccc0b0bd25e1e01dfd861b890ada69042a32c3a tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.1.dev2' +__version__ = '1.9.1' class exception: class Error(Exception): https://bitbucket.org/hpk42/tox/commits/1a5fba5b9e15/ Changeset: 1a5fba5b9e15 User: hpk42 Date: 2015-03-23 09:29:08+00:00 Summary: Added tag 1.9.1 for changeset 7ccc0b0bd25e Affected #: 1 file diff -r 7ccc0b0bd25e1e01dfd861b890ada69042a32c3a -r 1a5fba5b9e154a66a66c7384b05b678dab234ab8 .hgtags --- a/.hgtags +++ b/.hgtags @@ -21,3 +21,4 @@ b7374e501bde055c5c2b572e6512d22e10f60088 1.8.0 2aa9b587d12ae4b325cb4d5a9a801a222ffc328c 1.8.1 ad64513cf6bf0ef99a4a11678aa3260d8078976f 1.9.0 +7ccc0b0bd25e1e01dfd861b890ada69042a32c3a 1.9.1 https://bitbucket.org/hpk42/tox/commits/7afd77a31d4f/ Changeset: 7afd77a31d4f User: hpk42 Date: 2015-03-23 09:29:01+00:00 Summary: bump version Affected #: 3 files diff -r 1a5fba5b9e154a66a66c7384b05b678dab234ab8 -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +DEV +----------- + 1.9.1 ----------- diff -r 1a5fba5b9e154a66a66c7384b05b678dab234ab8 -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.1', + version='1.9.2.dev1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 1a5fba5b9e154a66a66c7384b05b678dab234ab8 -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.1' +__version__ = '1.9.2.dev1' class exception: class Error(Exception): Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Mon Mar 23 16:28:33 2015 From: issues-reply at bitbucket.org (Mikhail Korobov) Date: Mon, 23 Mar 2015 15:28:33 -0000 Subject: [Pytest-commit] Issue #230: tox 1.9.1 ignores package versions specified in requirements.txt files (hpk42/tox) Message-ID: <20150323152833.6293.47766@app13.ash-private.bitbucket.org> New issue 230: tox 1.9.1 ignores package versions specified in requirements.txt files https://bitbucket.org/hpk42/tox/issue/230/tox-191-ignores-package-versions-specified Mikhail Korobov: Hi, It seems that tox 1.9.1 ignores package versions specified in included requirements files, and installs latest package versions instead. 1.9.0 works fine. This broke e.g. Scrapy tests. ``` [testenv] deps = -r requirements.txt ``` requirements.txt: ``` foo == 1.0.0 ``` Check e.g. https://travis-ci.org/scrapy/scrapy/jobs/55483601 - it has > precise installdeps: pyOpenSSL==0.13, lxml==2.3.2, Twisted==11.1.0, boto==2.2.2, Pillow<2.0, django==1.3.1, cssselect==0.9.1, zope.interface==3.6.1, mock, mitmproxy, netlib, pytest-twisted line, but mitmproxy is specified as mitmproxy==0.10.1 in https://github.com/scrapy/scrapy/blob/master/tests/requirements.txt file. From commits-noreply at bitbucket.org Mon Mar 23 16:40:04 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 15:40:04 -0000 Subject: [Pytest-commit] commit/pytest: tigeraniya: duplicate assignment Message-ID: <20150323154004.12535.92700@app14.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/7177c6ac03d8/ Changeset: 7177c6ac03d8 User: tigeraniya Date: 2015-03-23 15:17:34+00:00 Summary: duplicate assignment Affected #: 1 file diff -r 8d263ae18b5fb1388cfdbfd26e8cdf09487f32f7 -r 7177c6ac03d8c1871471282ced80d296522f27b1 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -774,7 +774,6 @@ self.fixturenames = fixtureinfo.names_closure self._arg2fixturedefs = fixtureinfo.name2fixturedefs self.cls = cls - self.module = module self._calls = [] self._ids = py.builtin.set() Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 23 16:40:22 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 23 Mar 2015 15:40:22 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 38 Message-ID: <20150323154022.30035.62710@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/38 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4065:7177c6ac03d8 Author : tigeraniya Branch : default Message: duplicate assignment -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 23 20:42:28 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 19:42:28 -0000 Subject: [Pytest-commit] commit/pytest: 8 new changesets Message-ID: <20150323194228.12668.68269@app05.ash-private.bitbucket.org> 8 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/a16e5e78cac4/ Changeset: a16e5e78cac4 Branch: issue463 User: pfctdayelise Date: 2015-03-21 22:06:25+00:00 Summary: #463 Raise a ValueError early if user misspells 'parametrize' as 'parameterize'. Affected #: 2 files diff -r 39361b33346e784e4f6359dbdba9c9957a8e4cd7 -r a16e5e78cac4c10a610ca54497d72e2b845f6449 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -143,6 +143,13 @@ def pytest_generate_tests(metafunc): try: + # this misspelling is common - raise a specific error to alert the user + markers = metafunc.function.parameterize + msg = "{} has mark 'parameterize', spelling should be 'parametrize'" + raise ValueError(msg.format(metafunc.function.__name__)) + except AttributeError: + pass + try: markers = metafunc.function.parametrize except AttributeError: return diff -r 39361b33346e784e4f6359dbdba9c9957a8e4cd7 -r a16e5e78cac4c10a610ca54497d72e2b845f6449 testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -692,6 +692,21 @@ reprec = testdir.inline_run() reprec.assertoutcome(passed=4) + @pytest.mark.issue463 + def test_parameterize_misspelling(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.mark.parameterize("x", range(2)) + def test_foo(x): + pass + """) + reprec = testdir.inline_run('--collectonly') + failures = reprec.getfailures() + assert len(failures) == 1 + expectederror = "ValueError: test_foo has mark 'parameterize', spelling should be 'parametrize'" + assert expectederror in failures[0].longrepr.reprcrash.message + class TestMarkersWithParametrization: pytestmark = pytest.mark.issue308 https://bitbucket.org/pytest-dev/pytest/commits/a9417e486228/ Changeset: a9417e486228 Branch: issue463 User: pfctdayelise Date: 2015-03-21 22:30:13+00:00 Summary: Use hasattr instead of try/except Affected #: 1 file diff -r a16e5e78cac4c10a610ca54497d72e2b845f6449 -r a9417e4862282c6149524fbfc472aa782c461c74 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -142,13 +142,10 @@ def pytest_generate_tests(metafunc): - try: - # this misspelling is common - raise a specific error to alert the user - markers = metafunc.function.parameterize + # this misspelling is common - raise a specific error to alert the user + if hasattr(metafunc.function, 'parameterize'): msg = "{} has mark 'parameterize', spelling should be 'parametrize'" raise ValueError(msg.format(metafunc.function.__name__)) - except AttributeError: - pass try: markers = metafunc.function.parametrize except AttributeError: https://bitbucket.org/pytest-dev/pytest/commits/08a60bf2bacd/ Changeset: 08a60bf2bacd Branch: issue463 User: pfctdayelise Date: 2015-03-21 22:57:06+00:00 Summary: Change string format syntax from {} to {0} for py2.6 Affected #: 1 file diff -r a9417e4862282c6149524fbfc472aa782c461c74 -r 08a60bf2bacda6a285df61b27157d6c5d244f4b2 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -144,7 +144,7 @@ def pytest_generate_tests(metafunc): # this misspelling is common - raise a specific error to alert the user if hasattr(metafunc.function, 'parameterize'): - msg = "{} has mark 'parameterize', spelling should be 'parametrize'" + msg = "{0} has mark 'parameterize', spelling should be 'parametrize'" raise ValueError(msg.format(metafunc.function.__name__)) try: markers = metafunc.function.parametrize https://bitbucket.org/pytest-dev/pytest/commits/fed7915005e6/ Changeset: fed7915005e6 Branch: issue463 User: pfctdayelise Date: 2015-03-23 19:01:58+00:00 Summary: Raise specific MarkerError rather than generic ValueError Affected #: 3 files diff -r 08a60bf2bacda6a285df61b27157d6c5d244f4b2 -r fed7915005e627ec23eb06a95e0fabbfd0ae389d _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -1,6 +1,9 @@ """ generic mechanism for marking and selecting python functions. """ import py +class MarkerError(Exception): + """Error in use of a pytest marker/attribute""" + def pytest_namespace(): return {'mark': MarkGenerator()} diff -r 08a60bf2bacda6a285df61b27157d6c5d244f4b2 -r fed7915005e627ec23eb06a95e0fabbfd0ae389d _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -4,7 +4,7 @@ import inspect import sys import pytest -from _pytest.mark import MarkDecorator +from _pytest.mark import MarkDecorator, MarkerError from py._code.code import TerminalRepr import _pytest @@ -144,8 +144,8 @@ def pytest_generate_tests(metafunc): # this misspelling is common - raise a specific error to alert the user if hasattr(metafunc.function, 'parameterize'): - msg = "{0} has mark 'parameterize', spelling should be 'parametrize'" - raise ValueError(msg.format(metafunc.function.__name__)) + msg = "{0} has 'parameterize', spelling should be 'parametrize'" + raise MarkerError(msg.format(metafunc.function.__name__)) try: markers = metafunc.function.parametrize except AttributeError: diff -r 08a60bf2bacda6a285df61b27157d6c5d244f4b2 -r fed7915005e627ec23eb06a95e0fabbfd0ae389d testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -704,7 +704,7 @@ reprec = testdir.inline_run('--collectonly') failures = reprec.getfailures() assert len(failures) == 1 - expectederror = "ValueError: test_foo has mark 'parameterize', spelling should be 'parametrize'" + expectederror = "MarkerError: test_foo has 'parameterize', spelling should be 'parametrize'" assert expectederror in failures[0].longrepr.reprcrash.message https://bitbucket.org/pytest-dev/pytest/commits/ee89f982ea14/ Changeset: ee89f982ea14 Branch: issue463 User: pfctdayelise Date: 2015-03-23 19:27:53+00:00 Summary: Change docstring style Affected #: 1 file diff -r fed7915005e627ec23eb06a95e0fabbfd0ae389d -r ee89f982ea14fa8c071e919a8efe4a896fd41069 _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -2,7 +2,9 @@ import py class MarkerError(Exception): - """Error in use of a pytest marker/attribute""" + """ + Error in use of a pytest marker/attribute. + """ def pytest_namespace(): https://bitbucket.org/pytest-dev/pytest/commits/174c263a826d/ Changeset: 174c263a826d Branch: issue463 User: pfctdayelise Date: 2015-03-23 19:28:04+00:00 Summary: update changelog Affected #: 1 file diff -r ee89f982ea14fa8c071e919a8efe4a896fd41069 -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- +- fix issue463: raise specific error for 'parameterize' misspelling. + - fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. https://bitbucket.org/pytest-dev/pytest/commits/72e40258338b/ Changeset: 72e40258338b Branch: issue463 User: bubenkoff Date: 2015-03-23 19:41:27+00:00 Summary: merge with default Affected #: 7 files diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,8 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- -- fix issue463: raise specific error for 'parameterize' misspelling. +- fix issue435: make reload() work when assert rewriting is active. + Thanks Daniel Hahler. - fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact @@ -59,6 +60,8 @@ - allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). +- fix issue463: raise specific error for 'parameterize' misspelling (pfctdayelise). + 2.6.4 ---------- diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 _pytest/assertion/rewrite.py --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -146,6 +146,12 @@ return self def load_module(self, name): + # If there is an existing module object named 'fullname' in + # sys.modules, the loader must use that existing module. (Otherwise, + # the reload() builtin will not work correctly.) + if name in sys.modules: + return sys.modules[name] + co, pyc = self.modules.pop(name) # I wish I could just call imp.load_compiled here, but __file__ has to # be set properly. In Python 3.2+, this all would be handled correctly diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -778,7 +778,6 @@ self.fixturenames = fixtureinfo.names_closure self._arg2fixturedefs = fixtureinfo.name2fixturedefs self.cls = cls - self.module = module self._calls = [] self._ids = py.builtin.set() diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -67,7 +67,6 @@ def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - assert "merlinux" in msg assert 0 # for demo purposes Here, the ``test_ehlo`` needs the ``smtp`` fixture value. pytest diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 doc/en/projects.txt --- a/doc/en/projects.txt +++ b/doc/en/projects.txt @@ -26,6 +26,7 @@ `21000 tests `_ * the `MoinMoin `_ Wiki Engine * `sentry `_, realtime app-maintenance and exception tracking +* `Astropy `_ and `affiliated packages `_ * `tox `_, virtualenv/Hudson integration tool * `PIDA `_ framework for integrated development * `PyPM `_ ActiveState's package manager diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 testing/test_assertrewrite.py --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -641,3 +641,27 @@ pyc.write(contents[:strip_bytes], mode='wb') assert _read_pyc(source, str(pyc)) is None # no error + + def test_reload_is_same(self, testdir): + # A file that will be picked up during collecting. + testdir.tmpdir.join("file.py").ensure() + testdir.tmpdir.join("pytest.ini").write(py.std.textwrap.dedent(""" + [pytest] + python_files = *.py + """)) + + testdir.makepyfile(test_fun=""" + import sys + try: + from imp import reload + except ImportError: + pass + + def test_loader(): + import file + assert sys.modules["file"] is reload(file) + """) + result = testdir.runpytest('-s') + result.stdout.fnmatch_lines([ + "* 1 passed*", + ]) diff -r 174c263a826d1fa2752e5ef2b9fba0737ecebe63 -r 72e40258338b0f90ba2d769d09ca827b90223a88 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX -vl +addopts= -rxsX rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance https://bitbucket.org/pytest-dev/pytest/commits/8a9039aed722/ Changeset: 8a9039aed722 User: bubenkoff Date: 2015-03-23 19:42:16+00:00 Summary: merge pfctdayelise/issue463 Affected #: 4 files diff -r 7177c6ac03d8c1871471282ced80d296522f27b1 -r 8a9039aed7226910656320aec0ef51a27bc93caa CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -60,6 +60,8 @@ - allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). +- fix issue463: raise specific error for 'parameterize' misspelling (pfctdayelise). + 2.6.4 ---------- diff -r 7177c6ac03d8c1871471282ced80d296522f27b1 -r 8a9039aed7226910656320aec0ef51a27bc93caa _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -1,6 +1,11 @@ """ generic mechanism for marking and selecting python functions. """ import py +class MarkerError(Exception): + """ + Error in use of a pytest marker/attribute. + """ + def pytest_namespace(): return {'mark': MarkGenerator()} diff -r 7177c6ac03d8c1871471282ced80d296522f27b1 -r 8a9039aed7226910656320aec0ef51a27bc93caa _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -4,7 +4,7 @@ import inspect import sys import pytest -from _pytest.mark import MarkDecorator +from _pytest.mark import MarkDecorator, MarkerError from py._code.code import TerminalRepr import _pytest @@ -142,6 +142,10 @@ def pytest_generate_tests(metafunc): + # this misspelling is common - raise a specific error to alert the user + if hasattr(metafunc.function, 'parameterize'): + msg = "{0} has 'parameterize', spelling should be 'parametrize'" + raise MarkerError(msg.format(metafunc.function.__name__)) try: markers = metafunc.function.parametrize except AttributeError: diff -r 7177c6ac03d8c1871471282ced80d296522f27b1 -r 8a9039aed7226910656320aec0ef51a27bc93caa testing/python/metafunc.py --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -692,6 +692,21 @@ reprec = testdir.inline_run() reprec.assertoutcome(passed=4) + @pytest.mark.issue463 + def test_parameterize_misspelling(self, testdir): + testdir.makepyfile(""" + import pytest + + @pytest.mark.parameterize("x", range(2)) + def test_foo(x): + pass + """) + reprec = testdir.inline_run('--collectonly') + failures = reprec.getfailures() + assert len(failures) == 1 + expectederror = "MarkerError: test_foo has 'parameterize', spelling should be 'parametrize'" + assert expectederror in failures[0].longrepr.reprcrash.message + class TestMarkersWithParametrization: pytestmark = pytest.mark.issue308 Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 23 20:42:47 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 23 Mar 2015 19:42:47 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 39 Message-ID: <20150323194247.30736.36607@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/39 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4073:8a9039aed722 Author : Anatoly Bubenkov Branch : default Message: merge pfctdayelise/issue463 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 23 21:25:22 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 20:25:22 -0000 Subject: [Pytest-commit] commit/pytest: 4 new changesets Message-ID: <20150323202522.28593.65292@app10.ash-private.bitbucket.org> 4 new commits in pytest: https://bitbucket.org/pytest-dev/pytest/commits/1cce2942bd98/ Changeset: 1cce2942bd98 User: almarklein Date: 2015-03-21 08:26:35+00:00 Summary: allow postmortem debugging on failed test Affected #: 1 file diff -r 39361b33346e784e4f6359dbdba9c9957a8e4cd7 -r 1cce2942bd98d84589bb8b7dc1cb6e45af7e8966 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -86,7 +86,17 @@ item.session._setupstate.prepare(item) def pytest_runtest_call(item): - item.runtest() + try: + item.runtest() + except Exception: + # Store trace info to allow postmortem debugging + type, value, tb = sys.exc_info() + tb = tb.tb_next # Skip *this* frame + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + del tb # Get rid of it in this namespace + raise def pytest_runtest_teardown(item, nextitem): item.session._setupstate.teardown_exact(item, nextitem) https://bitbucket.org/pytest-dev/pytest/commits/9a5a37b91dd9/ Changeset: 9a5a37b91dd9 User: almarklein Date: 2015-03-21 16:06:24+00:00 Summary: Storing sys.last_traceback: test, docs and changelog Affected #: 3 files diff -r 1cce2942bd98d84589bb8b7dc1cb6e45af7e8966 -r 9a5a37b91dd9cec5fa4d988bd290d8ade3ebb544 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ 2.7.0.dev (compared to 2.6.4) ----------------------------- +- On failure, the ``sys.last_value``, ``sys.last_type`` and + ``sys.last_traceback`` are set, so that a user can inspect the error + via postmortem debugging. + - fix issue616: conftest.py files and their contained fixutres are now properly considered for visibility, independently from the exact current working directory and test arguments that are used. diff -r 1cce2942bd98d84589bb8b7dc1cb6e45af7e8966 -r 9a5a37b91dd9cec5fa4d988bd290d8ade3ebb544 doc/en/usage.txt --- a/doc/en/usage.txt +++ b/doc/en/usage.txt @@ -87,6 +87,9 @@ py.test -x --pdb # drop to PDB on first failure, then end test session py.test --pdb --maxfail=3 # drop to PDB for first three failures +Note that on any failure the exception information is stored on +``sys.last_traceback``. In interactive use, this allows one to drop +into postmortem debugging with any debug tool. Setting a breakpoint / aka ``set_trace()`` ---------------------------------------------------- diff -r 1cce2942bd98d84589bb8b7dc1cb6e45af7e8966 -r 9a5a37b91dd9cec5fa4d988bd290d8ade3ebb544 testing/test_runner.py --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -525,3 +525,18 @@ result = testdir.runpytest() assert 'INTERNALERROR' not in result.stdout.str() result.stdout.fnmatch_lines(['*else: assert False*']) + + +def test_store_except_info_on_eror(testdir): + # Simulate item that raises a specific exception + class ItemThatRaises: + def runtest(self): + raise IndexError('TEST') + try: + runner.pytest_runtest_call(ItemThatRaises()) + except IndexError: + pass + # Check that exception info is stored on sys + assert sys.last_type is IndexError + assert sys.last_value.args[0] == 'TEST' + assert sys.last_traceback https://bitbucket.org/pytest-dev/pytest/commits/459c55d80c6b/ Changeset: 459c55d80c6b User: almarklein Date: 2015-03-21 16:26:23+00:00 Summary: address reviewer comments Affected #: 2 files diff -r 9a5a37b91dd9cec5fa4d988bd290d8ade3ebb544 -r 459c55d80c6bc1a9d70699e9d129c7d23597a0a4 doc/en/usage.txt --- a/doc/en/usage.txt +++ b/doc/en/usage.txt @@ -88,8 +88,16 @@ py.test --pdb --maxfail=3 # drop to PDB for first three failures Note that on any failure the exception information is stored on -``sys.last_traceback``. In interactive use, this allows one to drop -into postmortem debugging with any debug tool. +``sys.last_value``, ``sys.last_type`` and ``sys.last_traceback``. In +interactive use, this allows one to drop into postmortem debugging with +any debug tool. One can also manually access the exception information, +for example:: + + >> import sys + >> sys.last_traceback.tb_lineno + 42 + >> sys.last_value + AssertionError('assert result == "ok"',) Setting a breakpoint / aka ``set_trace()`` ---------------------------------------------------- diff -r 9a5a37b91dd9cec5fa4d988bd290d8ade3ebb544 -r 459c55d80c6bc1a9d70699e9d129c7d23597a0a4 testing/test_runner.py --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -527,7 +527,10 @@ result.stdout.fnmatch_lines(['*else: assert False*']) -def test_store_except_info_on_eror(testdir): +def test_store_except_info_on_eror(): + """ Test that upon test failure, the exception info is stored on + sys.last_traceback and friends. + """ # Simulate item that raises a specific exception class ItemThatRaises: def runtest(self): https://bitbucket.org/pytest-dev/pytest/commits/08307971b2c2/ Changeset: 08307971b2c2 User: bubenkoff Date: 2015-03-23 20:25:10+00:00 Summary: merge almarklein/default Affected #: 4 files diff -r 8a9039aed7226910656320aec0ef51a27bc93caa -r 08307971b2c21e62f9f72f92db7f6644bf7baa42 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -62,6 +62,10 @@ - fix issue463: raise specific error for 'parameterize' misspelling (pfctdayelise). +- On failure, the ``sys.last_value``, ``sys.last_type`` and + ``sys.last_traceback`` are set, so that a user can inspect the error + via postmortem debugging (almarklein). + 2.6.4 ---------- diff -r 8a9039aed7226910656320aec0ef51a27bc93caa -r 08307971b2c21e62f9f72f92db7f6644bf7baa42 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -86,7 +86,17 @@ item.session._setupstate.prepare(item) def pytest_runtest_call(item): - item.runtest() + try: + item.runtest() + except Exception: + # Store trace info to allow postmortem debugging + type, value, tb = sys.exc_info() + tb = tb.tb_next # Skip *this* frame + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + del tb # Get rid of it in this namespace + raise def pytest_runtest_teardown(item, nextitem): item.session._setupstate.teardown_exact(item, nextitem) diff -r 8a9039aed7226910656320aec0ef51a27bc93caa -r 08307971b2c21e62f9f72f92db7f6644bf7baa42 doc/en/usage.txt --- a/doc/en/usage.txt +++ b/doc/en/usage.txt @@ -87,6 +87,17 @@ py.test -x --pdb # drop to PDB on first failure, then end test session py.test --pdb --maxfail=3 # drop to PDB for first three failures +Note that on any failure the exception information is stored on +``sys.last_value``, ``sys.last_type`` and ``sys.last_traceback``. In +interactive use, this allows one to drop into postmortem debugging with +any debug tool. One can also manually access the exception information, +for example:: + + >> import sys + >> sys.last_traceback.tb_lineno + 42 + >> sys.last_value + AssertionError('assert result == "ok"',) Setting a breakpoint / aka ``set_trace()`` ---------------------------------------------------- diff -r 8a9039aed7226910656320aec0ef51a27bc93caa -r 08307971b2c21e62f9f72f92db7f6644bf7baa42 testing/test_runner.py --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -525,3 +525,21 @@ result = testdir.runpytest() assert 'INTERNALERROR' not in result.stdout.str() result.stdout.fnmatch_lines(['*else: assert False*']) + + +def test_store_except_info_on_eror(): + """ Test that upon test failure, the exception info is stored on + sys.last_traceback and friends. + """ + # Simulate item that raises a specific exception + class ItemThatRaises: + def runtest(self): + raise IndexError('TEST') + try: + runner.pytest_runtest_call(ItemThatRaises()) + except IndexError: + pass + # Check that exception info is stored on sys + assert sys.last_type is IndexError + assert sys.last_value.args[0] == 'TEST' + assert sys.last_traceback Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 23 21:25:36 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 23 Mar 2015 20:25:36 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 40 Message-ID: <20150323202536.30044.4040@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/40 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4077:08307971b2c2 Author : Anatoly Bubenkov Branch : default Message: merge almarklein/default -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Mon Mar 23 21:27:25 2015 From: issues-reply at bitbucket.org (Anthony Sottile) Date: Mon, 23 Mar 2015 20:27:25 -0000 Subject: [Pytest-commit] Issue #231: tox 1.9.1 chokes on `-e .` in dependent requirements file (hpk42/tox) Message-ID: <20150323202725.12183.30568@app09.ash-private.bitbucket.org> New issue 231: tox 1.9.1 chokes on `-e .` in dependent requirements file https://bitbucket.org/hpk42/tox/issue/231/tox-191-chokes-on-e-in-dependent Anthony Sottile: ``` $ tox --version 1.9.1 imported from /tmp/venv/local/lib/python2.7/site-packages/tox/__init__.pyc $ cat tox.ini [tox] envlist = py26,py27 skipsdist = True [testenv] deps = -rrequirements-dev.txt commands = pip freeze -l $ cat requirements-dev.txt -e . flake8 pytest $ cat setup.py from setuptools import setup setup(name='test') $ tox -e py27 py27 recreate: /tmp/.tox/py27 py27 installdeps: None, flake8, pytest ERROR: invocation failed (exit code 1), logfile: /tmp/.tox/py27/log/py27-1.log ERROR: actionid=py27 msg=getenv cmdargs=[local('/tmp/.tox/py27/bin/pip'), 'install', None, 'flake8', 'pytest'] env={'QT_QPA_PLATFORMTHEME': 'appmenu-qt5', 'XDG_GREETER_DATA_DIR': '/var/lib/lightdm-data/asottile', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'XDG_CURRENT_DESKTOP': 'Unity', 'QT_IM_MODULE': 'ibus', 'LOGNAME': 'asottile', 'WINDOWID': '65017393', 'PATH': '/tmp/.tox/py27/bin:/tmp/venv/bin:/home/asottile/bin:/home/asottile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games', 'XDG_VTNR': '7', 'GNOME_KEYRING_CONTROL': '/run/user/1000/keyring-XlLHLL', 'PS1': '(venv)\\[\\e]0;\\u@\\h: \\w\\a\\]${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ', 'DISPLAY': ':0', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'XDG_SESSION_PATH': '/org/freedesktop/DisplayManager/Session0', 'XAUTHORITY': '/home/asottile/.Xauthority', 'LANGUAGE': 'en_US', 'SESSION_MANAGER': 'local/work:@/tmp/.ICE-unix/2525,unix/work:/tmp/.ICE-unix/2525', 'SHLVL': '1', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu. mandatory.path', 'CLUTTER_IM_MODULE': 'xim', 'PIP_DOWNLOAD_CACHE': '/home/asottile/.pip/cache', 'QT4_IM_MODULE': 'xim', 'JOB': 'dbus', 'TEXTDOMAIN': 'im-config', 'SESSIONTYPE': 'gnome-session', 'XMODIFIERS': '@im=ibus', 'PYTHONHASHSEED': '89934717', 'GPG_AGENT_INFO': '/run/user/1000/keyring-XlLHLL/gpg:0:1', 'HOME': '/home/asottile', 'SELINUX_INIT': 'YES', 'SSH_AUTH_SOCK': '/run/user/1000/keyring-XlLHLL/ssh', 'TOXENV': 'py27', 'XDG_RUNTIME_DIR': '/run/user/1000', 'GTK_IM_MODULE': 'ibus', 'COMPIZ_CONFIG_PROFILE': 'ubuntu', 'COMPIZ_BIN_PATH': '/usr/bin/', 'VIRTUAL_ENV': '/tmp/.tox/py27', 'VTE_VERSION': '3409', 'GDMSESSION': 'ubuntu', 'IM_CONFIG_PHASE': '1', 'TEXTDOMAINDIR': '/usr/share/locale/', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/', 'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg', 'BENCH': 'false', 'XDG_SESSION_ID': 'c2', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/tmp/dbus-KQpyOfRNoG', '_': '/tmp/venv/bin/tox', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'SESSION': 'ubuntu', 'DESKTOP_SESSION': 'ubuntu', 'UPSTART_SESSION': 'unix:abstract=/com/ubuntu/upstart-session/1000/2329', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'GNOME_KEYRING_PID': '2326', 'XDG_SEAT': 'seat0', 'OLDPWD': '/home/asottile', 'GDM_LANG': 'en_US', 'GTK_MODULES': 'overlay-scrollbar:unity-gtk-module', 'INSTANCE': '', 'PWD': '/tmp', 'PrlCompizSessionClose': '0x7f62acc38a60', 'COLORTERM': 'gnome-terminal', 'XDG_MENU_PREFIX': 'gnome-', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm =01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:', 'USER': 'asottile'} DEPRECATION: --download-cache has been deprecated and will be removed in the future. Pip now automatically uses and configures its cache. Collecting None Could not find any downloads that satisfy the requirement None No distributions at all found for None ERROR: could not install deps [None, flake8, pytest]; v = InvocationError('/tmp/.tox/py27/bin/pip install None flake8 pytest (see /tmp/.tox/py27/log/py27-1.log)', 1) ___________________________________ summary ____________________________________ ERROR: py27: could not install deps [None, flake8, pytest]; v = InvocationError('/tmp/.tox/py27/bin/pip install None flake8 pytest (see /tmp/.tox/py27/log/py27-1.log)', 1) ``` From commits-noreply at bitbucket.org Mon Mar 23 21:28:38 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 20:28:38 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: fix pep257 Message-ID: <20150323202838.24594.20863@app07.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/9ad1ea7f3e90/ Changeset: 9ad1ea7f3e90 User: bubenkoff Date: 2015-03-23 20:28:29+00:00 Summary: fix pep257 Affected #: 1 file diff -r 08307971b2c21e62f9f72f92db7f6644bf7baa42 -r 9ad1ea7f3e905e6b89e613c30d17bd3c250e719f _pytest/mark.py --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -1,10 +1,10 @@ """ generic mechanism for marking and selecting python functions. """ import py + class MarkerError(Exception): - """ - Error in use of a pytest marker/attribute. - """ + + """Error in use of a pytest marker/attribute.""" def pytest_namespace(): Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Mon Mar 23 21:28:54 2015 From: builds at drone.io (Drone.io Build) Date: Mon, 23 Mar 2015 20:28:54 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 41 Message-ID: <20150323202854.30718.59042@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/41 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4078:9ad1ea7f3e90 Author : Anatoly Bubenkov Branch : default Message: fix pep257 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Mon Mar 23 22:02:24 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Mon, 23 Mar 2015 21:02:24 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20150323210224.2356.90850@app12.ash-private.bitbucket.org> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/452288d6c500/ Changeset: 452288d6c500 User: hpk42 Date: 2015-03-23 20:46:42+00:00 Summary: - backout ability that --force-deps substitutes name/versions in requirement files due to various issues. - This fixes issue228, fixes issue230, fixes issue231 which popped up with 1.9.1. - bump to 1.9.2 version Affected #: 5 files diff -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ -DEV +1.9.2 ----------- +- backout ability that --force-deps substitutes name/versions in + requirement files due to various issues. + This fixes issue228, fixes issue230, fixes issue231 + which popped up with 1.9.1. + 1.9.1 ----------- diff -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.2.dev1', + version='1.9.2', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1423,50 +1423,6 @@ r'*deps=*dep1, dep2==5.0*', ]) - def test_force_dep_with_requirements_txt_file(self, cmd, initproj): - """ - Make sure we can override dependencies configured in external reqs.txt - when using the command line option --force-dep. - """ - initproj("example123-0.5", filedefs={ - 'tox.ini': ''' - [tox] - - [testenv] - deps= - dep1==1.0 - -r{toxinidir}/reqs.txt - ''', - 'reqs.txt': ''' - -e git://hello/world/git#egg=Hello - # comment - dep2>=2.0 # comment - - - -i http://index.local/ - dep3 - dep4==4.0 - -r reqs2.txt - ''', - 'reqs2.txt': ''' - dep5>=2.2 - ''' - }) - config = parseconfig( - ['--force-dep=dep1==1.5', '--force-dep=dep2==2.1', - '--force-dep=dep3==3.0']) - assert config.option.force_dep == [ - 'dep1==1.5', 'dep2==2.1', 'dep3==3.0'] - - deps = config.envconfigs['python'].deps - assert len(deps) == 6 - expected = ['dep1==1.5', 'Hello', 'dep2==2.1', - 'dep3==3.0', 'dep4', 'dep5'] - - for index, dep in enumerate(deps): - assert dep.name == expected[index] - - class TestArgumentParser: def test_dash_e_single_1(self): diff -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.2.dev1' +__version__ = '1.9.2' class exception: class Error(Exception): diff -r 7afd77a31d4fc4c150fd039aaf521d26eb1becc2 -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -9,8 +9,7 @@ import itertools from tox.interpreters import Interpreters -from pip.req.req_file import parse_requirements -from pip.download import PipSession + import py import tox @@ -372,8 +371,6 @@ vc.whitelist_externals = reader.getlist(section, "whitelist_externals") vc.deps = [] - requirement_files = [] - for depline in reader.getlist(section, "deps"): m = re.match(r":(\w+):\s*(\S+)", depline) if m: @@ -382,29 +379,8 @@ else: name = depline.strip() ixserver = None - - - # We want to parse requirements.txt files last so that - # we can process them with forced dependencies - if name[:2] == '-r': - fname = name[2:].strip() - requirement_files.append(fname) - else: - name = self._replace_forced_dep(name, config) - vc.deps.append(DepConfig(name, ixserver)) - - pip_session = PipSession() - - for requirement_file in requirement_files: - req_deps = parse_requirements( - requirement_file, - session=pip_session - ) - - for r in req_deps: - name = self._replace_forced_dep(r.name, config) - vc.deps.append(DepConfig(name, ixserver)) - + name = self._replace_forced_dep(name, config) + vc.deps.append(DepConfig(name, ixserver)) vc.distribute = reader.getbool(section, "distribute", False) vc.sitepackages = self.config.option.sitepackages or \ reader.getbool(section, "sitepackages", False) https://bitbucket.org/hpk42/tox/commits/0ef1427db319/ Changeset: 0ef1427db319 User: hpk42 Date: 2015-03-23 20:59:48+00:00 Summary: Added tag 1.9.2 for changeset 452288d6c500 Affected #: 1 file diff -r 452288d6c50042ccfc1c944b24f4eb47df8f6823 -r 0ef1427db3193109a817d08806e4d7b80d9d9319 .hgtags --- a/.hgtags +++ b/.hgtags @@ -22,3 +22,4 @@ 2aa9b587d12ae4b325cb4d5a9a801a222ffc328c 1.8.1 ad64513cf6bf0ef99a4a11678aa3260d8078976f 1.9.0 7ccc0b0bd25e1e01dfd861b890ada69042a32c3a 1.9.1 +452288d6c50042ccfc1c944b24f4eb47df8f6823 1.9.2 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 Mar 24 07:57:01 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 24 Mar 2015 06:57:01 -0000 Subject: [Pytest-commit] commit/tox: hpk42: bump version Message-ID: <20150324065701.7032.46831@app14.ash-private.bitbucket.org> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/45733e7d58f2/ Changeset: 45733e7d58f2 User: hpk42 Date: 2015-03-24 06:56:53+00:00 Summary: bump version Affected #: 3 files diff -r 0ef1427db3193109a817d08806e4d7b80d9d9319 -r 45733e7d58f2617938fd2e9dd0c64860785b3974 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +dev +----------- + +- + + 1.9.2 ----------- diff -r 0ef1427db3193109a817d08806e4d7b80d9d9319 -r 45733e7d58f2617938fd2e9dd0c64860785b3974 setup.py --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='1.9.2', + version='1.9.3.dev1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 0ef1427db3193109a817d08806e4d7b80d9d9319 -r 45733e7d58f2617938fd2e9dd0c64860785b3974 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.9.2' +__version__ = '1.9.3.dev1' class exception: class Error(Exception): 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 Mar 24 11:51:48 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 24 Mar 2015 10:51:48 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: add verbosity to the tests Message-ID: <20150324105148.15416.93040@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/1146780cad2a/ Changeset: 1146780cad2a User: bubenkoff Date: 2015-03-24 10:51:45+00:00 Summary: add verbosity to the tests Affected #: 1 file diff -r 9ad1ea7f3e905e6b89e613c30d17bd3c250e719f -r 1146780cad2a517cfca1e39e451db677533ac4e3 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX +addopts= -rxsXvl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Tue Mar 24 11:56:00 2015 From: builds at drone.io (Drone.io Build) Date: Tue, 24 Mar 2015 10:56:00 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 42 Message-ID: <20150324105600.16938.44651@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/42 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4078:9ad1ea7f3e90 Author : Anatoly Bubenkov Branch : default Message: fix pep257 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Mar 24 11:57:11 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 24 Mar 2015 10:57:11 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: correct config Message-ID: <20150324105711.16213.79400@app08.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/8240ccd27d3b/ Changeset: 8240ccd27d3b User: bubenkoff Date: 2015-03-24 10:56:59+00:00 Summary: correct config Affected #: 1 file diff -r 1146780cad2a517cfca1e39e451db677533ac4e3 -r 8240ccd27d3b82eacb7c1c74d0f32dd846c8e17f tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsXvl +addopts= -rxsX -vl rsyncdirs=tox.ini pytest.py _pytest testing python_files=test_*.py *_test.py testing/*/*.py python_classes=Test Acceptance Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Tue Mar 24 11:59:00 2015 From: builds at drone.io (Drone.io Build) Date: Tue, 24 Mar 2015 10:59:00 +0000 Subject: [Pytest-commit] [FAIL] pytest-xdist - # 8 Message-ID: <20150324105900.16912.8464@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist/8 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist Repository : https://bitbucket.org/pytest-dev/pytest-xdist Version : 203:00cfff4834e7 Author : Anatoly Bubenkov Branch : default Message: README.txt edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at drone.io Tue Mar 24 12:14:21 2015 From: builds at drone.io (Drone.io Build) Date: Tue, 24 Mar 2015 11:14:21 +0000 Subject: [Pytest-commit] [FAIL] pytest-xdist - # 9 Message-ID: <20150324111421.30728.67405@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist/9 Project : https://drone.io/bitbucket.org/pytest-dev/pytest-xdist Repository : https://bitbucket.org/pytest-dev/pytest-xdist Version : 203:00cfff4834e7 Author : Anatoly Bubenkov Branch : default Message: README.txt edited online with Bitbucket -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Tue Mar 24 13:41:58 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Tue, 24 Mar 2015 12:41:58 -0000 Subject: [Pytest-commit] commit/pytest: bubenkoff: revert verbosity Message-ID: <20150324124158.30691.94173@app14.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/f1e74746d517/ Changeset: f1e74746d517 User: bubenkoff Date: 2015-03-24 12:41:49+00:00 Summary: revert verbosity Affected #: 1 file diff -r 8240ccd27d3b82eacb7c1c74d0f32dd846c8e17f -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 tox.ini --- a/tox.ini +++ b/tox.ini @@ -136,7 +136,7 @@ minversion=2.0 plugins=pytester #--pyargs --doctest-modules --ignore=.tox -addopts= -rxsX -vl +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/pytest-dev/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From issues-reply at bitbucket.org Wed Mar 25 10:11:06 2015 From: issues-reply at bitbucket.org (Ronny Pfannschmidt) Date: Wed, 25 Mar 2015 09:11:06 -0000 Subject: [Pytest-commit] Issue #232: dist creation commands (hpk42/tox) Message-ID: <20150325091106.32028.68957@app14.ash-private.bitbucket.org> New issue 232: dist creation commands https://bitbucket.org/hpk42/tox/issue/232/dist-creation-commands Ronny Pfannschmidt: in order to support creation/installation of wheels as well as custom distribton generators it seems sensible to add a global option for the sdist creation command it should default to `python setup.py sdist` but allow people to override with something like `python setup.py sdist bdist_wheel` in addition a global option is required to check if all requirements for the sdist creation are availiable i propose to add the keys `dist_command` for the command and `dist_requires` for the requirements needed to create the distribution (this would also allow to add requirements for recent setuptoolsand setup time dependencies) whether the implementation creates a virtualenv to install those or tells the user to do so is up for implementation in case of virtualenv creation we can also support specifying exact/desired tox versions there From issues-reply at bitbucket.org Wed Mar 25 18:03:16 2015 From: issues-reply at bitbucket.org (Anthony Sottile) Date: Wed, 25 Mar 2015 17:03:16 -0000 Subject: [Pytest-commit] Issue #703: pytest discovers baseclasses that are imported and attempts to run them (pytest-dev/pytest) Message-ID: <20150325170316.480.87646@app10.ash-private.bitbucket.org> New issue 703: pytest discovers baseclasses that are imported and attempts to run them https://bitbucket.org/pytest-dev/pytest/issue/703/pytest-discovers-baseclasses-that-are Anthony Sottile: ``` # testing.py import unittest class BaseTest(unittest.TestCase): fill_me_out = None def test(self): assert self.fill_me_out is not None ``` ``` # test.py from testing import BaseTest class MyTest(BaseTest): fill_me_out = 10 ``` Expected: ``` $ py.test test.py -vv ============================= test session starts ============================== platform linux2 -- Python 2.6.7 -- py-1.4.26 -- pytest-2.6.4 -- /tmp/venv/bin/python collected 1 items test.py <- testing.py::MyTest::test PASSED =========================== 1 passed in 0.01 seconds =========================== ``` Actual: ``` $ py.test test.py -vv ============================= test session starts ============================== platform linux2 -- Python 2.6.7 -- py-1.4.26 -- pytest-2.6.4 -- /tmp/venv/bin/python collected 2 items test.py <- testing.py::MyTest::test PASSED test.py <- testing.py::BaseTest::test FAILED =================================== FAILURES =================================== ________________________________ BaseTest.test _________________________________ self = def test(self): > assert self.fill_me_out is not None E AssertionError: assert None is not None E + where None = .fill_me_out testing.py:9: AssertionError ====================== 1 failed, 1 passed in 0.01 seconds ====================== ``` To clarify the behaviour I want: classes / functions that are only in a module because they are an import side-effect should not be discovered. Obligatory version: ``` $ py.test --version This is pytest version 2.6.4, imported from /tmp/venv/lib/python2.6/site-packages/pytest.pyc ``` From commits-noreply at bitbucket.org Thu Mar 26 09:34:33 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 26 Mar 2015 08:34:33 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: bump verrsion to python2.7, fix a too precise test for windows, regen docs Message-ID: <20150326083433.14415.43831@app07.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/7ed701fa2fb5/ Changeset: 7ed701fa2fb5 User: hpk42 Date: 2015-03-26 08:34:10+00:00 Summary: bump verrsion to python2.7, fix a too precise test for windows, regen docs Affected #: 25 files diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -2.7.0.dev (compared to 2.6.4) +2.7.0 (compared to 2.6.4) ----------------------------- - fix issue435: make reload() work when assert rewriting is active. @@ -47,6 +47,8 @@ is scheduled to drop supporting the old ``__multicall__`` and only support the hookwrapper protocol. +- majorly speed up invocation of plugin hooks + - use hookwrapper mechanism in builtin pytest plugins. - add a doctest ini option for doctest flags, thanks Holger Peters. diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.7.0.dev1' +__version__ = '2.7.0' diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/announce/release-2.7.0.txt --- /dev/null +++ b/doc/en/announce/release-2.7.0.txt @@ -0,0 +1,101 @@ +pytest-2.7.0: fixes, features, speed improvements +=========================================================================== + +pytest is a mature Python testing tool with more than a 1100 tests +against itself, passing on many different interpreters and platforms. +This release is supposed to be drop-in compatible to 2.6.X. + +See below for the changes and see docs at: + + http://pytest.org + +As usual, you can upgrade from pypi via:: + + pip install -U pytest + +Thanks to all who contributed, among them: + + Anatoly Bubenkoff + Floris Bruynooghe + Brianna Laugher + Eric Siegerman + Daniel Hahler + Charles Cloud + Tom Viner + Holger Peters + Ldiary Translations + almarklein + +have fun, +holger krekel + +2.7.0 (compared to 2.6.4) +----------------------------- + +- fix issue435: make reload() work when assert rewriting is active. + Thanks Daniel Hahler. + +- fix issue616: conftest.py files and their contained fixutres are now + properly considered for visibility, independently from the exact + current working directory and test arguments that are used. + Many thanks to Eric Siegerman and his PR235 which contains + systematic tests for conftest visibility and now passes. + This change also introduces the concept of a ``rootdir`` which + is printed as a new pytest header and documented in the pytest + customize web page. + +- change reporting of "diverted" tests, i.e. tests that are collected + in one file but actually come from another (e.g. when tests in a test class + come from a base class in a different file). We now show the nodeid + and indicate via a postfix the other file. + +- add ability to set command line options by environment variable PYTEST_ADDOPTS. + +- added documentation on the new pytest-dev teams on bitbucket and + github. See https://pytest.org/latest/contributing.html . + Thanks to Anatoly for pushing and initial work on this. + +- fix issue650: new option ``--docttest-ignore-import-errors`` which + will turn import errors in doctests into skips. Thanks Charles Cloud + for the complete PR. + +- fix issue655: work around different ways that cause python2/3 + to leak sys.exc_info into fixtures/tests causing failures in 3rd party code + +- fix issue615: assertion re-writing did not correctly escape % signs + when formatting boolean operations, which tripped over mixing + booleans with modulo operators. Thanks to Tom Viner for the report, + triaging and fix. + +- implement issue351: add ability to specify parametrize ids as a callable + to generate custom test ids. Thanks Brianna Laugher for the idea and + implementation. + +- introduce and document new hookwrapper mechanism useful for plugins + which want to wrap the execution of certain hooks for their purposes. + This supersedes the undocumented ``__multicall__`` protocol which + pytest itself and some external plugins use. Note that pytest-2.8 + is scheduled to drop supporting the old ``__multicall__`` + and only support the hookwrapper protocol. + +- majorly speed up invocation of plugin hooks + +- use hookwrapper mechanism in builtin pytest plugins. + +- add a doctest ini option for doctest flags, thanks Holger Peters. + +- add note to docs that if you want to mark a parameter and the + parameter is a callable, you also need to pass in a reason to disambiguate + it from the "decorator" case. Thanks Tom Viner. + +- "python_classes" and "python_functions" options now support glob-patterns + for test discovery, as discussed in issue600. Thanks Ldiary Translations. + +- allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). + +- fix issue463: raise specific error for 'parameterize' misspelling (pfctdayelise). + +- On failure, the ``sys.last_value``, ``sys.last_type`` and + ``sys.last_traceback`` are set, so that a user can inspect the error + via postmortem debugging (almarklein). + diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/assert.txt --- a/doc/en/assert.txt +++ b/doc/en/assert.txt @@ -26,7 +26,8 @@ $ py.test test_assert1.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-98, inifile: collected 1 items test_assert1.py F @@ -135,7 +136,8 @@ $ py.test test_assert2.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-98, inifile: collected 1 items test_assert2.py F @@ -202,16 +204,16 @@ F ================================= FAILURES ================================= _______________________________ test_compare _______________________________ - + def test_compare(): f1 = Foo(1) f2 = Foo(2) > assert f1 == f2 E assert Comparing Foo instances: E vals: 1 != 2 - + test_foocompare.py:8: AssertionError - 1 failed in 0.01 seconds + 1 failed in 0.00 seconds .. _assert-details: .. _`assert introspection`: diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/builtin.txt --- a/doc/en/builtin.txt +++ b/doc/en/builtin.txt @@ -77,12 +77,10 @@ enables capturing of writes to sys.stdout/sys.stderr and makes captured output available via ``capsys.readouterr()`` method calls which return a ``(out, err)`` tuple. - capfd enables capturing of writes to file descriptors 1 and 2 and makes captured output available via ``capfd.readouterr()`` method calls which return a ``(out, err)`` tuple. - monkeypatch The returned ``monkeypatch`` funcarg provides these helper methods to modify objects, dictionaries or os.environ:: @@ -100,7 +98,6 @@ test function has finished. The ``raising`` parameter determines if a KeyError or AttributeError will be raised if the set/deletion operation has no target. - pytestconfig the pytest config object with access to command line opts. recwarn @@ -111,13 +108,11 @@ See http://docs.python.org/library/warnings.html for information on warning categories. - tmpdir return a temporary directory path object which is unique to each test function invocation, created as a sub directory of the base temporary directory. The returned object is a `py.path.local`_ path object. - in 0.00 seconds diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/capture.txt --- a/doc/en/capture.txt +++ b/doc/en/capture.txt @@ -64,7 +64,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-101, inifile: collected 2 items test_module.py .F @@ -78,7 +79,7 @@ test_module.py:9: AssertionError -------------------------- Captured stdout setup --------------------------- - setting up + setting up ==================== 1 failed, 1 passed in 0.01 seconds ==================== Accessing captured output from a test function diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 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.6" -release = "2.6.4" +version = "2.7" +release = "2.7.0" import sys, os diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/doctest.txt --- a/doc/en/doctest.txt +++ b/doc/en/doctest.txt @@ -44,12 +44,13 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-107, inifile: pytest.ini collected 1 items mymodule.py . - ========================= 1 passed in 0.06 seconds ========================= + ========================= 1 passed in 0.05 seconds ========================= It is possible to use fixtures using the ``getfixture`` helper:: diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/markers.txt --- a/doc/en/example/markers.txt +++ b/doc/en/example/markers.txt @@ -31,7 +31,8 @@ $ py.test -v -m webtest =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::test_send_http PASSED @@ -43,7 +44,8 @@ $ py.test -v -m "not webtest" =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::test_something_quick PASSED @@ -62,7 +64,8 @@ $ py.test -v test_server.py::TestClass::test_method =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 5 items test_server.py::TestClass::test_method PASSED @@ -73,7 +76,8 @@ $ py.test -v test_server.py::TestClass =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::TestClass::test_method PASSED @@ -84,7 +88,8 @@ $ py.test -v test_server.py::TestClass test_server.py::test_send_http =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 8 items test_server.py::TestClass::test_method PASSED @@ -120,7 +125,8 @@ $ py.test -v -k http # running with the above defined example module =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::test_send_http PASSED @@ -132,7 +138,8 @@ $ py.test -k "not send_http" -v =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::test_something_quick PASSED @@ -146,7 +153,8 @@ $ py.test -k "http or quick" -v =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-167, inifile: collecting ... collected 4 items test_server.py::test_send_http PASSED @@ -334,23 +342,25 @@ $ py.test -E stage2 =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 1 items test_someenv.py s - ======================== 1 skipped in 0.01 seconds ========================= + ======================== 1 skipped in 0.00 seconds ========================= and here is one that specifies exactly the environment needed:: $ py.test -E stage1 =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 1 items test_someenv.py . - ========================= 1 passed in 0.01 seconds ========================= + ========================= 1 passed in 0.00 seconds ========================= The ``--markers`` option always gives you a list of available markers:: @@ -463,12 +473,13 @@ $ py.test -rs # this option reports skip reasons =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 4 items test_plat.py sss. ========================= short test summary info ========================== - SKIP [3] /tmp/doc-exec-68/conftest.py:12: cannot run on platform linux + SKIP [3] /tmp/doc-exec-167/conftest.py:12: cannot run on platform linux =================== 1 passed, 3 skipped in 0.01 seconds ==================== @@ -476,7 +487,8 @@ $ py.test -m linux2 =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 4 items test_plat.py s @@ -527,7 +539,8 @@ $ py.test -m interface --tb=short =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 4 items test_module.py FF @@ -548,7 +561,8 @@ $ py.test -m "interface or event" --tb=short =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-167, inifile: collected 4 items test_module.py FFF diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/multipython.py --- a/doc/en/example/multipython.py +++ b/doc/en/example/multipython.py @@ -5,7 +5,7 @@ import py import pytest -pythonlist = ['python2.6', 'python2.7', 'python3.4'] +pythonlist = ['python2.6', 'python2.7', 'python3.3'] @pytest.fixture(params=pythonlist) def python1(request, tmpdir): picklefile = tmpdir.join("data.pickle") @@ -26,7 +26,7 @@ dumpfile.write(py.code.Source(""" import pickle f = open(%r, 'wb') - s = pickle.dump(%r, f) + s = pickle.dump(%r, f, protocol=2) f.close() """ % (str(self.picklefile), obj))) py.process.cmdexec("%s %s" %(self.pythonpath, dumpfile)) diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/nonpython.txt --- a/doc/en/example/nonpython.txt +++ b/doc/en/example/nonpython.txt @@ -27,7 +27,8 @@ nonpython $ py.test test_simple.yml =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collected 2 items test_simple.yml F. @@ -56,11 +57,12 @@ nonpython $ py.test -v =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collecting ... collected 2 items - test_simple.yml::usecase: hello FAILED - test_simple.yml::usecase: ok PASSED + test_simple.yml::hello FAILED + test_simple.yml::ok PASSED ================================= FAILURES ================================= ______________________________ usecase: hello ______________________________ @@ -74,9 +76,10 @@ nonpython $ py.test --collect-only =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collected 2 items - + diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/parametrize.txt --- a/doc/en/example/parametrize.txt +++ b/doc/en/example/parametrize.txt @@ -126,22 +126,12 @@ $ py.test test_time.py --collect-only - ============================ test session starts ============================= - platform linux2 -- Python 2.7.3 -- py-1.4.20 -- pytest-2.6.0.dev1 - plugins: cache - collected 6 items - - - - - - - - - ============================== in 0.04 seconds =============================== - - - + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-169, inifile: + + ============================= in 0.00 seconds ============================= + ERROR: file not found: test_time.py A quick port of "testscenarios" ------------------------------------ @@ -181,7 +171,8 @@ $ py.test test_scenarios.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-169, inifile: collected 4 items test_scenarios.py .... @@ -193,7 +184,8 @@ $ py.test --collect-only test_scenarios.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-169, inifile: collected 4 items @@ -257,7 +249,8 @@ $ py.test test_backends.py --collect-only =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-169, inifile: collected 2 items @@ -272,7 +265,7 @@ ================================= FAILURES ================================= _________________________ test_db_initialized[d2] __________________________ - db = + db = def test_db_initialized(db): # a dummy test @@ -326,9 +319,9 @@ $ py.test -q F.. ================================= FAILURES ================================= - ________________________ TestClass.test_equals[2-1] ________________________ + ________________________ TestClass.test_equals[1-2] ________________________ - self = , a = 1, b = 2 + self = , a = 1, b = 2 def test_equals(self, a, b): > assert a == b @@ -354,345 +347,8 @@ Running it results in some skips if we don't have all the python interpreters installed and otherwise runs all combinations (5 interpreters times 5 interpreters times 3 objects to serialize/deserialize):: . $ py.test -rs -q multipython.py - ..................FFFFFF... - ================================= FAILURES ================================= - ________________ test_basic_objects[python3.4-python2.6-42] ________________ - - python1 = - python2 = , obj = 42 - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p0/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p0/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p0/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.6/pickle.py", line 1370, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.6/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.6/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p0/load.py - _______________ test_basic_objects[python3.4-python2.6-obj1] _______________ - - python1 = - python2 = , obj = {} - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p1/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p1/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p1/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.6/pickle.py", line 1370, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.6/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.6/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p1/load.py - _______________ test_basic_objects[python3.4-python2.6-obj2] _______________ - - python1 = - python2 = , obj = {1: 3} - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p2/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/bin/python2.6 /tmp/pytest-111/test_basic_objects_python3_4_p2/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p2/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.6/pickle.py", line 1370, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.6/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.6/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p2/load.py - ________________ test_basic_objects[python3.4-python2.7-42] ________________ - - python1 = - python2 = , obj = 42 - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p3/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p3/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p3/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.7/pickle.py", line 1378, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.7/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.7/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p3/load.py - _______________ test_basic_objects[python3.4-python2.7-obj1] _______________ - - python1 = - python2 = , obj = {} - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p4/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p4/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p4/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.7/pickle.py", line 1378, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.7/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.7/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p4/load.py - _______________ test_basic_objects[python3.4-python2.7-obj2] _______________ - - python1 = - python2 = , obj = {1: 3} - - @pytest.mark.parametrize("obj", [42, {}, {1:3},]) - def test_basic_objects(python1, python2, obj): - python1.dumps(obj) - > python2.load_and_is_true("obj == %s" % obj) - - multipython.py:51: - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - multipython.py:46: in load_and_is_true - py.process.cmdexec("%s %s" %(self.pythonpath, loadfile)) - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - - cmd = '/home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p5/load.py' - - def cmdexec(cmd): - """ return unicode output of executing 'cmd' in a separate process. - - raise cmdexec.Error exeception if the command failed. - the exception will provide an 'err' attribute containing - the error-output from the command. - if the subprocess module does not provide a proper encoding/unicode strings - sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. - """ - process = subprocess.Popen(cmd, shell=True, - universal_newlines=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = process.communicate() - if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not - try: - default_encoding = sys.getdefaultencoding() # jython may not have it - except AttributeError: - default_encoding = sys.stdout.encoding or 'UTF-8' - out = unicode(out, process.stdout.encoding or default_encoding) - err = unicode(err, process.stderr.encoding or default_encoding) - status = process.poll() - if status: - > raise ExecutionFailed(status, status, cmd, out, err) - E py.process.cmdexec.Error: ExecutionFailed: 1 /home/hpk/venv/0/bin/python2.7 /tmp/pytest-111/test_basic_objects_python3_4_p5/load.py - E Traceback (most recent call last): - E File "/tmp/pytest-111/test_basic_objects_python3_4_p5/load.py", line 4, in - E obj = pickle.load(f) - E File "/usr/lib/python2.7/pickle.py", line 1378, in load - E return Unpickler(file).load() - E File "/usr/lib/python2.7/pickle.py", line 858, in load - E dispatch[key](self) - E File "/usr/lib/python2.7/pickle.py", line 886, in load_proto - E raise ValueError, "unsupported pickle protocol: %d" % proto - E ValueError: unsupported pickle protocol: 3 - - ../../../.tox/regen/lib/python3.4/site-packages/py/_process/cmdexec.py:28: Error - --------------------------- Captured stdout call --------------------------- - /tmp/pytest-111/test_basic_objects_python3_4_p5/load.py - 6 failed, 21 passed in 1.66 seconds + ........................... + 27 passed in 1.70 seconds Indirect parametrization of optional implementations/imports -------------------------------------------------------------------- @@ -739,12 +395,13 @@ $ py.test -rs test_module.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-169, inifile: collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-70/conftest.py:10: could not import 'opt2' + SKIP [1] /tmp/doc-exec-169/conftest.py:10: could not import 'opt2' =================== 1 passed, 1 skipped in 0.01 seconds ==================== diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/pythoncollection.txt --- a/doc/en/example/pythoncollection.txt +++ b/doc/en/example/pythoncollection.txt @@ -43,7 +43,8 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-170, inifile: setup.cfg collected 2 items @@ -88,9 +89,10 @@ . $ py.test --collect-only pythoncollection.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collected 3 items - + @@ -141,7 +143,8 @@ $ py.test --collect-only =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-170, inifile: pytest.ini collected 0 items ============================= in 0.00 seconds ============================= diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/reportingdemo.txt --- a/doc/en/example/reportingdemo.txt +++ b/doc/en/example/reportingdemo.txt @@ -13,7 +13,8 @@ assertion $ py.test failure_demo.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collected 42 items failure_demo.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF @@ -30,7 +31,7 @@ failure_demo.py:15: AssertionError _________________________ TestFailing.test_simple __________________________ - self = + self = def test_simple(self): def f(): @@ -40,13 +41,13 @@ > assert f() == g() E assert 42 == 43 - E + where 42 = .f at 0x2b4436f1e6a8>() - E + and 43 = .g at 0x2b4436f1e7b8>() + E + where 42 = .f at 0x2b186edd09d8>() + E + and 43 = .g at 0x2b186edd9950>() failure_demo.py:28: AssertionError ____________________ TestFailing.test_simple_multiline _____________________ - self = + self = def test_simple_multiline(self): otherfunc_multi( @@ -66,19 +67,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 = .f at 0x2b4436f1ebf8>() + E + where 42 = .f at 0x2b186edd99d8>() failure_demo.py:38: AssertionError _________________ TestSpecialisedExplanations.test_eq_text _________________ - self = + self = def test_eq_text(self): > assert 'spam' == 'eggs' @@ -89,7 +90,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 +103,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 +116,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 +133,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 +157,7 @@ failure_demo.py:58: AssertionError _________________ TestSpecialisedExplanations.test_eq_list _________________ - self = + self = def test_eq_list(self): > assert [0, 1, 2] == [0, 1, 3] @@ -167,7 +168,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 @@ -180,7 +181,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} @@ -197,7 +198,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]) @@ -214,7 +215,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] @@ -225,7 +226,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] @@ -234,7 +235,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' @@ -252,7 +253,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' @@ -265,7 +266,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 @@ -278,7 +279,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 @@ -297,7 +298,7 @@ i = Foo() > assert i.b == 2 E assert 1 == 2 - E + where 1 = .Foo object at 0x2b4436e42ac8>.b + E + where 1 = .Foo object at 0x2b186ee8d4e0>.b failure_demo.py:101: AssertionError _________________________ test_attribute_instance __________________________ @@ -307,8 +308,8 @@ b = 1 > assert Foo().b == 2 E assert 1 == 2 - E + where 1 = .Foo object at 0x2b4436f185c0>.b - E + where .Foo object at 0x2b4436f185c0> = .Foo'>() + E + where 1 = .Foo object at 0x2b186eea6240>.b + E + where .Foo object at 0x2b186eea6240> = .Foo'>() failure_demo.py:107: AssertionError __________________________ test_attribute_failure __________________________ @@ -324,7 +325,7 @@ failure_demo.py:116: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ - self = .Foo object at 0x2b4436f16a58> + self = .Foo object at 0x2b186ed9a4e0> def _get_b(self): > raise Exception('Failed to get attrib') @@ -340,15 +341,15 @@ b = 2 > assert Foo().b == Bar().b E assert 1 == 2 - E + where 1 = .Foo object at 0x2b4436f12a90>.b - E + where .Foo object at 0x2b4436f12a90> = .Foo'>() - E + and 2 = .Bar object at 0x2b4436f12ac8>.b - E + where .Bar object at 0x2b4436f12ac8> = .Bar'>() + E + where 1 = .Foo object at 0x2b186ee78630>.b + E + where .Foo object at 0x2b186ee78630> = .Foo'>() + E + and 2 = .Bar object at 0x2b186ee78358>.b + E + where .Bar object at 0x2b186ee78358> = .Bar'>() failure_demo.py:124: AssertionError __________________________ TestRaises.test_raises __________________________ - self = + self = def test_raises(self): s = 'qwe' @@ -360,10 +361,10 @@ > int(s) E ValueError: invalid literal for int() with base 10: 'qwe' - <0-codegen /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1028>:1: ValueError + <0-codegen /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1075>:1: ValueError ______________________ TestRaises.test_raises_doesnt _______________________ - self = + self = def test_raises_doesnt(self): > raises(IOError, "int('3')") @@ -372,7 +373,7 @@ failure_demo.py:136: Failed __________________________ TestRaises.test_raise ___________________________ - self = + self = def test_raise(self): > raise ValueError("demo error") @@ -381,7 +382,7 @@ failure_demo.py:139: ValueError ________________________ TestRaises.test_tupleerror ________________________ - self = + self = def test_tupleerror(self): > a,b = [1] @@ -390,7 +391,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] @@ -403,7 +404,7 @@ l is [1, 2, 3] ________________________ TestRaises.test_some_error ________________________ - self = + self = def test_some_error(self): > if namenotexi: @@ -431,7 +432,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 +456,7 @@ failure_demo.py:5: AssertionError ___________________ TestMoreErrors.test_z1_unpack_error ____________________ - self = + self = def test_z1_unpack_error(self): l = [] @@ -465,7 +466,7 @@ failure_demo.py:179: ValueError ____________________ TestMoreErrors.test_z2_type_error _____________________ - self = + self = def test_z2_type_error(self): l = 3 @@ -475,19 +476,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 +496,15 @@ def g(): return "456" > assert f().startswith(g()) - E assert ('456') - E + where = '123'.startswith - E + where '123' = .f at 0x2b4436f1e950>() - E + and '456' = .g at 0x2b4436f1e840>() + E assert ('456') + E + where = '123'.startswith + E + where '123' = .f at 0x2b186eea1510>() + E + and '456' = .g at 0x2b186eea1268>() failure_demo.py:195: AssertionError _____________________ TestMoreErrors.test_global_func ______________________ - self = + self = def test_global_func(self): > assert isinstance(globf(42), float) @@ -513,18 +514,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 +535,7 @@ failure_demo.py:205: AssertionError _____________________ TestMoreErrors.test_try_finally ______________________ - self = + self = def test_try_finally(self): x = 1 @@ -545,7 +546,7 @@ failure_demo.py:210: AssertionError ___________________ TestCustomAssertMsg.test_single_line ___________________ - self = + self = def test_single_line(self): class A: @@ -559,7 +560,7 @@ failure_demo.py:221: AssertionError ____________________ TestCustomAssertMsg.test_multiline ____________________ - self = + self = def test_multiline(self): class A: @@ -576,7 +577,7 @@ failure_demo.py:227: AssertionError ___________________ TestCustomAssertMsg.test_custom_repr ___________________ - self = + self = def test_custom_repr(self): class JSON: @@ -594,4 +595,4 @@ E + where 1 = This is JSON\n{\n 'foo': 'bar'\n}.a failure_demo.py:237: AssertionError - ======================== 42 failed in 0.23 seconds ========================= + ======================== 42 failed in 0.22 seconds ========================= diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/example/simple.txt --- a/doc/en/example/simple.txt +++ b/doc/en/example/simple.txt @@ -108,7 +108,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 0 items ============================= in 0.00 seconds ============================= @@ -152,12 +153,13 @@ $ py.test -rs # "-rs" means report details on the little 's' =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 2 items test_module.py .s ========================= short test summary info ========================== - SKIP [1] /tmp/doc-exec-73/conftest.py:9: need --runslow option to run + SKIP [1] /tmp/doc-exec-172/conftest.py:9: need --runslow option to run =================== 1 passed, 1 skipped in 0.01 seconds ==================== @@ -165,7 +167,8 @@ $ py.test --runslow =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 2 items test_module.py .. @@ -256,7 +259,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: project deps: mylib-1.1 collected 0 items @@ -279,7 +283,8 @@ $ py.test -v =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-172, inifile: info1: did you know that ... did you? collecting ... collected 0 items @@ -290,7 +295,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 0 items ============================= in 0.00 seconds ============================= @@ -322,7 +328,8 @@ $ py.test --durations=3 =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 3 items test_some_are_slow.py ... @@ -383,7 +390,8 @@ $ py.test -rx =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 4 items test_step.py .Fx. @@ -391,7 +399,7 @@ ================================= FAILURES ================================= ____________________ TestUserHandling.test_modification ____________________ - self = + self = def test_modification(self): > assert 0 @@ -453,7 +461,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 7 items test_step.py .Fx. @@ -463,17 +472,17 @@ ================================== ERRORS ================================== _______________________ ERROR at setup of test_root ________________________ - file /tmp/doc-exec-73/b/test_error.py, line 1 + file /tmp/doc-exec-172/b/test_error.py, line 1 def test_root(db): # no db here, will error out fixture 'db' not found - available fixtures: monkeypatch, pytestconfig, tmpdir, capfd, capsys, recwarn + available fixtures: pytestconfig, tmpdir, monkeypatch, capfd, recwarn, capsys use 'py.test --fixtures [testpath]' for help on them. - /tmp/doc-exec-73/b/test_error.py:1 + /tmp/doc-exec-172/b/test_error.py:1 ================================= FAILURES ================================= ____________________ TestUserHandling.test_modification ____________________ - self = + self = def test_modification(self): > assert 0 @@ -482,21 +491,21 @@ test_step.py:9: AssertionError _________________________________ test_a1 __________________________________ - db = + db = def test_a1(db): > assert 0, db # to show value - E AssertionError: + E AssertionError: E assert 0 a/test_db.py:2: AssertionError _________________________________ test_a2 __________________________________ - db = + db = def test_a2(db): > assert 0, db # to show value - E AssertionError: + E AssertionError: E assert 0 a/test_db2.py:2: AssertionError @@ -555,7 +564,8 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 2 items test_module.py FF @@ -563,7 +573,7 @@ ================================= FAILURES ================================= ________________________________ test_fail1 ________________________________ - tmpdir = local('/tmp/pytest-112/test_fail10') + tmpdir = local('/tmp/pytest-219/test_fail10') def test_fail1(tmpdir): > assert 0 @@ -577,12 +587,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-112/test_fail10) + test_module.py::test_fail1 (/tmp/pytest-219/test_fail10) test_module.py::test_fail2 Making test result information available in fixtures @@ -645,7 +655,8 @@ $ py.test -s test_module.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-172, inifile: collected 3 items test_module.py Esetting up a test failed! test_module.py::test_setup_fails diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/fixture.txt --- a/doc/en/fixture.txt +++ b/doc/en/fixture.txt @@ -75,24 +75,25 @@ $ py.test test_smtpsimple.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-109, inifile: collected 1 items - + test_smtpsimple.py F - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - - smtp = - + + smtp = + def test_ehlo(smtp): response, msg = smtp.ehlo() assert response == 250 - > assert "merlinux" in msg - E TypeError: Type str doesn't support the buffer API - - test_smtpsimple.py:11: TypeError - ========================= 1 failed in 0.28 seconds ========================= + > assert 0 # for demo purposes + E assert 0 + + test_smtpsimple.py:11: AssertionError + ========================= 1 failed in 0.17 seconds ========================= In the failure traceback we see that the test function was called with a ``smtp`` argument, the ``smtplib.SMTP()`` instance created by the fixture @@ -192,35 +193,36 @@ $ py.test test_module.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-109, inifile: collected 2 items - + test_module.py FF - + ================================= FAILURES ================================= ________________________________ test_ehlo _________________________________ - - smtp = - + + smtp = + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError ________________________________ test_noop _________________________________ - - smtp = - + + smtp = + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError - ========================= 2 failed in 0.28 seconds ========================= + ========================= 2 failed in 0.20 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 @@ -267,8 +269,8 @@ $ py.test -s -q --tb=no FFteardown smtp - - 2 failed in 0.21 seconds + + 2 failed in 0.25 seconds We see that the ``smtp`` instance is finalized after the two tests finished execution. Note that if we decorated our fixture @@ -309,7 +311,7 @@ $ py.test -s -q --tb=no FF - 2 failed in 0.19 seconds + 2 failed in 0.17 seconds Let's quickly create another test module that actually sets the server URL in its module namespace:: @@ -376,52 +378,52 @@ FFFF ================================= FAILURES ================================= __________________________ test_ehlo[merlinux.eu] __________________________ - - smtp = - + + smtp = + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError __________________________ test_noop[merlinux.eu] __________________________ - - smtp = - + + smtp = + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError ________________________ test_ehlo[mail.python.org] ________________________ - - smtp = - + + smtp = + def test_ehlo(smtp): response = smtp.ehlo() assert response[0] == 250 > assert "merlinux" in response[1] E TypeError: Type str doesn't support the buffer API - + test_module.py:5: TypeError -------------------------- Captured stdout setup --------------------------- - finalizing + finalizing ________________________ test_noop[mail.python.org] ________________________ - - smtp = - + + smtp = + def test_noop(smtp): response = smtp.noop() assert response[0] == 250 > assert 0 # for demo purposes E assert 0 - + test_module.py:11: AssertionError - 4 failed in 7.02 seconds + 4 failed in 6.70 seconds We see that our two test functions each ran twice, against the different ``smtp`` instances. Note also, that with the ``mail.python.org`` @@ -471,18 +473,20 @@ Running the above tests results in the following test IDs being used:: $ py.test --collect-only - ========================== test session starts ========================== - platform linux2 -- Python 2.7.6 -- py-1.4.25.dev2 -- pytest-2.6.0.dev1 - plugins: xdist - collected 4 items - - - - - - - =========================== in 0.05 seconds ============================ - + =========================== test session starts ============================ + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-109, inifile: + collected 6 items + + + + + + + + + + ============================= in 0.01 seconds ============================= .. _`interdependent fixtures`: @@ -516,13 +520,14 @@ $ py.test -v test_appsetup.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-109, inifile: collecting ... collected 2 items - + test_appsetup.py::test_smtp_exists[merlinux.eu] PASSED test_appsetup.py::test_smtp_exists[mail.python.org] PASSED - - ========================= 2 passed in 6.63 seconds ========================= + + ========================= 2 passed in 6.53 seconds ========================= Due to the parametrization of ``smtp`` the test will run twice with two different ``App`` instances and respective smtp servers. There is no @@ -580,9 +585,10 @@ $ py.test -v -s test_module.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 -- /home/hpk/p/pytest/.tox/regen/bin/python3.4 + rootdir: /tmp/doc-exec-109, inifile: collecting ... collected 8 items - + test_module.py::test_0[1] test0 1 PASSED test_module.py::test_0[2] test0 2 @@ -601,7 +607,7 @@ PASSED test_module.py::test_2[2-mod2] test2 2 mod2 PASSED - + ========================= 8 passed in 0.01 seconds ========================= You can see that the parametrized module-scoped ``modarg`` resource caused diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 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.6-3.4, Jython, PyPy-2.3 +**Pythons**: Python 2.6,2.7,3.3,3.4, Jython, PyPy-2.3 **Platforms**: Unix/Posix and Windows @@ -27,7 +27,7 @@ To check your installation has installed the correct version:: $ py.test --version - This is pytest version 2.6.4, imported from /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/pytest.py + This is pytest version 2.7.0, imported from /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/pytest.py If you get an error checkout :ref:`installation issues`. @@ -49,7 +49,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-112, inifile: collected 1 items test_sample.py F @@ -127,7 +128,7 @@ ================================= FAILURES ================================= ____________________________ TestClass.test_two ____________________________ - self = + self = def test_two(self): x = "hello" @@ -163,7 +164,7 @@ ================================= FAILURES ================================= _____________________________ test_needsfiles ______________________________ - tmpdir = local('/tmp/pytest-108/test_needsfiles0') + tmpdir = local('/tmp/pytest-215/test_needsfiles0') def test_needsfiles(tmpdir): print (tmpdir) @@ -172,8 +173,8 @@ test_tmpdir.py:3: AssertionError --------------------------- Captured stdout call --------------------------- - /tmp/pytest-108/test_needsfiles0 - 1 failed in 0.02 seconds + /tmp/pytest-215/test_needsfiles0 + 1 failed in 0.01 seconds Before the test runs, a unique-per-test-invocation temporary directory was created. More info at :ref:`tmpdir handling`. diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/parametrize.txt --- a/doc/en/parametrize.txt +++ b/doc/en/parametrize.txt @@ -53,7 +53,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-120, inifile: collected 3 items test_expectation.py ..F @@ -100,7 +101,8 @@ $ py.test =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /tmp/doc-exec-120, inifile: collected 3 items test_expectation.py ..x @@ -170,8 +172,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,8 +187,8 @@ $ py.test -q -rs test_strings.py s ========================= short test summary info ========================== - SKIP [1] /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1139: got empty parameter set, function test_valid_string at /tmp/doc-exec-23/test_strings.py:1 - 1 skipped in 0.01 seconds + SKIP [1] /home/hpk/p/pytest/.tox/regen/lib/python3.4/site-packages/_pytest/python.py:1185: got empty parameter set, function test_valid_string at /tmp/doc-exec-120/test_strings.py:1 + 1 skipped in 0.00 seconds For further examples, you might want to look at :ref:`more parametrization examples `. diff -r f1e74746d5174edd4fcfcfca1aae1ca8aca78683 -r 7ed701fa2fb554bfc0618d447dfec700cc697407 doc/en/skipping.txt --- a/doc/en/skipping.txt +++ b/doc/en/skipping.txt @@ -164,7 +164,8 @@ example $ py.test -rx xfail_demo.py =========================== test session starts ============================ - platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.6.4 + platform linux -- Python 3.4.0 -- py-1.4.26 -- pytest-2.7.0 + rootdir: /home/hpk/p/pytest/doc/en, inifile: pytest.ini collected 7 items xfail_demo.py xxxxxxx @@ -182,7 +183,7 @@ reason: reason XFAIL xfail_demo.py::test_hello7 - ======================== 7 xfailed in 0.04 seconds ========================= + ======================== 7 xfailed in 0.05 seconds ========================= .. _`skip/xfail with parametrize`: This diff is so big that we needed to truncate the remainder. Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Thu Mar 26 09:45:27 2015 From: builds at drone.io (Drone.io Build) Date: Thu, 26 Mar 2015 08:45:27 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 45 Message-ID: <20150326084527.120062.79936@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/45 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 4082:7ed701fa2fb5 Author : holger krekel Branch : default Message: bump verrsion to python2.7, fix a too precise test for windows, regen docs -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits-noreply at bitbucket.org Thu Mar 26 13:47:22 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 26 Mar 2015 12:47:22 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: Added tag 2.7.0 for changeset 7ed701fa2fb5 Message-ID: <20150326124722.8084.37163@app02.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/99c565d5a578/ Changeset: 99c565d5a578 User: hpk42 Date: 2015-03-26 12:44:58+00:00 Summary: Added tag 2.7.0 for changeset 7ed701fa2fb5 Affected #: 1 file diff -r 7ed701fa2fb554bfc0618d447dfec700cc697407 -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 .hgtags --- a/.hgtags +++ b/.hgtags @@ -73,3 +73,4 @@ a4f25c5e649892b5cc746d21be971e4773478af9 2.6.2 2967aa416a4f3cdb65fc75073a2a148e1f372742 2.6.3 f03b6de8325f5b6c35cea7c3de092f134ea8ef07 2.6.4 +7ed701fa2fb554bfc0618d447dfec700cc697407 2.7.0 Repository URL: https://bitbucket.org/pytest-dev/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 Mar 26 13:49:07 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 26 Mar 2015 12:49:07 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: bump versions to dev, including changing the doc-install target to "dev" Message-ID: <20150326124907.400.39875@app09.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/0de3f5c1a683/ Changeset: 0de3f5c1a683 User: hpk42 Date: 2015-03-26 12:48:59+00:00 Summary: bump versions to dev, including changing the doc-install target to "dev" instead of "latest" Affected #: 5 files diff -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2.7.1.dev (compared to 2.7.0) +----------------------------- + + 2.7.0 (compared to 2.6.4) ----------------------------- diff -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 _pytest/__init__.py --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.7.0' +__version__ = '2.7.1.dev' diff -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 doc/en/Makefile --- a/doc/en/Makefile +++ b/doc/en/Makefile @@ -42,7 +42,7 @@ clean: -rm -rf $(BUILDDIR)/* -SITETARGET=latest +SITETARGET=dev install: html # for access talk to someone with login rights to diff -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 doc/en/conf.py --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -18,7 +18,7 @@ # The full version, including alpha/beta/rc tags. # The short X.Y version. version = "2.7" -release = "2.7.0" +release = "2.7.1.dev" import sys, os diff -r 99c565d5a578fb6030ceb225e8ded0e754fa7ac5 -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 setup.py --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ name='pytest', description='pytest: simple powerful testing with Python', long_description=long_description, - version='2.7.0', + version='2.7.1.dev', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], Repository URL: https://bitbucket.org/pytest-dev/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 Mar 26 14:04:59 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 26 Mar 2015 13:04:59 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: add a release checklist Message-ID: <20150326130459.30354.50863@app10.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/86f13ee883f5/ Changeset: 86f13ee883f5 Branch: release-checklist User: hpk42 Date: 2015-03-26 13:04:33+00:00 Summary: add a release checklist Affected #: 1 file diff -r 0de3f5c1a683a834d27b265d5e8781326d5dad04 -r 86f13ee883f5ff16f5cb30bb30d7086459673464 doc/en/release.txt --- /dev/null +++ b/doc/en/release.txt @@ -0,0 +1,34 @@ +pytest release checklist +------------------------- + +For doing a release of pytest (status March 2015) holger does: + +- change version numbers in ``setup.py``, ``_pytest/__init__.py`` + +- finalize changelog (especially the header) + +- ``devpi upload`` to an index, run ``devpi test`` from linux and + windows and make sure all relevant environments pass (some like py27-pexpect + on windows fail which is normal because pexpect does not work on windows + and tox can currently not have platform-conditional test envs) + If tests fail, fix and re-upload. + +- change "version" and "release" in doc/en/conf.py + +- regenerate doc examples with ``tox -e regen`` and check with ``hg diff`` + +- change SITETARGET in ``doc/en/makefile`` to "latest" && + ``cd doc/en && make install && make install-pdf`` + creating and installing the pdf requires various latex + packages to work. + +- once everything seems fine, do a commit and ``hg tag`` the correct + version and issue ``devpi push pytest==VERSION pypi:pypi`` to push + the tested package to pypi (in my ``.pypirc`` pypi.python.org is aliased + as ``pypi``) + +- **after the release** bump the version numbers in ``setup.py``, + ``_pytest/__init__.py``, ``doc/en/conf.py`` and set ``SITETARGET=dev`` + in ``doc/en/makefile``. commit. + +- congrats :) Repository URL: https://bitbucket.org/pytest-dev/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 Mar 27 03:41:05 2015 From: issues-reply at bitbucket.org (Daniel Hahler) Date: Fri, 27 Mar 2015 02:41:05 -0000 Subject: [Pytest-commit] Issue #704: Needs to handle VersionConflict in consider_setuptools_entrypoints (pytest-dev/pytest) Message-ID: <20150327024105.3627.58493@app09.ash-private.bitbucket.org> New issue 704: Needs to handle VersionConflict in consider_setuptools_entrypoints https://bitbucket.org/pytest-dev/pytest/issue/704/needs-to-handle-versionconflict-in Daniel Hahler: I was getting the following error, caused by the testmon plugin, which requires pytest<2.7: ?/pyenv/project2/lib/python2.7/site-packages/_pytest/config.py in _preparse(self, args, addopts) 711 self._checkversion() 712 self.pluginmanager.consider_preparse(args) --> 713 self.pluginmanager.consider_setuptools_entrypoints() 714 self.pluginmanager.consider_env() 715 self.known_args_namespace = ns = self._parser.parse_known_args(args) ?/pyenv/project2/lib/python2.7/site-packages/_pytest/core.py in consider_setuptools_entrypoints(self) 276 continue 277 try: --> 278 plugin = ep.load() 279 except DistributionNotFound: 280 continue ?/pyenv/project2/lib/python2.7/site-packages/pkg_resources/__init__.py in load(self, require, *args, **kwargs) 2318 ) 2319 if require: -> 2320 self.require(*args, **kwargs) 2321 return self.resolve() 2322 ?/pyenv/project2/lib/python2.7/site-packages/pkg_resources/__init__.py in require(self, env, installer) 2335 raise UnknownExtra("Can't require() without a distribution", self) 2336 reqs = self.dist.requires(self.extras) -> 2337 items = working_set.resolve(reqs, env, installer) 2338 list(map(working_set.add, items)) 2339 ?/pyenv/project2/lib/python2.7/site-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting) 812 dependent_req = required_by[req] 813 import ipdb; ipdb.set_trace() # noqa --> 814 raise VersionConflict(dist, req).with_context(dependent_req) 815 816 # push the new requirements onto the stack VersionConflict: (pytest 2.7.0 (?/pyenv/project2/lib/python2.7/site-packages), Requirement.parse('pytest<2.7')) ipdb> args self = requirements = [Requirement.parse('pathtools>=0.1.1'), Requirement.parse('argh>=0.24.1'), Requirement.parse('PyYAML>=3.10'), Requirement.parse('execnet>=1.1.dev1'), Requ irement.parse('pytest>=2.2')] env = None installer = None replace_conflicting = False `ep` is `EntryPoint.parse('testmon = testmon.plugin')`. It would be nice if there was a warning in such a case and the plugin was skipped. A warning might be useful with the current handling of `DistributionNotFound`, too. From issues-reply at bitbucket.org Fri Mar 27 05:16:21 2015 From: issues-reply at bitbucket.org (Daniel Hahler) Date: Fri, 27 Mar 2015 04:16:21 -0000 Subject: [Pytest-commit] Issue #705: Markers cannot be registered in setup.cfg (pytest-dev/pytest) Message-ID: <20150327041621.32253.80811@app08.ash-private.bitbucket.org> New issue 705: Markers cannot be registered in setup.cfg https://bitbucket.org/pytest-dev/pytest/issue/705/markers-cannot-be-registered-in-setupcfg Daniel Hahler: I've tried registering a mark in `setup.cfg`, but it appears to be ignored. Adding it to `pytest.ini` works, but I was under the impression, that `setup.cfg` should work in the same way - given a `[pytest]` section. The following comment from Holger mentions this: https://bitbucket.org/pytest-dev/pytest/issue/567/use-of-pytest-in-setupcfg-collides-with#comment-12111803 From issues-reply at bitbucket.org Fri Mar 27 08:39:01 2015 From: issues-reply at bitbucket.org (Marc Schlaich) Date: Fri, 27 Mar 2015 07:39:01 -0000 Subject: [Pytest-commit] Issue #706: 2.7.0 broke pytest_load_initial_conftests in pytest-cov (pytest-dev/pytest) Message-ID: <20150327073901.26441.90628@app07.ash-private.bitbucket.org> New issue 706: 2.7.0 broke pytest_load_initial_conftests in pytest-cov https://bitbucket.org/pytest-dev/pytest/issue/706/270-broke-pytest_load_initial_conftests-in Marc Schlaich: With 2.7.0 pytest_load_initial_conftests is not called in the pytest-cov plugin. This is the second test error in this Travis build: https://travis-ci.org/schlamar/pytest-cov/jobs/56056841 Here is the implementation in pytest-cov: https://github.com/schlamar/pytest-cov/blob/a123ac1/pytest-cov/pytest_cov.py#L46 From issues-reply at bitbucket.org Fri Mar 27 08:48:05 2015 From: issues-reply at bitbucket.org (Marc Schlaich) Date: Fri, 27 Mar 2015 07:48:05 -0000 Subject: [Pytest-commit] Issue #707: pytest-xdist regression since execnet 1.3.0 (pytest-dev/pytest) Message-ID: <20150327074805.16407.91968@app03.ash-private.bitbucket.org> New issue 707: pytest-xdist regression since execnet 1.3.0 https://bitbucket.org/pytest-dev/pytest/issue/707/pytest-xdist-regression-since-execnet-130 Marc Schlaich: With the latest execnet release 1.3.0 a pytest-xdist test in pytest-cov fails with `ImportError: no module named py`. This is the first error in this build: https://travis-ci.org/schlamar/pytest-cov/jobs/56056841 Pinning execnet to 1.2.0 solves this issue. From commits-noreply at bitbucket.org Fri Mar 27 09:27:41 2015 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Fri, 27 Mar 2015 08:27:41 -0000 Subject: [Pytest-commit] commit/pytest: hpk42: refine release process according to Bruno's feedback Message-ID: <20150327082741.11537.19517@app09.ash-private.bitbucket.org> 1 new commit in pytest: https://bitbucket.org/pytest-dev/pytest/commits/b527114b58a7/ Changeset: b527114b58a7 Branch: release-checklist User: hpk42 Date: 2015-03-27 08:27:31+00:00 Summary: refine release process according to Bruno's feedback Affected #: 3 files diff -r 86f13ee883f5ff16f5cb30bb30d7086459673464 -r b527114b58a754010d1a0fc7137d4a66787f1680 CONTRIBUTING.rst --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -147,7 +147,9 @@ $ hg clone ssh://hg at bitbucket.org/YOUR_BITBUCKET_USERNAME/pytest $ cd pytest - $ hg branch your-branch-name + $ hg up pytest-2.7 # if you want to fix a bug for the pytest-2.7 series + $ hg up default # if you want to add a feature bound for the next minor release + $ hg branch your-branch-name # your feature/bugfix branch If you need some help with Mercurial, follow this quick start guide: http://mercurial.selenic.com/wiki/QuickStart @@ -197,7 +199,9 @@ branch: your-branch-name target: pytest-dev/pytest - branch: default + branch: default # if it's a feature + branch: pytest-VERSION # if it's a bugfix + .. _contribution-using-git: diff -r 86f13ee883f5ff16f5cb30bb30d7086459673464 -r b527114b58a754010d1a0fc7137d4a66787f1680 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 @@ -12,7 +12,7 @@ {% set link_color = '#000' %} {% set link_hover_color = '#000' %} {% set base_font = 'sans-serif' %} -{% set header_font = 'sans-serif' %} +{% set header_font = 'serif' %} @import url("basic.css"); @@ -265,9 +265,10 @@ content: ":"; } -pre, tt { +pre, tt, code { font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.9em; + background: #eee; } img.screenshot { diff -r 86f13ee883f5ff16f5cb30bb30d7086459673464 -r b527114b58a754010d1a0fc7137d4a66787f1680 doc/en/release.txt --- a/doc/en/release.txt +++ b/doc/en/release.txt @@ -3,32 +3,53 @@ For doing a release of pytest (status March 2015) holger does: -- change version numbers in ``setup.py``, ``_pytest/__init__.py`` +1. change version numbers in ``setup.py``, ``_pytest/__init__.py`` + to a final release version. -- finalize changelog (especially the header) +2. finalize ``./CHANGELOG`` (don't forget the the header). -- ``devpi upload`` to an index, run ``devpi test`` from linux and - windows and make sure all relevant environments pass (some like py27-pexpect - on windows fail which is normal because pexpect does not work on windows - and tox can currently not have platform-conditional test envs) - If tests fail, fix and re-upload. +3. write ``doc/en/announce/release-VERSION.txt`` + (usually copying from an earlier release version). -- change "version" and "release" in doc/en/conf.py +4. change ``version`` and ``release`` in doc/en/conf.py, set ``SITETARGET=latest`` + in ``doc/en/Makefile``. -- regenerate doc examples with ``tox -e regen`` and check with ``hg diff`` +5. regenerate doc examples with ``tox -e regen`` and check with ``hg diff`` + if the differences show regressions. It's a bit of a manual process because + there a large part of the diff is about pytest headers or differences in + speed ("tests took X.Y seconds"). (XXX automate doc/example diffing to ignore + such changes and integrate it into "tox -e regen"). -- change SITETARGET in ``doc/en/makefile`` to "latest" && - ``cd doc/en && make install && make install-pdf`` - creating and installing the pdf requires various latex - packages to work. +6. ``devpi upload`` to `your developer devpi index `_. You can create your own user and index on https://devpi.net, + an inofficial service from the devpi authors. -- once everything seems fine, do a commit and ``hg tag`` the correct - version and issue ``devpi push pytest==VERSION pypi:pypi`` to push - the tested package to pypi (in my ``.pypirc`` pypi.python.org is aliased - as ``pypi``) +7. run ``devpi use INDEX`` and ``devpi test`` from linux and windows machines + and verify test results on the index. On linux typically all environments + pass (March 2015 there is a setup problem with a cx_freeze environment) + but on windows all involving ``pexpect`` fail because pexpect does not exist + on windows and tox does not allow to have platform-specific environments. + Also on windows ``py33-trial`` fails but should probably pass (March 2015). + In any case, py26,py27,py33,py34 are required to pass for all platforms. -- **after the release** bump the version numbers in ``setup.py``, - ``_pytest/__init__.py``, ``doc/en/conf.py`` and set ``SITETARGET=dev`` - in ``doc/en/makefile``. commit. +8. You can fix tests/code and repeat number 7. until everything passes. -- congrats :) +9. Once you have sufficiently passing tox tests you can do the actual release:: + + cd doc/en/ + make install + make install-pdf # a bit optional, if you have latex packages installed + + devpi push pytest-VERSION pypi:NAME + hg ci -m "... finalized pytest-VERSION" + hg tag VERSION + hg push + +10. send out release announcement to pytest-dev at python.org, + testing-in-python at lists.idyll.org and python-announce-list at python.org . + +11. **after the release** bump the version numbers in ``setup.py``, + ``_pytest/__init__.py``, ``doc/en/conf.py`` to the next Minor release + version (i.e. if you released ``pytest-2.8.0``, set it to ``pytest-2.9.0.dev1``) + and set ``SITETARGET=dev`` in ``doc/en/makefile``. Commit. + +12. already done :) Repository URL: https://bitbucket.org/pytest-dev/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 builds at drone.io Fri Mar 27 09:38:11 2015 From: builds at drone.io (Drone.io Build) Date: Fri, 27 Mar 2015 08:38:11 +0000 Subject: [Pytest-commit] [FAIL] pytest - # 49 Message-ID: <20150327083811.24248.45602@drone.io> Build Failed Build : https://drone.io/bitbucket.org/pytest-dev/pytest/49 Project : https://drone.io/bitbucket.org/pytest-dev/pytest Repository : https://bitbucket.org/pytest-dev/pytest Version : 3939:b527114b58a7 Author : holger krekel Branch : release-checklist Message: refine release process according to Bruno's feedback -------------- next part -------------- An HTML attachment was scrubbed... URL: From issues-reply at bitbucket.org Fri Mar 27 19:02:26 2015 From: issues-reply at bitbucket.org (Nick Evans) Date: Fri, 27 Mar 2015 18:02:26 -0000 Subject: [Pytest-commit] Issue #708: EEXIST -- tmpdir fails to make dir -- case-insensitive file system (pytest-dev/pytest) Message-ID: <20150327180226.12509.47205@app08.ash-private.bitbucket.org> New issue 708: EEXIST -- tmpdir fails to make dir -- case-insensitive file system https://bitbucket.org/pytest-dev/pytest/issue/708/eexist-tmpdir-fails-to-make-dir-case Nick Evans: This corner case occurs on Windows when tmpdir tries to make a new directory that only differs from a previous directory by case. tmpdir makes this dir for the first param (None): "C:\Users\Nick\AppData\Local\Temp\pytest-1198\test_xxxxxxxxxxxxxxxxxxxxxxx_N0" Then tmpdir tries to make this dir for the second param: "C:\Users\Nick\AppData\Local\Temp\pytest-1198\test_xxxxxxxxxxxxxxxxxxxxxxx_n0" NB: Version is 2.7.0 but that isn't an option in the menu. ``` #!python import pytest @pytest.fixture(params=[None, b"bytes"]) def nnn(request): return request.param def test_xxxxxxxxxxxxxxxxxxxxxxx(nnn, tmpdir): assert 1 ```