From 6359e75ff8917c2335cd108d7eae988a1e8ad981 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 22 Jun 2016 20:18:00 +0200 Subject: [PATCH 01/20] Trivial spelling fix in runtest_setup.py --- testing/cx_freeze/runtests_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/cx_freeze/runtests_setup.py b/testing/cx_freeze/runtests_setup.py index a2874a655eb..01e8a8a8929 100644 --- a/testing/cx_freeze/runtests_setup.py +++ b/testing/cx_freeze/runtests_setup.py @@ -8,7 +8,7 @@ setup( name="runtests", version="0.1", - description="exemple of how embedding py.test into an executable using cx_freeze", + description="example of how embedding py.test into an executable using cx_freeze", executables=[Executable("runtests_script.py")], options={"build_exe": {'includes': pytest.freeze_includes()}}, ) From df9918eda3aa72bc65873240790e0aa0aad777d2 Mon Sep 17 00:00:00 2001 From: Tom Viner Date: Tue, 21 Jun 2016 12:09:55 +0200 Subject: [PATCH 02/20] issue1625, name getfuncargvalue to getfixturevalue --- CHANGELOG.rst | 5 ++++ _pytest/doctest.py | 2 +- _pytest/python.py | 27 +++++++++++++-------- doc/en/genapi.py | 2 +- testing/code/test_excinfo.py | 2 +- testing/python/fixture.py | 46 +++++++++++++++++++++--------------- testing/python/metafunc.py | 4 ++-- testing/test_genscript.py | 2 +- testing/test_pdb.py | 2 +- 9 files changed, 56 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0ec3200eb6f..3c3ee5fa45f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -27,6 +27,10 @@ Thanks `@Vogtinator`_ for reporting. Thanks to `@RedBeardCode`_ and `@tomviner`_ for PR. +* Rename ``getfuncargvalue`` to ``getfixturevalue``. ``getfuncargvalue`` is + deprecated but still present. Thanks to `@RedBeardCode`_ and `@tomviner`_ + for PR (`#1626`_). + * .. _#1580: https://github.com/pytest-dev/pytest/pull/1580 @@ -34,6 +38,7 @@ .. _#1597: https://github.com/pytest-dev/pytest/pull/1597 .. _#460: https://github.com/pytest-dev/pytest/pull/460 .. _#1553: https://github.com/pytest-dev/pytest/issues/1553 +.. _#1626: https://github.com/pytest-dev/pytest/pull/1626 .. _@graingert: https://github.com/graingert .. _@taschini: https://github.com/taschini diff --git a/_pytest/doctest.py b/_pytest/doctest.py index 72b94f488c6..1fd8b419be9 100644 --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -70,7 +70,7 @@ def __init__(self, name, parent, runner=None, dtest=None): def setup(self): if self.dtest is not None: self.fixture_request = _setup_fixtures(self) - globs = dict(getfixture=self.fixture_request.getfuncargvalue) + globs = dict(getfixture=self.fixture_request.getfixturevalue) self.dtest.globs.update(globs) def runtest(self): diff --git a/_pytest/python.py b/_pytest/python.py index 92fc8aa1fc3..502fdc7ef7b 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -5,6 +5,7 @@ import re import types import sys +import warnings import py import pytest @@ -1469,7 +1470,7 @@ def _getnextfixturedef(self, argname): fixturedefs = self._arg2fixturedefs.get(argname, None) if fixturedefs is None: # we arrive here because of a a dynamic call to - # getfuncargvalue(argname) usage which was naturally + # getfixturevalue(argname) usage which was naturally # not known at parsing/collection time fixturedefs = self._fixturemanager.getfixturedefs( argname, self._pyfuncitem.parent.nodeid) @@ -1564,7 +1565,7 @@ def _fillfixtures(self): fixturenames = getattr(item, "fixturenames", self.fixturenames) for argname in fixturenames: if argname not in item.funcargs: - item.funcargs[argname] = self.getfuncargvalue(argname) + item.funcargs[argname] = self.getfixturevalue(argname) def cached_setup(self, setup, teardown=None, scope="module", extrakey=None): """ (deprecated) Return a testing resource managed by ``setup`` & @@ -1598,17 +1599,23 @@ def finalizer(): self._addfinalizer(finalizer, scope=scope) return val - def getfuncargvalue(self, argname): - """ Dynamically retrieve a named fixture function argument. + def getfixturevalue(self, argname): + """ Dynamically run a named fixture function. - As of pytest-2.3, it is easier and usually better to access other - fixture values by stating it as an input argument in the fixture - function. If you only can decide about using another fixture at test + Declaring fixtures via function argument is recommended where possible. + But if you can only decide whether to use another fixture at test setup time, you may use this function to retrieve it inside a fixture - function body. + or test function body. """ return self._get_active_fixturedef(argname).cached_result[0] + def getfuncargvalue(self, argname): + """ Deprecated, use getfixturevalue. """ + warnings.warn( + "use of getfuncargvalue is deprecated, use getfixturevalue", + DeprecationWarning) + return self.getfixturevalue(argname) + def _get_active_fixturedef(self, argname): try: return self._fixturedefs[argname] @@ -1624,7 +1631,7 @@ class PseudoFixtureDef: raise # remove indent to prevent the python3 exception # from leaking into the call - result = self._getfuncargvalue(fixturedef) + result = self._getfixturevalue(fixturedef) self._funcargs[argname] = result self._fixturedefs[argname] = fixturedef return fixturedef @@ -1640,7 +1647,7 @@ def _get_fixturestack(self): l.append(fixturedef) current = current._parent_request - def _getfuncargvalue(self, fixturedef): + def _getfixturevalue(self, fixturedef): # prepare a subrequest object before calling fixture function # (latter managed by fixturedef) argname = fixturedef.argname diff --git a/doc/en/genapi.py b/doc/en/genapi.py index f8cdda6cfbf..89ddc873169 100644 --- a/doc/en/genapi.py +++ b/doc/en/genapi.py @@ -32,7 +32,7 @@ def docmethod(self, method): def pytest_funcarg__a(request): with Writer("request") as writer: - writer.docmethod(request.getfuncargvalue) + writer.docmethod(request.getfixturevalue) writer.docmethod(request.cached_setup) writer.docmethod(request.addfinalizer) writer.docmethod(request.applymarker) diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index ba047f2a9f8..46d83363eda 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -327,7 +327,7 @@ class TestFormattedExcinfo: def pytest_funcarg__importasmod(self, request): def importasmod(source): source = _pytest._code.Source(source) - tmpdir = request.getfuncargvalue("tmpdir") + tmpdir = request.getfixturevalue("tmpdir") modpath = tmpdir.join("mod.py") tmpdir.ensure("__init__.py") modpath.write(source) diff --git a/testing/python/fixture.py b/testing/python/fixture.py index 85de0c3189a..435f7947cd7 100644 --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -93,12 +93,12 @@ def test_conftest_funcargs_only_available_in_subdir(self, testdir): sub1.join("conftest.py").write(_pytest._code.Source(""" import pytest def pytest_funcarg__arg1(request): - pytest.raises(Exception, "request.getfuncargvalue('arg2')") + pytest.raises(Exception, "request.getfixturevalue('arg2')") """)) sub2.join("conftest.py").write(_pytest._code.Source(""" import pytest def pytest_funcarg__arg2(request): - pytest.raises(Exception, "request.getfuncargvalue('arg1')") + pytest.raises(Exception, "request.getfixturevalue('arg1')") """)) sub1.join("test_in_sub1.py").write("def test_1(arg1): pass") @@ -435,21 +435,23 @@ def test_method(self, something): assert len(arg2fixturedefs) == 1 assert arg2fixturedefs[0].__name__ == "pytest_funcarg__something" - def test_getfuncargvalue_recursive(self, testdir): + def test_getfixturevalue_recursive(self, testdir): testdir.makeconftest(""" def pytest_funcarg__something(request): return 1 """) testdir.makepyfile(""" def pytest_funcarg__something(request): - return request.getfuncargvalue("something") + 1 + return request.getfixturevalue("something") + 1 def test_func(something): assert something == 2 """) reprec = testdir.inline_run() reprec.assertoutcome(passed=1) - def test_getfuncargvalue(self, testdir): + @pytest.mark.parametrize( + 'getfixmethod', ('getfixturevalue', 'getfuncargvalue')) + def test_getfixturevalue(self, testdir, getfixmethod): item = testdir.getitem(""" l = [2] def pytest_funcarg__something(request): return 1 @@ -458,14 +460,15 @@ def pytest_funcarg__other(request): def test_func(something): pass """) req = item._request - pytest.raises(FixtureLookupError, req.getfuncargvalue, "notexists") - val = req.getfuncargvalue("something") + fixture_fetcher = getattr(req, getfixmethod) + pytest.raises(FixtureLookupError, fixture_fetcher, "notexists") + val = fixture_fetcher("something") assert val == 1 - val = req.getfuncargvalue("something") + val = fixture_fetcher("something") assert val == 1 - val2 = req.getfuncargvalue("other") + val2 = fixture_fetcher("other") assert val2 == 2 - val2 = req.getfuncargvalue("other") # see about caching + val2 = fixture_fetcher("other") # see about caching assert val2 == 2 pytest._fillfuncargs(item) assert item.funcargs["something"] == 1 @@ -812,10 +815,10 @@ def test_two_different_setups(arg1, arg2): "*1 passed*" ]) - def test_request_cached_setup_getfuncargvalue(self, testdir): + def test_request_cached_setup_getfixturevalue(self, testdir): testdir.makepyfile(""" def pytest_funcarg__arg1(request): - arg1 = request.getfuncargvalue("arg2") + arg1 = request.getfixturevalue("arg2") return request.cached_setup(lambda: arg1 + 1) def pytest_funcarg__arg2(request): return request.cached_setup(lambda: 10) @@ -1118,7 +1121,7 @@ def test_2(arg2): class TestFixtureManagerParseFactories: def pytest_funcarg__testdir(self, request): - testdir = request.getfuncargvalue("testdir") + testdir = request.getfixturevalue("testdir") testdir.makeconftest(""" def pytest_funcarg__hello(request): return "conftest" @@ -1804,9 +1807,9 @@ def test_4(arg, created, finalized): reprec.assertoutcome(passed=4) @pytest.mark.parametrize("method", [ - 'request.getfuncargvalue("arg")', + 'request.getfixturevalue("arg")', 'request.cached_setup(lambda: None, scope="function")', - ], ids=["getfuncargvalue", "cached_setup"]) + ], ids=["getfixturevalue", "cached_setup"]) def test_scope_mismatch_various(self, testdir, method): testdir.makeconftest(""" import pytest @@ -2737,6 +2740,7 @@ def test_1(arg1): *def arg1* """) + class TestParameterizedSubRequest: def test_call_from_fixture(self, testdir): testfile = testdir.makepyfile(""" @@ -2748,7 +2752,7 @@ def fix_with_param(request): @pytest.fixture def get_named_fixture(request): - return request.getfuncargvalue('fix_with_param') + return request.getfixturevalue('fix_with_param') def test_foo(request, get_named_fixture): pass @@ -2773,7 +2777,7 @@ def fix_with_param(request): return request.param def test_foo(request): - request.getfuncargvalue('fix_with_param') + request.getfixturevalue('fix_with_param') """) result = testdir.runpytest() result.stdout.fnmatch_lines(""" @@ -2797,7 +2801,7 @@ def fix_with_param(request): testfile = testdir.makepyfile(""" def test_foo(request): - request.getfuncargvalue('fix_with_param') + request.getfixturevalue('fix_with_param') """) result = testdir.runpytest() result.stdout.fnmatch_lines(""" @@ -2827,7 +2831,7 @@ def fix_with_param(request): from fix import fix_with_param def test_foo(request): - request.getfuncargvalue('fix_with_param') + request.getfixturevalue('fix_with_param') """)) tests_dir.chdir() @@ -2842,3 +2846,7 @@ def test_foo(request): E*{1}:5 *1 failed* """.format(fixfile.strpath, testfile.basename)) + + +def test_getfuncargvalue_is_deprecated(request): + pytest.deprecated_call(request.getfuncargvalue, 'tmpdir') diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index 91a157673b7..13c70957943 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -720,14 +720,14 @@ def test_hello(arg1, arg2): "*4 failed*", ]) - def test_parametrize_and_inner_getfuncargvalue(self, testdir): + def test_parametrize_and_inner_getfixturevalue(self, testdir): p = testdir.makepyfile(""" def pytest_generate_tests(metafunc): metafunc.parametrize("arg1", [1], indirect=True) metafunc.parametrize("arg2", [10], indirect=True) def pytest_funcarg__arg1(request): - x = request.getfuncargvalue("arg2") + x = request.getfixturevalue("arg2") return x + request.param def pytest_funcarg__arg2(request): diff --git a/testing/test_genscript.py b/testing/test_genscript.py index 1260a5a6b26..1d51c6e8d78 100644 --- a/testing/test_genscript.py +++ b/testing/test_genscript.py @@ -8,7 +8,7 @@ def standalone(request): class Standalone: def __init__(self, request): - self.testdir = request.getfuncargvalue("testdir") + self.testdir = request.getfixturevalue("testdir") script = "mypytest" result = self.testdir.runpytest("--genscript=%s" % script) assert result.ret == 0 diff --git a/testing/test_pdb.py b/testing/test_pdb.py index eeddcf0ae80..6b5d5d5b748 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -13,7 +13,7 @@ def runpdb_and_get_report(testdir, source): class TestPDB: def pytest_funcarg__pdblist(self, request): - monkeypatch = request.getfuncargvalue("monkeypatch") + monkeypatch = request.getfixturevalue("monkeypatch") pdblist = [] def mypdb(*args): pdblist.append(args) From 77689eb486d60fa8d8b39c5cf4dc480d27e96f40 Mon Sep 17 00:00:00 2001 From: Tom Viner Date: Fri, 24 Jun 2016 12:44:06 +0200 Subject: [PATCH 03/20] Fixes #1503 no longer collapse false explanations --- CHANGELOG.rst | 10 ++++++++++ _pytest/assertion/util.py | 33 --------------------------------- testing/test_assertrewrite.py | 34 ++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3c3ee5fa45f..427be0910dc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -31,6 +31,13 @@ deprecated but still present. Thanks to `@RedBeardCode`_ and `@tomviner`_ for PR (`#1626`_). +* Always include full assertion explanation. The previous behaviour was hiding + sub-expressions that happened to be False, assuming this was redundant information. + Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and + `@tomviner`_ for PR. + +* + * .. _#1580: https://github.com/pytest-dev/pytest/pull/1580 @@ -39,12 +46,15 @@ .. _#460: https://github.com/pytest-dev/pytest/pull/460 .. _#1553: https://github.com/pytest-dev/pytest/issues/1553 .. _#1626: https://github.com/pytest-dev/pytest/pull/1626 +.. _#1503: https://github.com/pytest-dev/pytest/issues/1503 .. _@graingert: https://github.com/graingert .. _@taschini: https://github.com/taschini .. _@nikratio: https://github.com/nikratio .. _@RedBeardCode: https://github.com/RedBeardCode .. _@Vogtinator: https://github.com/Vogtinator +.. _@bagerard: https://github.com/bagerard +.. _@davehunt: https://github.com/davehunt 2.9.2 diff --git a/_pytest/assertion/util.py b/_pytest/assertion/util.py index 8bf425caf48..2481cf34ccd 100644 --- a/_pytest/assertion/util.py +++ b/_pytest/assertion/util.py @@ -38,44 +38,11 @@ def format_explanation(explanation): displaying diffs. """ explanation = ecu(explanation) - explanation = _collapse_false(explanation) lines = _split_explanation(explanation) result = _format_lines(lines) return u('\n').join(result) -def _collapse_false(explanation): - """Collapse expansions of False - - So this strips out any "assert False\n{where False = ...\n}" - blocks. - """ - where = 0 - while True: - start = where = explanation.find("False\n{False = ", where) - if where == -1: - break - level = 0 - prev_c = explanation[start] - for i, c in enumerate(explanation[start:]): - if prev_c + c == "\n{": - level += 1 - elif prev_c + c == "\n}": - level -= 1 - if not level: - break - prev_c = c - else: - raise AssertionError("unbalanced braces: %r" % (explanation,)) - end = start + i - where = end - if explanation[end - 1] == '\n': - explanation = (explanation[:start] + explanation[start+15:end-1] + - explanation[end+1:]) - where -= 17 - return explanation - - def _split_explanation(explanation): """Return a list of individual lines in the explanation diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index f43c424ca94..a47d8a75f96 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -213,10 +213,12 @@ def x(): return False def f(): assert x() and x() - assert getmsg(f, {"x" : x}) == "assert (x())" + assert getmsg(f, {"x" : x}) == """assert (False) + + where False = x()""" def f(): assert False or x() - assert getmsg(f, {"x" : x}) == "assert (False or x())" + assert getmsg(f, {"x" : x}) == """assert (False or False) + + where False = x()""" def f(): assert 1 in {} and 2 in {} assert getmsg(f) == "assert (1 in {})" @@ -299,27 +301,34 @@ def g(a=42, *args, **kwargs): ns = {"g" : g} def f(): assert g() - assert getmsg(f, ns) == """assert g()""" + assert getmsg(f, ns) == """assert False + + where False = g()""" def f(): assert g(1) - assert getmsg(f, ns) == """assert g(1)""" + assert getmsg(f, ns) == """assert False + + where False = g(1)""" def f(): assert g(1, 2) - assert getmsg(f, ns) == """assert g(1, 2)""" + assert getmsg(f, ns) == """assert False + + where False = g(1, 2)""" def f(): assert g(1, g=42) - assert getmsg(f, ns) == """assert g(1, g=42)""" + assert getmsg(f, ns) == """assert False + + where False = g(1, g=42)""" def f(): assert g(1, 3, g=23) - assert getmsg(f, ns) == """assert g(1, 3, g=23)""" + assert getmsg(f, ns) == """assert False + + where False = g(1, 3, g=23)""" def f(): seq = [1, 2, 3] assert g(*seq) - assert getmsg(f, ns) == """assert g(*[1, 2, 3])""" + assert getmsg(f, ns) == """assert False + + where False = g(*[1, 2, 3])""" def f(): x = "a" assert g(**{x : 2}) - assert getmsg(f, ns) == """assert g(**{'a': 2})""" + assert getmsg(f, ns) == """assert False + + where False = g(**{'a': 2})""" def test_attribute(self): class X(object): @@ -332,7 +341,8 @@ def f(): def f(): x.a = False # noqa assert x.a # noqa - assert getmsg(f, ns) == """assert x.a""" + assert getmsg(f, ns) == """assert False + + where False = x.a""" def test_comparisons(self): def f(): @@ -710,7 +720,3 @@ def test_long_repr(): """) result = testdir.runpytest() assert 'unbalanced braces' not in result.stdout.str() - - -def test_collapse_false_unbalanced_braces(): - util._collapse_false('some text{ False\n{False = some more text\n}') From ea5bda089896d3757370ec5e311198e5845e0958 Mon Sep 17 00:00:00 2001 From: Brianna Laugher Date: Fri, 24 Jun 2016 17:11:29 +0200 Subject: [PATCH 04/20] remove links to funding campaign --- doc/en/_templates/links.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/en/_templates/links.html b/doc/en/_templates/links.html index 200258e165f..56486a750b8 100644 --- a/doc/en/_templates/links.html +++ b/doc/en/_templates/links.html @@ -1,10 +1,5 @@

Useful Links

    -
  • - - Sprint funding campaign - -
  • The pytest Website
  • Contribution Guide
  • pytest @ PyPI
  • From 62255d800019aaf3390afbe6bc0816a908225200 Mon Sep 17 00:00:00 2001 From: Brianna Laugher Date: Fri, 24 Jun 2016 17:12:41 +0200 Subject: [PATCH 05/20] rm global header --- doc/en/_templates/layout.html | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/doc/en/_templates/layout.html b/doc/en/_templates/layout.html index 0ce480be300..2fc8e2a7fb4 100644 --- a/doc/en/_templates/layout.html +++ b/doc/en/_templates/layout.html @@ -1,19 +1,5 @@ {% extends "!layout.html" %} {% block header %} -
    -

    - Want to help improve pytest? Please - - contribute to - - or - - join - - our upcoming sprint in June 2016! - -

    -
    {{super()}} {% endblock %} {% block footer %} From 7612b650a02f931e22cb33e04cd8e6954d382aed Mon Sep 17 00:00:00 2001 From: Brianna Laugher Date: Fri, 24 Jun 2016 17:24:06 +0200 Subject: [PATCH 06/20] update sprint page to be past tense --- doc/en/announce/sprint2016.rst | 75 ++++++++-------------------------- 1 file changed, 17 insertions(+), 58 deletions(-) diff --git a/doc/en/announce/sprint2016.rst b/doc/en/announce/sprint2016.rst index e59ccdda772..8e706589876 100644 --- a/doc/en/announce/sprint2016.rst +++ b/doc/en/announce/sprint2016.rst @@ -4,9 +4,9 @@ python testing sprint June 20th-26th 2016 .. image:: ../img/freiburg2.jpg :width: 400 -The pytest core group is heading towards the biggest sprint -in its history, to take place in the black forest town Freiburg -in Germany. As of February 2016 we have started a `funding +The pytest core group held the biggest sprint +in its history in June 2016, taking place in the black forest town Freiburg +in Germany. In February 2016 we started a `funding campaign on Indiegogo to cover expenses `_ The page also mentions some preliminary topics: @@ -35,71 +35,30 @@ some preliminary topics: Participants -------------- -Here are preliminary participants who said they are likely to come, -given some expenses funding:: - - Anatoly Bubenkoff, Netherlands - Andreas Pelme, Personalkollen, Sweden - Anthony Wang, Splunk, US - Brianna Laugher, Australia - Bruno Oliveira, Brazil - Danielle Jenkins, Splunk, US - Dave Hunt, UK - Florian Bruhin, Switzerland - Floris Bruynooghe, Cobe.io, UK - Holger Krekel, merlinux, Germany - Oliver Bestwalter, Avira, Germany - Omar Kohl, Germany - Raphael Pierzina, FanDuel, UK - Tom Viner, UK - - - -Other contributors and experienced newcomers are invited to join as well -but please send a mail to the pytest-dev mailing list if you intend to -do so somewhat soon, also how much funding you need if so. And if you -are working for a company and using pytest heavily you are welcome to -join and we encourage your company to provide some funding for the -sprint. They may see it, and rightfully so, as a very cheap and deep -training which brings you together with the experts in the field :) +Over 20 participants took part from 4 continents, including employees +from Splunk, Personalkollen, Cobe.io, FanDuel and Dolby. Some newcomers +mixed with developers who have worked on pytest since its beginning, and +of course everyone in between. Sprint organisation, schedule ------------------------------- -tentative schedule: +People arrived in Freiburg on the 19th, with sprint development taking +place on 20th, 21st, 22nd, 24th and 25th. On the 23rd we took a break +day for some hot hiking in the Black Forest. -- 19/20th arrival in Freiburg -- 20th social get together, initial hacking -- 21/22th full sprint days -- 23rd break day, hiking -- 24/25th full sprint days -- 26th departure +Sprint activity was organised heavily around pairing, with plenty of group +discusssions to take advantage of the high bandwidth, and lightning talks +as well. -We might adjust according to weather to make sure that if -we do some hiking or excursion we'll have good weather. -Freiburg is one of the sunniest places in Germany so -it shouldn't be too much of a constraint. - - -Accomodation ----------------- - -We'll see to arrange for renting a flat with multiple -beds/rooms. Hotels are usually below 100 per night. -The earlier we book the better. Money / funding --------------- -The Indiegogo campaign asks for 11000 USD which should cover -the costs for flights and accomodation, renting a sprint place -and maybe a bit of food as well. -If your organisation wants to support the sprint but prefers -to give money according to an invoice, get in contact with -holger at http://merlinux.eu who can invoice your organisation -properly. +The Indiegogo campaign aimed for 11000 USD and in the end raised over +12000, to reimburse travel costs, pay for a sprint venue and catering. -If we have excess money we'll use for further sprint/travel -funding for pytest/tox contributors. +Excess money is reserved for further sprint/travel funding for pytest/tox +contributors. From 939407ef6329808ee6f1a7ec1e4a9c5538bdabbd Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 22 Jun 2016 21:59:56 +0200 Subject: [PATCH 07/20] Simplify Argument.__repr__ I have came across this when noticing that universal-ctags fails to parse this correctly (https://github.com/universal-ctags/ctags/issues/997). --- _pytest/config.py | 17 +++++++---------- testing/test_parseopt.py | 3 +++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_pytest/config.py b/_pytest/config.py index 9a308df2bb9..2f57d91d42c 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -655,20 +655,17 @@ def _set_opt_strings(self, opts): self._long_opts.append(opt) def __repr__(self): - retval = 'Argument(' + args = [] if self._short_opts: - retval += '_short_opts: ' + repr(self._short_opts) + ', ' + args += ['_short_opts: ' + repr(self._short_opts)] if self._long_opts: - retval += '_long_opts: ' + repr(self._long_opts) + ', ' - retval += 'dest: ' + repr(self.dest) + ', ' + args += ['_long_opts: ' + repr(self._long_opts)] + args += ['dest: ' + repr(self.dest)] if hasattr(self, 'type'): - retval += 'type: ' + repr(self.type) + ', ' + args += ['type: ' + repr(self.type)] if hasattr(self, 'default'): - retval += 'default: ' + repr(self.default) + ', ' - if retval[-2:] == ', ': # always long enough to test ("Argument(" ) - retval = retval[:-2] - retval += ')' - return retval + args += ['default: ' + repr(self.default)] + return 'Argument({0})'.format(', '.join(args)) class OptionGroup: diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index e45ee285409..eea3569c101 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -29,6 +29,9 @@ def test_argument(self): assert argument.dest == 'test' argument = parseopt.Argument('-t', '--test', dest='abc') assert argument.dest == 'abc' + assert str(argument) == ( + "Argument(_short_opts: ['-t'], _long_opts: ['--test'], dest: 'abc')" + ) def test_argument_type(self): argument = parseopt.Argument('-t', dest='abc', type='int') From 757f37f445ac344ca8bc4571e099039ec72113f6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 23 May 2016 08:13:41 +0200 Subject: [PATCH 08/20] Don't ignore ImportError with setuptools plugins This was added in b2d66b9e7b25d3de5e3d5b19454817b68bcc427c but is a bad idea. When a plugin can't be imported, commandline options (optionally set in pytest.ini) could be undefined, which means pytest bails out much earlier before showing the warning, which is hard to debug. Fixes #1479, also see #1307 and #1497 --- _pytest/config.py | 5 +---- testing/test_config.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/_pytest/config.py b/_pytest/config.py index 9a308df2bb9..c08d6bc51ab 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -923,10 +923,7 @@ def _preparse(self, args, addopts=True): args[:] = self.getini("addopts") + args self._checkversion() self.pluginmanager.consider_preparse(args) - try: - self.pluginmanager.load_setuptools_entrypoints("pytest11") - except ImportError as e: - self.warn("I2", "could not load setuptools entry import: %s" % (e,)) + self.pluginmanager.load_setuptools_entrypoints("pytest11") self.pluginmanager.consider_env() self.known_args_namespace = ns = self._parser.parse_known_args(args, namespace=self.option.copy()) if self.known_args_namespace.confcutdir is None and self.inifile: diff --git a/testing/test_config.py b/testing/test_config.py index fe06540173e..47c4a2adc45 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -391,6 +391,23 @@ class PseudoPlugin: plugin = config.pluginmanager.getplugin("mytestplugin") assert plugin.x == 42 + +def test_setuptools_importerror_issue1479(testdir, monkeypatch): + pkg_resources = pytest.importorskip("pkg_resources") + def my_iter(name): + assert name == "pytest11" + class EntryPoint: + name = "mytestplugin" + dist = None + def load(self): + raise ImportError("Don't hide me!") + return iter([EntryPoint()]) + + monkeypatch.setattr(pkg_resources, 'iter_entry_points', my_iter) + with pytest.raises(ImportError): + testdir.parseconfig() + + def test_plugin_preparse_prevents_setuptools_loading(testdir, monkeypatch): pkg_resources = pytest.importorskip("pkg_resources") def my_iter(name): From 05b5554cac84504271f7a9d2361558c4c413bd12 Mon Sep 17 00:00:00 2001 From: aostr Date: Sat, 25 Jun 2016 12:09:05 +0200 Subject: [PATCH 09/20] Renamed pytest pdb to debugging which conflicts with python pdb. Combining multiple imports the "import pdb" imports the pytest module as opposed to the python debugger. --- _pytest/{pdb.py => debugging.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _pytest/{pdb.py => debugging.py} (100%) diff --git a/_pytest/pdb.py b/_pytest/debugging.py similarity index 100% rename from _pytest/pdb.py rename to _pytest/debugging.py From 9a5224e2f89922533107e1bdabfd64eac726697d Mon Sep 17 00:00:00 2001 From: aostr Date: Sat, 25 Jun 2016 12:37:31 +0200 Subject: [PATCH 10/20] Renamed the pdb module and changed unit tests accordingly --- CHANGELOG.rst | 2 ++ _pytest/config.py | 2 +- testing/test_pdb.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 427be0910dc..e7371a0217f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -36,6 +36,8 @@ Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and `@tomviner`_ for PR. +* Renamed the pytest ``pdb`` module (plugin) into ``debugging``. + * * diff --git a/_pytest/config.py b/_pytest/config.py index 9a308df2bb9..caadacd69c9 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -63,7 +63,7 @@ class UsageError(Exception): _preinit = [] default_plugins = ( - "mark main terminal runner python pdb unittest capture skipping " + "mark main terminal runner python debugging unittest capture skipping " "tmpdir monkeypatch recwarn pastebin helpconfig nose assertion genscript " "junitxml resultlog doctest cacheprovider").split() diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 6b5d5d5b748..44163a2040f 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -17,7 +17,7 @@ def pytest_funcarg__pdblist(self, request): pdblist = [] def mypdb(*args): pdblist.append(args) - plugin = request.config.pluginmanager.getplugin('pdb') + plugin = request.config.pluginmanager.getplugin('debugging') monkeypatch.setattr(plugin, 'post_mortem', mypdb) return pdblist From ce603dc0ea4783026d62d42fb2315f40d8781fe0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 25 Jun 2016 14:18:41 +0200 Subject: [PATCH 11/20] Add changelog entry for #1564 --- CHANGELOG.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 427be0910dc..662f0a50cef 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -38,7 +38,8 @@ * -* +* ImportErrors in plugins now are a fatal error instead of issuing a + pytest warning (`#1479`_). Thanks to `@The-Compiler`_ for the PR. .. _#1580: https://github.com/pytest-dev/pytest/pull/1580 .. _#1605: https://github.com/pytest-dev/pytest/issues/1605 @@ -47,6 +48,7 @@ .. _#1553: https://github.com/pytest-dev/pytest/issues/1553 .. _#1626: https://github.com/pytest-dev/pytest/pull/1626 .. _#1503: https://github.com/pytest-dev/pytest/issues/1503 +.. _#1479: https://github.com/pytest-dev/pytest/issues/1479 .. _@graingert: https://github.com/graingert .. _@taschini: https://github.com/taschini From e2f550156e84fcaef5f9611910aadcec549f5745 Mon Sep 17 00:00:00 2001 From: RedBeardCode Date: Sat, 25 Jun 2016 17:21:10 +0200 Subject: [PATCH 12/20] Improve of the test output for logical expression with brackets. Fixes #925 --- CHANGELOG.rst | 9 +++++++++ _pytest/assertion/rewrite.py | 7 +++++++ testing/test_assertrewrite.py | 27 +++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6f89fba9961..075df922fcc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -38,6 +38,10 @@ * Renamed the pytest ``pdb`` module (plugin) into ``debugging``. +* Improve of the test output for logical expression with brackets. + Fixes(`#925`_). Thanks `@DRMacIver`_ for reporting. Thanks to `@RedBeardCode`_ + for PR. + * * ImportErrors in plugins now are a fatal error instead of issuing a @@ -50,7 +54,11 @@ .. _#1553: https://github.com/pytest-dev/pytest/issues/1553 .. _#1626: https://github.com/pytest-dev/pytest/pull/1626 .. _#1503: https://github.com/pytest-dev/pytest/issues/1503 +<<<<<<< HEAD .. _#1479: https://github.com/pytest-dev/pytest/issues/1479 +======= +.. _#925: https://github.com/pytest-dev/pytest/issues/925 +>>>>>>> Improve of the test output for logical expression with brackets. .. _@graingert: https://github.com/graingert .. _@taschini: https://github.com/taschini @@ -59,6 +67,7 @@ .. _@Vogtinator: https://github.com/Vogtinator .. _@bagerard: https://github.com/bagerard .. _@davehunt: https://github.com/davehunt +.. _@DRMacIver: https://github.com/DRMacIver 2.9.2 diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index 14b8e49db2b..910e2293d70 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -1,6 +1,7 @@ """Rewrite assertion AST to produce nice error messages""" import ast +import _ast import errno import itertools import imp @@ -753,6 +754,8 @@ def visit_BoolOp(self, boolop): self.statements = save self.on_failure = fail_save expl_template = self.helper("format_boolop", expl_list, ast.Num(is_or)) + #if isinstance(boolop, (_ast.Compare, _ast.BoolOp)): + # expl_template = "({0})".format(expl_template) expl = self.pop_format_context(expl_template) return ast.Name(res_var, ast.Load()), self.explanation_param(expl) @@ -855,6 +858,8 @@ def visit_Attribute(self, attr): def visit_Compare(self, comp): self.push_format_context() left_res, left_expl = self.visit(comp.left) + if isinstance(comp.left, (_ast.Compare, _ast.BoolOp)): + left_expl = "({0})".format(left_expl) res_variables = [self.variable() for i in range(len(comp.ops))] load_names = [ast.Name(v, ast.Load()) for v in res_variables] store_names = [ast.Name(v, ast.Store()) for v in res_variables] @@ -864,6 +869,8 @@ def visit_Compare(self, comp): results = [left_res] for i, op, next_operand in it: next_res, next_expl = self.visit(next_operand) + if isinstance(next_operand, (_ast.Compare, _ast.BoolOp)): + next_expl = "({0})".format(next_expl) results.append(next_res) sym = binop_map[op.__class__] syms.append(ast.Str(sym)) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index a47d8a75f96..82dbe8dd9cc 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -720,3 +720,30 @@ def test_long_repr(): """) result = testdir.runpytest() assert 'unbalanced braces' not in result.stdout.str() + + +class TestIssue925(): + def test_simple_case(self, testdir): + testdir.makepyfile(""" + def test_ternary_display(): + assert (False == False) == False + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines('*E*assert (False == False) == False') + + def test_long_case(self, testdir): + testdir.makepyfile(""" + def test_ternary_display(): + assert False == (False == True) == True + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines('*E*assert (False == True) == True') + + def test_many_brackets(self, testdir): + testdir.makepyfile(""" + def test_ternary_display(): + assert True == ((False == True) == True) + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines('*E*assert True == ((False == True) == True)') + From 22c2d876330661707a45942551a70c1539944a82 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 26 Jun 2016 21:18:01 +0200 Subject: [PATCH 13/20] Fix bad merge in CHANGELOG --- CHANGELOG.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 075df922fcc..2a18d2b86bf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -54,11 +54,8 @@ .. _#1553: https://github.com/pytest-dev/pytest/issues/1553 .. _#1626: https://github.com/pytest-dev/pytest/pull/1626 .. _#1503: https://github.com/pytest-dev/pytest/issues/1503 -<<<<<<< HEAD .. _#1479: https://github.com/pytest-dev/pytest/issues/1479 -======= .. _#925: https://github.com/pytest-dev/pytest/issues/925 ->>>>>>> Improve of the test output for logical expression with brackets. .. _@graingert: https://github.com/graingert .. _@taschini: https://github.com/taschini From 58e558141d5e2218d0d1556bed7a4c8bb1a6e2ce Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 26 Jun 2016 21:19:07 +0200 Subject: [PATCH 14/20] Remove commented out code --- _pytest/assertion/rewrite.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/_pytest/assertion/rewrite.py b/_pytest/assertion/rewrite.py index 910e2293d70..d8272a0561b 100644 --- a/_pytest/assertion/rewrite.py +++ b/_pytest/assertion/rewrite.py @@ -754,8 +754,6 @@ def visit_BoolOp(self, boolop): self.statements = save self.on_failure = fail_save expl_template = self.helper("format_boolop", expl_list, ast.Num(is_or)) - #if isinstance(boolop, (_ast.Compare, _ast.BoolOp)): - # expl_template = "({0})".format(expl_template) expl = self.pop_format_context(expl_template) return ast.Name(res_var, ast.Load()), self.explanation_param(expl) From 21d27784ebbb9bab15f04f6c3cce8405c2410afe Mon Sep 17 00:00:00 2001 From: Eli Boyarski Date: Mon, 27 Jun 2016 15:41:40 +0300 Subject: [PATCH 15/20] catched -> caught Even though catch is a Python keyword, 'catched' just looks terrible in text. If the text was supposed to reference the keyword, then 'catched' should be changed to "'catch'ed". --- doc/en/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/usage.rst b/doc/en/usage.rst index fba69984918..0bc6028e484 100644 --- a/doc/en/usage.rst +++ b/doc/en/usage.rst @@ -79,7 +79,7 @@ than ``--tb=long``). It also ensures that a stack trace is printed on **KeyboardInterrrupt** (Ctrl+C). This is very useful if the tests are taking too long and you interrupt them with Ctrl+C to find out where the tests are *hanging*. By default no output -will be shown (because KeyboardInterrupt is catched by pytest). By using this +will be shown (because KeyboardInterrupt is caught by pytest). By using this option you make sure a trace is shown. Dropping to PDB_ (Python Debugger) on failures From 771c4539fa0f64398c0837a81a15ee10679b2768 Mon Sep 17 00:00:00 2001 From: Brandon W Maister Date: Wed, 29 Jun 2016 16:51:35 -0400 Subject: [PATCH 16/20] Document the interaction of autouse scopes I wouldn't have even attempted what I did to cause #1688 if this had been there. --- doc/en/fixture.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/en/fixture.rst b/doc/en/fixture.rst index 590649b560d..3c7033f83c0 100644 --- a/doc/en/fixture.rst +++ b/doc/en/fixture.rst @@ -798,6 +798,10 @@ If we run it, we get two passing tests:: Here is how autouse fixtures work in other scopes: +- autouse fixtures obey the ``scope=`` keyword-argument: if an autouse fixture + has ``scope='session'`` it will only be run once, no matter where it is + defined. ``scope='class'`` means it will be run once per class, etc. + - if an autouse fixture is defined in a test module, all its test functions automatically use it. From e3c43a14626b097fb114659e4720d94728573421 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 30 Jun 2016 22:25:09 +0200 Subject: [PATCH 17/20] Add changelog to requirements for pytest-dev plugins Closes #1691 --- CONTRIBUTING.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index bedc82c655b..947d4e655d2 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -120,6 +120,8 @@ the following: - an issue tracker for bug reports and enhancement requests. +- a `changelog `_ + If no contributor strongly objects and two agree, the repository can then be transferred to the ``pytest-dev`` organisation. From 8d39ce17da2bb297fa9cfb4330d9c2125d83fa72 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 4 Jul 2016 21:30:50 -0300 Subject: [PATCH 18/20] Fix links and removed 404 links from talks.rst Fix #1696 --- doc/en/talks.rst | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/doc/en/talks.rst b/doc/en/talks.rst index 7a5221845ce..1572832f0d7 100644 --- a/doc/en/talks.rst +++ b/doc/en/talks.rst @@ -11,9 +11,6 @@ Talks and Tutorials Talks and blog postings --------------------------------------------- -.. _`tutorial1 repository`: http://bitbucket.org/pytest-dev/pytest-tutorial1/ -.. _`pycon 2010 tutorial PDF`: http://bitbucket.org/pytest-dev/pytest-tutorial1/raw/tip/pytest-basic.pdf - - `pytest - Rapid Simple Testing, Florian Bruhin, Swiss Python Summit 2016 `_. @@ -52,12 +49,14 @@ Talks and blog postings - `pytest introduction from Brian Okken (January 2013) `_ -- `monkey patching done right`_ (blog post, consult `monkeypatch - plugin`_ for up-to-date API) +- pycon australia 2012 pytest talk from Brianna Laugher (`video `_, `slides `_, `code `_) +- `pycon 2012 US talk video from Holger Krekel `_ + +- `monkey patching done right`_ (blog post, consult `monkeypatch plugin`_ for up-to-date API) Test parametrization: -- `generating parametrized tests with funcargs`_ (uses deprecated ``addcall()`` API. +- `generating parametrized tests with fixtures`_. - `test generators and cached setup`_ - `parametrizing tests, generalized`_ (blog post) - `putting test-hooks into local or global plugins`_ (blog post) @@ -78,39 +77,17 @@ Plugin specific examples: - `many examples in the docs for plugins`_ .. _`skipping slow tests by default in pytest`: http://bruynooghe.blogspot.com/2009/12/skipping-slow-test-by-default-in-pytest.html -.. _`many examples in the docs for plugins`: plugin/index.html -.. _`monkeypatch plugin`: plugin/monkeypatch.html -.. _`application setup in test functions with funcargs`: funcargs.html#appsetup +.. _`many examples in the docs for plugins`: plugins.html +.. _`monkeypatch plugin`: monkeypatch.html +.. _`application setup in test functions with fixtures`: fixture.html#interdependent-fixtures .. _`simultaneously test your code on all platforms`: http://tetamap.wordpress.com/2009/03/23/new-simultanously-test-your-code-on-all-platforms/ .. _`monkey patching done right`: http://tetamap.wordpress.com/2009/03/03/monkeypatching-in-unit-tests-done-right/ .. _`putting test-hooks into local or global plugins`: http://tetamap.wordpress.com/2009/05/14/putting-test-hooks-into-local-and-global-plugins/ .. _`parametrizing tests, generalized`: http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/ -.. _`generating parametrized tests with funcargs`: funcargs.html#test-generators +.. _`generating parametrized tests with fixtures`: parametrize.html#test-generators .. _`test generators and cached setup`: http://bruynooghe.blogspot.com/2010/06/pytest-test-generators-and-cached-setup.html -Older conference talks and tutorials ----------------------------------------- - -- `pycon australia 2012 pytest talk from Brianna Laugher - `_ (`video `_, `slides `_, `code `_) -- `pycon 2012 US talk video from Holger Krekel `_ -- `pycon 2010 tutorial PDF`_ and `tutorial1 repository`_ - -- `ep2009-rapidtesting.pdf`_ tutorial slides (July 2009): - - - testing terminology - - basic pytest usage, file system layout - - test function arguments (funcargs_) and test fixtures - - existing plugins - - distributed testing -- `ep2009-pytest.pdf`_ 60 minute pytest talk, highlighting unique features and a roadmap (July 2009) -- `pycon2009-pytest-introduction.zip`_ slides and files, extended version of pytest basic introduction, discusses more options, also introduces old-style xUnit setup, looponfailing and other features. -- `pycon2009-pytest-advanced.pdf`_ contain a slightly older version of funcargs and distributed testing, compared to the EuroPython 2009 slides. -.. _`ep2009-rapidtesting.pdf`: http://codespeak.net/download/py/ep2009-rapidtesting.pdf -.. _`ep2009-pytest.pdf`: http://codespeak.net/download/py/ep2009-pytest.pdf -.. _`pycon2009-pytest-introduction.zip`: http://codespeak.net/download/py/pycon2009-pytest-introduction.zip -.. _`pycon2009-pytest-advanced.pdf`: http://codespeak.net/download/py/pycon2009-pytest-advanced.pdf From 10c5e6fd9c83bbc0d251aed9f7dda7b7b2e7f0ba Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 4 Jul 2016 21:50:05 -0300 Subject: [PATCH 19/20] Split AppVeyor test runs in multiple jobs to avoid timeout issues Some of our builds have been timing out (over 1 hour), on AppVeyor --- appveyor.yml | 7 +++++++ tox.ini | 1 + 2 files changed, 8 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 4b73645f735..2bd72db451b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,13 @@ environment: # using pytestbot account as detailed here: # https://www.appveyor.com/docs/build-configuration#secure-variables + matrix: + # create multiple jobs to execute a set of tox runs on each; this is to workaround having + # builds timing out in AppVeyor + - TOXENV: "linting,py26,py27,py33,py34,py35,pypy" + - TOXENV: "py27-pexpect,py27-xdist,py27-trial,py35-pexpect,py35-xdist,py35-trial" + - TOXENV: "py27-nobyte,doctesting,py27-cxfreeze" + install: - echo Installed Pythons - dir c:\Python* diff --git a/tox.ini b/tox.ini index e3922959e3b..5fa9ef21e6e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] minversion=2.0 distshare={homedir}/.tox/distshare +# make sure to update enviroment list on appveyor.yml envlist= linting,py26,py27,py33,py34,py35,pypy, {py27,py35}-{pexpect,xdist,trial}, From dad6aa8a167702e8cf752e9c2d17622619fb625c Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 6 Jul 2016 13:51:13 +0200 Subject: [PATCH 20/20] fix duplicate target in changelog --- CHANGELOG.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2bcea39d83b..e9578896fc8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -181,7 +181,7 @@ Thanks `@bagerard`_ for reporting (`#1503`_). Thanks to `@davehunt`_ and `@tomviner`_ for PR. -* Renamed the pytest ``pdb`` module (plugin) into ``debugging``. +* Renamed the pytest ``pdb`` module (plugin) into ``debugging``. * Improve of the test output for logical expression with brackets. Fixes(`#925`_). Thanks `@DRMacIver`_ for reporting. Thanks to `@RedBeardCode`_ @@ -211,7 +211,6 @@ .. _@blueyed: https://github.com/blueyed .. _@fengxx: https://github.com/fengxx .. _@bagerard: https://github.com/bagerard -.. _@davehunt: https://github.com/davehunt .. _@DRMacIver: https://github.com/DRMacIver * Fix `#1421`_: Exit tests if a collection error occurs and add