From 02dd6df6e6ba6bbb3bc03c9ec5a09eac33f91bdd Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 3 Jan 2016 23:09:24 -0200 Subject: [PATCH 1/3] Changelog now in rst format (2.9.0 and onward) and add rst-lint check Fix #1274 --- CHANGELOG => CHANGELOG.rst | 63 ++++++++++++++++++++------------------ doc/en/changelog.rst | 2 +- tox.ini | 2 ++ 3 files changed, 37 insertions(+), 30 deletions(-) rename CHANGELOG => CHANGELOG.rst (98%) diff --git a/CHANGELOG b/CHANGELOG.rst similarity index 98% rename from CHANGELOG rename to CHANGELOG.rst index 044753664..30909034f 100644 --- a/CHANGELOG +++ b/CHANGELOG.rst @@ -1,40 +1,49 @@ 2.9.0.dev ========= -New Features ------------- +**New Features** -* New `pytest.mark.skip` mark, which unconditional skips marked tests. - Thanks Michael Aquilina for the complete PR. +* New ``pytest.mark.skip`` mark, which unconditional skips marked tests. + Thanks `@MichaelAquilina`_ for the complete PR (`#1040`_). * ``--doctest-glob`` may now be passed multiple times in the command-line. - Thanks Joshua Bronson and Bruno Oliveira for the PR. + Thanks `@jab`_ and `@nicoddemus`_ for the PR. -* New `-rp` and `-rP` reporting options give the summary and full output - of passing tests, respectively. Thanks to David Vierra for the PR. +* New ``-rp`` and ``-rP`` reporting options give the summary and full output + of passing tests, respectively. Thanks to `@codewarrior0`_ for the PR. * New ``ALLOW_BYTES`` doctest option strips ``b`` prefixes from byte strings in doctest output (similar to ``ALLOW_UNICODE``). - Thanks Jason R. Coombs for the request and Bruno Oliveira for the PR (#1287). + Thanks `@jaraco`_ for the request and `@nicoddemus`_ for the PR (`#1287`_). -Changes -------- +**Changes** -* `pytest_enter_pdb` now optionally receives the pytest config object. - Thanks Bruno Oliveira for the PR. +* ``pytest_enter_pdb`` now optionally receives the pytest config object. + Thanks `@nicoddemus`_ for the PR. -* fix #1226: Removed code and documentation for Python 2.5 or lower versions, +* Removed code and documentation for Python 2.5 or lower versions, including removal of the obsolete ``_pytest.assertion.oldinterpret`` module. - Thanks Bruno Oliveira for the PR. + Thanks `@nicoddemus`_ for the PR (`#1226`_). -Bug Fixes ---------- +**Bug Fixes** -* fix issue #680: the -s and -c options should now work under xdist; - `Config.fromdictargs` now represents its input much more faithfully. - Thanks to Buck Evan for the complete PR. +* The ``-s`` and ``-c`` options should now work under ``xdist``; + ``Config.fromdictargs`` now represents its input much more faithfully. + Thanks to `@bukzor`_ for the complete PR (`#680`_). + + +.. _#1040: https://github.com/pytest-dev/pytest/pull/1040 +.. _#680: https://github.com/pytest-dev/pytest/issues/680 +.. _#1287: https://github.com/pytest-dev/pytest/pull/1287 +.. _#1226: https://github.com/pytest-dev/pytest/pull/1226 +.. _@MichaelAquilina: https://github.com/MichaelAquilina +.. _@bukzor: https://github.com/bukzor +.. _@nicoddemus: https://github.com/nicoddemus +.. _@jab: https://github.com/jab +.. _@codewarrior0: https://github.com/codewarrior0 +.. _@jaraco: https://github.com/jaraco 2.8.6.dev1 @@ -543,7 +552,7 @@ Bug Fixes 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. + for test discovery, as discussed in issue600. Thanks Ldiary Translations. - allow to override parametrized fixtures with non-parametrized ones and vice versa (bubenkoff). @@ -1757,8 +1766,7 @@ v1.3.3 v1.3.2 ============================================== -New features -++++++++++++++++++ +**New features** - fix issue103: introduce py.test.raises as context manager, examples:: @@ -1793,8 +1801,7 @@ New features - introduce '--junitprefix=STR' option to prepend a prefix to all reports in the junitxml file. -Bug fixes / Maintenance -++++++++++++++++++++++++++ +**Bug fixes** - make tests and the ``pytest_recwarn`` plugin in particular fully compatible to Python2.7 (if you use the ``recwarn`` funcarg warnings will be enabled so that @@ -1832,8 +1839,7 @@ Bug fixes / Maintenance v1.3.1 ============================================= -New features -++++++++++++++++++ +**New features** - issue91: introduce new py.test.xfail(reason) helper to imperatively mark a test as expected to fail. Can @@ -1871,8 +1877,7 @@ New features course requires that your application and tests are properly teared down and don't have global state. -Fixes / Maintenance -++++++++++++++++++++++ +**Bug Fixes** - improved traceback presentation: - improved and unified reporting for "--tb=short" option @@ -2108,7 +2113,7 @@ v1.1.0 - try harder to have deprecation warnings for py.compat.* accesses report a correct location -v1.0.2 +v1.0.3 ============================================= * adjust and improve docs diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 2aba6328a..a59b3c7e2 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -4,4 +4,4 @@ Changelog history ================================= -.. include:: ../../CHANGELOG +.. include:: ../../CHANGELOG.rst diff --git a/tox.ini b/tox.ini index 32336f20e..97b615833 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,9 @@ commands= py.test --genscript=pytest1 [testenv:flakes] basepython = python2.7 deps = flake8 + restructuredtext_lint commands = flake8 pytest.py _pytest testing + rst-lint CHANGELOG.rst [testenv:py27-xdist] deps=pytest-xdist>=1.13 From 3e34db50fba8b036db1508d5c7fa487be7eb2155 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 5 Jan 2016 18:14:57 -0200 Subject: [PATCH 2/3] Rename "flakes" testenv to "linting" as requested in review --- .travis.yml | 2 +- CONTRIBUTING.rst | 4 ++-- appveyor.yml | 2 +- tox.ini | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3e301ca5..0fd2676ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ env: matrix: - TESTENV=coveralls - TESTENV=doctesting - - TESTENV=flakes + - TESTENV=linting - TESTENV=py26 - TESTENV=py27 - TESTENV=py27-cxfreeze diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4f5007a0a..2bee8b17e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -179,10 +179,10 @@ but here is a simple overview: You need to have Python 2.7 and 3.5 available in your system. Now running tests is as simple as issuing this command:: - $ python runtox.py -e py27,py35,flakes + $ python runtox.py -e linting,py27,py35 This command will run tests via the "tox" tool against Python 2.7 and 3.5 - and also perform "flakes" coding-style checks. ``runtox.py`` is + and also perform "lint" 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. diff --git a/appveyor.yml b/appveyor.yml index 73948b5b6..61bd389b0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ build: false # Not a C# project, build stuff at the test step instead. test_script: - 'set TESTENVS= - flakes, + linting, py26, py27, py33, diff --git a/tox.ini b/tox.ini index 97b615833..747682905 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ minversion=2.0 distshare={homedir}/.tox/distshare envlist= - flakes,py26,py27,py33,py34,py35,pypy, + linting,py26,py27,py33,py34,py35,pypy, {py27,py35}-{pexpect,xdist,trial}, py27-nobyte,doctesting,py27-cxfreeze @@ -31,7 +31,7 @@ commands= [testenv:genscript] commands= py.test --genscript=pytest1 -[testenv:flakes] +[testenv:linting] basepython = python2.7 deps = flake8 restructuredtext_lint From 3daa0756ebcfd2a7b9475bf108bb243dde3226b6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 5 Jan 2016 20:01:41 -0200 Subject: [PATCH 3/3] Add CHANGELOG.rst to MANIFEST and small format fix --- MANIFEST.in | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 9fc16c553..266a9184d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include CHANGELOG +include CHANGELOG.rst include LICENSE include AUTHORS diff --git a/tox.ini b/tox.ini index 747682905..d8472bc21 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ commands= py.test --genscript=pytest1 [testenv:linting] basepython = python2.7 deps = flake8 - restructuredtext_lint + restructuredtext_lint commands = flake8 pytest.py _pytest testing rst-lint CHANGELOG.rst