./devel/py-test, Python testing tool

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 3.0.7, Package name: py27-test-3.0.7, Maintainer: pkgsrc-users

The ``py.test`` testing tool makes it easy to write small tests, yet
scales to support complex functional testing. It provides
- auto-discovery of test modules and functions,
- detailed info on failing `assert statements
(no need to remember ``self.assert*`` names)
- modular fixtures for managing small or parametrized long-lived
test resources.
- multi-paradigm support: you can use ``py.test`` to run test suites based
on unittest (or trial), nose
- single-source compatibility to Python2.4 all the way up to Python3.3,
PyPy-1.9 and Jython-2.5.1.


Required to run:
[textproc/py-expat] [devel/py-setuptools] [lang/python27] [devel/py-py]

Required to build:
[textproc/py-yaml] [pkgtools/cwrappers] [devel/py-hypothesis]

Master sites:

SHA1: 16bba5707c14d0ffffe92cba2380cf3bdc227068
RMD160: cae14d79ae284104a4df818645588347b99815cc
Filesize: 726.432 KB

Version history: (Expand)


CVS history: (Expand)


   2017-03-20 14:56:18 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.7.

3.0.7 (2017-03-14)
==================

* Fix issue in assertion rewriting breaking due to modules silently discarding
  other modules when importing fails
  Notably, importing the `anydbm` module is fixed. (`#2248`_).
  Thanks `@pfhayes`_ for the PR.

* junitxml: Fix problematic case where system-out tag occured twice per testcase
  element in the XML report. Thanks `@kkoukiou`_ for the PR.

* Fix regression, pytest now skips unittest correctly if run with ``--pdb``
  (`#2137`_). Thanks to `@gst`_ for the report and `@mbyt`_ for the PR.

* Ignore exceptions raised from descriptors (e.g. properties) during Python test \ 
collection (`#2234`_).
  Thanks to `@bluetech`_.

* ``--override-ini`` now correctly overrides some fundamental options like \ 
``python_files`` (`#2238`_).
  Thanks `@sirex`_ for the report and `@nicoddemus`_ for the PR.

* Replace ``raise StopIteration`` usages in the code by simple ``returns`` to \ 
finish generators, in accordance to `PEP-479`_ (`#2160`_).
  Thanks `@tgoodlet`_ for the report and `@nicoddemus`_ for the PR.

* Fix internal errors when an unprintable ``AssertionError`` is raised inside a test.
  Thanks `@omerhadari`_ for the PR.

* Skipping plugin now also works with test items generated by custom collectors \ 
(`#2231`_).
  Thanks to `@vidartf`_.

* Fix trailing whitespace in console output if no .ini file presented \ 
(`#2281`_). Thanks `@fbjorn`_ for the PR.

* Conditionless ``xfail`` markers no longer rely on the underlying test item
  being an instance of ``PyobjMixin``, and can therefore apply to tests not
  collected by the built-in python test collector. Thanks `@barneygale`_ for the
  PR.
   2017-02-05 20:10:30 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.6.

3.0.6 (2017-01-29)
=======================

* pytest no longer generates ``PendingDeprecationWarning`` from its own \ 
operations, which was introduced by mistake in version ``3.0.5`` (`#2118`_).
  Thanks to `@nicoddemus`_ for the report and `@RonnyPfannschmidt`_ for the PR.

* pytest no longer recognizes coroutine functions as yield tests (`#2129`_).
  Thanks to `@malinoff`_ for the PR.

* Plugins loaded by the ``PYTEST_PLUGINS`` environment variable are now automatically
  considered for assertion rewriting (`#2185`_).
  Thanks `@nicoddemus`_ for the PR.

* Improve error message when pytest.warns fails (`#2150`_). The type(s) of the
  expected warnings and the list of caught warnings is added to the
  error message. Thanks `@lesteve`_ for the PR.

* Fix ``pytester`` internal plugin to work correctly with latest versions of
  ``zope.interface`` (`#1989`_). Thanks `@nicoddemus`_ for the PR.

* Assert statements of the ``pytester`` plugin again benefit from assertion \ 
rewriting (`#1920`_).
  Thanks `@RonnyPfannschmidt`_ for the report and `@nicoddemus`_ for the PR.

* Specifying tests with colons like ``test_foo.py::test_bar`` for tests in
  subdirectories with ini configuration files now uses the correct ini file
  (`#2148`_).  Thanks `@pelme`_.

* Fail ``testdir.runpytest().assert_outcomes()`` explicitly if the pytest
  terminal output it relies on is missing. Thanks to `@eli-b`_ for the PR.
   2017-01-03 14:23:05 by Jonathan Perkin | Files touched by this commit (52)
Log message:
Use "${MV} || ${TRUE}" and "${RM} -f" consistently in \ 
post-install targets.
   2016-12-12 15:02:20 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.5.

3.0.5
=====

* Add warning when not passing ``option=value`` correctly to \ 
``-o/--override-ini`` (`#2105`_).
  Also improved the help documentation. Thanks to `@mbukatov`_ for the report and
  `@lwm`_ for the PR.

* Now ``--confcutdir`` and ``--junit-xml`` are properly validated if they are \ 
directories
  and filenames, respectively (`#2089`_ and `#2078`_). Thanks to `@lwm`_ for the PR.

* Add hint to error message hinting possible missing ``__init__.py`` (`#478`_). \ 
Thanks `@DuncanBetts`_.

* More accurately describe when fixture finalization occurs in documentation \ 
(`#687`_). Thanks `@DuncanBetts`_.

* Provide ``:ref:`` targets for ``recwarn.rst`` so we can use intersphinx \ 
referencing.
  Thanks to `@dupuy`_ for the report and `@lwm`_ for the PR.

* In Python 2, use a simple ``+-`` ASCII string in the string representation of \ 
``pytest.approx`` (for example ``"4 +- 4.0e-06"``)
  because it is brittle to handle that in different contexts and representations \ 
internally in pytest
  which can result in bugs such as `#2111`_. In Python 3, the representation \ 
still uses ``±`` (for example ``4 ± 4.0e-06``).
  Thanks `@kerrick-lyft`_ for the report and `@nicoddemus`_ for the PR.

* Using ``item.Function``, ``item.Module``, etc., is now issuing deprecation \ 
warnings, prefer
  ``pytest.Function``, ``pytest.Module``, etc., instead (`#2034`_).
  Thanks `@nmundar`_ for the PR.

* Fix error message using ``approx`` with complex numbers (`#2082`_).
  Thanks `@adler-j`_ for the report and `@nicoddemus`_ for the PR.

* Fixed false-positives warnings from assertion rewrite hook for modules \ 
imported more than
  once by the ``pytest_plugins`` mechanism.
  Thanks `@nicoddemus`_ for the PR.

* Remove an internal cache which could cause hooks from ``conftest.py`` files in
  sub-directories to be called in other directories incorrectly (`#2016`_).
  Thanks `@d-b-w`_ for the report and `@nicoddemus`_ for the PR.

* Remove internal code meant to support earlier Python 3 versions that produced \ 
the side effect
  of leaving ``None`` in ``sys.modules`` when expressions were evaluated by \ 
pytest (for example passing a condition
  as a string to ``pytest.mark.skipif``)(`#2103`_).
  Thanks `@jaraco`_ for the report and `@nicoddemus`_ for the PR.

* Cope gracefully with a .pyc file with no matching .py file (`#2038`_). Thanks
  `@nedbat`_.
   2016-11-14 15:18:55 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.4.

3.0.4
=====

* Import errors when collecting test modules now display the full traceback \ 
(`#1976`_).
  Thanks `@cwitty`_ for the report and `@nicoddemus`_ for the PR.

* Fix confusing command-line help message for custom options with two or more \ 
``metavar`` properties (`#2004`_).
  Thanks `@okulynyak`_ and `@davehunt`_ for the report and `@nicoddemus`_ for the PR.

* When loading plugins, import errors which contain non-ascii messages are now \ 
properly handled in Python 2 (`#1998`_).
  Thanks `@nicoddemus`_ for the PR.

* Fixed cyclic reference when ``pytest.raises`` is used in context-manager form \ 
(`#1965`_). Also as a
  result of this fix, ``sys.exc_info()`` is left empty in both context-manager \ 
and function call usages.
  Previously, ``sys.exc_info`` would contain the exception caught by the context \ 
manager,
  even when the expected exception occurred.
  Thanks `@MSeifert04`_ for the report and the PR.

* Fixed false-positives warnings from assertion rewrite hook for modules that \ 
were rewritten but
  were later marked explicitly by ``pytest.register_assert_rewrite``
  or implicitly as a plugin (`#2005`_).
  Thanks `@RonnyPfannschmidt`_ for the report and `@nicoddemus`_ for the PR.

* Report teardown output on test failure (`#442`_).
  Thanks `@matclab`_ or the PR.

* Fix teardown error message in generated xUnit XML.
  Thanks `@gdyuldin`_ or the PR.

* Properly handle exceptions in ``multiprocessing`` tasks (`#1984`_).
  Thanks `@adborden`_ for the report and `@nicoddemus`_ for the PR.

* Clean up unittest TestCase objects after tests are complete (`#1649`_).
  Thanks `@d_b_w`_ for the report and PR.
   2016-10-19 15:17:10 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.3.

3.0.3
=====

* The ``ids`` argument to ``parametrize`` again accepts ``unicode`` strings
  in Python 2 (`#1905`_).
  Thanks `@philpep`_ for the report and `@nicoddemus`_ for the PR.

* Assertions are now being rewritten for plugins in development mode
  (``pip install -e``) (`#1934`_).
  Thanks `@nicoddemus`_ for the PR.

* Fix pkg_resources import error in Jython projects (`#1853`).
  Thanks `@raquel-ucl`_ for the PR.

* Got rid of ``AttributeError: 'Module' object has no attribute '_obj'`` exception
  in Python 3 (`#1944`_).
  Thanks `@axil`_ for the PR.

* Explain a bad scope value passed to ``@fixture`` declarations or
  a ``MetaFunc.parametrize()`` call. Thanks `@tgoodlet`_ for the PR.

* This version includes ``pluggy-0.4.0``, which correctly handles
  ``VersionConflict`` errors in plugins (`#704`_).
  Thanks `@nicoddemus`_ for the PR.
   2016-09-04 11:39:09 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.2.

3.0.2
=====

* Improve error message when passing non-string ids to \ 
``pytest.mark.parametrize`` (`#1857`_).
  Thanks `@okken`_ for the report and `@nicoddemus`_ for the PR.

* Add ``buffer`` attribute to stdin stub class ``pytest.capture.DontReadFromInput``
  Thanks `@joguSD`_ for the PR.

* Fix ``UnicodeEncodeError`` when string comparison with unicode has failed. \ 
(`#1864`_)
  Thanks `@AiOO`_ for the PR.

* ``pytest_plugins`` is now handled correctly if defined as a string (as opposed as
  a sequence of strings) when modules are considered for assertion rewriting.
  Due to this bug, much more modules were being rewritten than necessary
  if a test suite uses ``pytest_plugins`` to load internal plugins (`#1888`_).
  Thanks `@jaraco`_ for the report and `@nicoddemus`_ for the PR (`#1891`_).

* Do not call tearDown and cleanups when running tests from
  ``unittest.TestCase`` subclasses with ``--pdb``
  enabled. This allows proper post mortem debugging for all applications
  which have significant logic in their tearDown machinery (`#1890`_). Thanks
  `@mbyt`_ for the PR.

* Fix use of deprecated ``getfuncargvalue`` method in the internal doctest plugin.
  Thanks `@ViviCoder`_ for the report (`#1898`_).
   2016-08-31 11:03:45 by Thomas Klausner | Files touched by this commit (2) | Package updated
Log message:
Updated py-test to 3.0.1.

3.0.1
=====

* Fix regression when ``importorskip`` is used at module level (`#1822`_).
  Thanks `@jaraco`_ and `@The-Compiler`_ for the report and `@nicoddemus`_ for \ 
the PR.

* Fix parametrization scope when session fixtures are used in conjunction
  with normal parameters in the same call (`#1832`_).
  Thanks `@The-Compiler`_ for the report, `@Kingdread`_ and `@nicoddemus`_ for \ 
the PR.

* Fix internal error when parametrizing tests or fixtures using an empty ``ids`` \ 
argument (`#1849`_).
  Thanks `@OPpuolitaival`_ for the report and `@nicoddemus`_ for the PR.

* Fix loader error when running ``pytest`` embedded in a zipfile.
  Thanks `@mbachry`_ for the PR.

.. _@Kingdread: https://github.com/Kingdread
.. _@mbachry: https://github.com/mbachry
.. _@OPpuolitaival: https://github.com/OPpuolitaival

.. _#1822: https://github.com/pytest-dev/pytest/issues/1822
.. _#1832: https://github.com/pytest-dev/pytest/issues/1832
.. _#1849: https://github.com/pytest-dev/pytest/issues/1849