./devel/py-test, Python testing tool

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


Branch: CURRENT, Version: 3.7.2, Package name: py27-test-3.7.2, 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] [lang/py-six] [devel/py-more-itertools] [devel/py-atomicwrites] [devel/py-pluggy] [devel/py-funcsigs] [devel/py-attrs]

Required to build:
[pkgtools/cwrappers] [devel/py-setuptools_scm]

Master sites:

SHA1: c89622fdc403dcc287040ac5a99d1dd321b3ade1
RMD160: 507f75890f2168b2b50b25f0ce34525a04ad3f96
Filesize: 828.117 KB

Version history: (Expand)


CVS history: (Expand)


   2018-08-19 10:12:20 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.7.2

pytest 3.7.2:

Bug Fixes
- Fix filterwarnings not being registered as a builtin mark.
- Fix test collection from packages mixed with normal directories.
- Fix infinite recursion during collection if a pytest_ignore_collect hook \ 
returns False instead of None.
- Fix bug where decorated fixtures would lose functionality (for example \ 
@mock.patch).
- Fix bug where importing modules or other objects with prefix pytest_ prefix \ 
would raise a PluginValidationError.
- Fix AttributeError during teardown of TestCase subclasses which raise an \ 
exception during __init__.
- Fix traceback reporting for exceptions with __cause__ cycles.
   2018-08-05 12:27:30 by Adam Ciarcinski | Files touched by this commit (1)
Log message:
py-test: bump py-pluggy DEPENDS
   2018-08-05 12:17:47 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-test: updated to 3.7.1

pytest 3.7.1:

Bug Fixes
- Raise immediately if approx() is given an expected value of a type it doesn't \ 
understand (e.g. strings, nested dicts, etc.).
- Correctly represent the dimensions of an numpy array when calling repr() on \ 
approx().
- Display the absolute path if cache_dir is not relative to the rootdir instead \ 
of failing.
- Fix compatibility problem with plugins and the warning code issued by fixture \ 
functions when they are called directly.
- Fix infinite recursion in pytest.approx with arrays in numpy<1.13.
- Pin pathlib2 to >=2.2.0 as we require __fspath__ support.
- Fix TypeError when the assertion message is bytes in python 3.

pytest 3.7.0:

Deprecations and Removals
- pytest_namespace has been deprecated.
  See the documentation for pytest_namespace hook for suggestions on how to deal
  with this in plugins which use this functionality.
- Calling a fixture function directly, as opposed to request them in a test \ 
function, now issues a RemovedInPytest4Warning. It will be changed into an error \ 
in pytest 4.0.
  This is a great source of confusion to new users, which will often call the \ 
fixture functions and request them from test functions interchangeably, which \ 
breaks the fixture resolution model.

Features
- New package fixture scope: fixtures are finalized when the last test of a \ 
*package* finishes. This feature is considered **experimental**, so use it \ 
sparingly.
- Node.add_marker now supports an append=True/False parameter to determine \ 
whether the mark comes last (default) or first.
- Fixture caplog now has a messages property, providing convenient access to the \ 
format-interpolated log messages without the extra data provided by the \ 
formatter/handler.
- New --trace option to enter the debugger at the start of a test.
- Introduce pytester.copy_example as helper to do acceptance tests against \ 
examples from the project.

Bug Fixes
- Fix a bug where fixtures overridden by direct parameters (for example \ 
parametrization) were being instantiated even if they were not being used by a \ 
test.
- Fix ApproxNumpy initialisation argument mixup, abs and rel tolerances were \ 
flipped causing strange comparsion results.
  Add tests to check abs and rel tolerances for np.array and test for expecting \ 
nan with np.array()
- Fix truncated locals output in verbose mode.

Improved Documentation
- Correct the usage documentation of --last-failed-no-failures by adding the \ 
missing --last-failed argument in the presented examples, because they are \ 
misleading and lead to think that the missing argument is not needed.

Trivial/Internal Changes
- Now a README.md file is created in .pytest_cache to make it clear why the \ 
directory exists.
   2018-07-05 08:48:20 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.6.3

3.6.3:
Bug Fixes
* Fix ImportWarning triggered by explicit relative imports in \ 
assertion-rewritten package modules.
* Fix error in pytest.approx when dealing with 0-dimension numpy arrays.
* No longer raise ValueError when using the get_marker API.
* Fix problem where log messages with non-ascii characters would not appear in \ 
the output log file.
* No longer raise AttributeError when legacy marks can’t be stored in functions.

Improved Documentation
* The description above the example for @pytest.mark.skipif now better matches \ 
the code.

Trivial/Internal Changes
* Internal refactoring: removed unused CallSpec2tox ._globalid_args attribute \ 
and metafunc parameter from CallSpec2.copy().
* Silence usage of reduce warning in Python 2
* Fix usage of attr.ib deprecated convert parameter
   2018-06-21 08:41:14 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-test: updated to 3.6.2

Pytest 3.6.2:

Bug Fixes
Fix regression in Node.add_marker by extracting the mark object of a MarkDecorator.
Warnings without location were reported as None. This is corrected to now report \ 
<undetermined location>.
Continue to call finalizers in the stack when a finalizer in a former scope \ 
raises an exception.
Fix encoding error with print statements in doctests

Improved Documentation
Add documentation for the --strict flag.

Trivial/Internal Changes
Update old quotation style to parens in fixture.rst documentation.
Improve display of hint about --fulltrace with KeyboardInterrupt.
pytest’s testsuite is no longer runnable through python setup.py test – \ 
instead invoke pytest or tox directly.
Fix typo in documentation
   2018-06-06 21:27:51 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.6.1

Pytest 3.6.1:
Bug Fixes
* Fixed a bug where stdout and stderr were logged twice by junitxml when a test \ 
was marked xfail.
* Fix usefixtures mark applyed to unittest tests by correctly instantiating \ 
FixtureInfo.
* Fix assertion rewriter compatibility with libraries that monkey patch file objects.

Improved Documentation
* Added a section on how to use fixtures as factories to the fixture documentation.

Trivial/Internal Changes
* Enable caching for pip/pre-commit in order to reduce build time on travis/appveyor.
* Switch pytest to the src/ layout as we already suggested it for good practice \ 
- now we implement it as well.
* Fix if in tests to support 3.7.0b5, where a docstring handling in AST got reverted.
* Remove some python2.5 compatibility code.
   2018-05-30 09:35:18 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.6.0

Pytest 3.6.0
Features
Revamp the internals of the pytest.mark implementation with correct per node \ 
handling which fixes a number of long standing bugs caused by the old design. \ 
This introduces new Node.iter_markers(name) and Node.get_closest_mark(name) \ 
APIs. Users are strongly encouraged to read the reasons for the revamp in the \ 
docs, or jump over to details about updating existing code to use the new APIs.
Now when @pytest.fixture is applied more than once to the same function a \ 
ValueError is raised. This buggy behavior would cause surprising problems and if \ 
was working for a test suite it was mostly by accident.
Support for Python 3.7’s builtin breakpoint() method, see Using the builtin \ 
breakpoint function for details.
monkeypatch now supports a context() function which acts as a context manager \ 
which undoes all patching done within the with block.
The --pdb option now causes KeyboardInterrupt to enter the debugger, instead of \ 
stopping the test session. On python 2.7, hitting CTRL+C again exits the \ 
debugger. On python 3.2 and higher, use CTRL+D.
pytest not longer changes the log level of the root logger when the log-level \ 
parameter has greater numeric value than that of the level of the root logger, \ 
which makes it play better with custom logging configuration in user code.

Bug Fixes
A rare race-condition which might result in corrupted .pyc files on Windows has \ 
been hopefully solved.
Also use iter_marker for discovering the marks applying for marker expressions \ 
from the cli to avoid the bad data from the legacy mark storage.
When showing diffs of failed assertions where the contents contain only \ 
whitespace, escape them using repr() first to make it easy to spot the \ 
differences.
   2018-04-25 08:57:01 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.5.1

Pytest 3.5.1:
Bug Fixes
Reset sys.last_type, sys.last_value and sys.last_traceback before each test \ 
executes. Those attributes are added by pytest during the test run to aid \ 
debugging, but were never reset so they would create a leaking reference to the \ 
last failing test’s frame which in turn could never be reclaimed by the \ 
garbage collector.
pytest.raises now raises TypeError when receiving an unknown keyword argument.
pytest.raises now works with exception classes that look like iterables.

Improved Documentation
Fix typo in caplog fixture documentation, which incorrectly identified certain \ 
attributes as methods.

Trivial/Internal Changes
Added a more indicative error message when parametrizing a function whose \ 
argument takes a default value.
Remove internal _pytest.terminal.flatten function in favor of \ 
more_itertools.collapse.
Import some modules from collections.abc instead of collections as the former \ 
modules trigger DeprecationWarning in Python 3.7.
record_property is no longer experimental, removing the warnings was forgotten.
Mention in documentation and CLI help that fixtures with leading _ are printed \ 
by pytest --fixtures only if the -v option is added.