./devel/py-test, Python testing tool

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

Branch: CURRENT, Version: 4.0.2, Package name: py27-test-4.0.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] [devel/py-pathlib2]

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

Master sites:

SHA1: 79de8e2e52adc537d3d124a751e3ab1e581f78f2
RMD160: a75e9cdff84591bd9c92c68836b943b349058119
Filesize: 883.748 KB

Version history: (Expand)

CVS history: (Expand)

   2018-12-14 15:44:22 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 4.0.2

pytest 4.0.2:

Bug Fixes
- Validate arguments from the PYTEST_ADDOPTS environment variable and the \ 
addopts ini option separately.
- Fix raises(..., 'code(string)') frame filename.
- When a fixture yields and a log call is made after the test runs, and, if the \ 
test is interrupted, capture attributes are None.
- Raise TypeError for with raises(..., match=<non-None falsey value>).
   2018-12-11 00:59:20 by Leonardo Taccari | Files touched by this commit (1)
Log message:
py-test: pathlib2 is needed by py27-test too

Due the if-elif condition pathlib2 was accidentally not marked as dependency
in the py27 case.
   2018-11-24 16:35:13 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 4.0.1

pytest 4.0.1:

Bug Fixes
- Display warnings before "short test summary info" again, but still \ 
later warnings in the end.
- Handle uninitialized exceptioninfo in repr/str.
- Do not create .gitignore/README.md files in existing cache directories.
- Rearrange warning handling for the yield test errors so the opt-out in 4.0.x \ 
correctly works.
- Fix collection of testpaths with --pyargs.
- Fix assertion rewriting involving Starred + side-effects.
- Ensure we resolve the absolute path when the given --basetemp is a relative path.

- Use pkg_resources.parse_version instead of LooseVersion in minversion check.
- Adjust the stack level of some internal pytest warnings.
   2018-11-11 22:56:21 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.10.1

pytest 3.10.1:

Bug Fixes
- Fix nested usage of debugging plugin (pdb), e.g. with pytester's testdir.runpytest.
- Block the stepwise plugin if cacheprovider is also blocked, as one depends on \ 
the other.
- Parse minversion as an actual version and not as dot-separated strings.
- Fix duplicate collection due to multiple args matching the same packages.
- Fix item.nodeid with resolved symlinks.
- Fix collection of direct symlinked files, where the target does not match \ 
- Fix TypeError in report_collect with _collect_report_last_write.

Trivial/Internal Changes
- Replace byte/unicode helpers in test_capture with python level syntax.
   2018-11-05 09:36:25 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-test: updated to 3.10.0

pytest 3.10.0:

* Resume capturing output after continue with \ 
  This also adds a new pytest_leave_pdb hook, and passes in pdb to the existing \ 
pytest_enter_pdb hook.
* Add -sw, --stepwise as an alternative to --lf -x for stopping at the first \ 
failure, but starting the next test invocation from that test. See the \ 
documentation for more info.
* Make --color emit colorful dots when not running in verbose mode. Earlier, it \ 
would only colorize the test-by-test output if --verbose was also passed.
* Improve performance with collection reporting in non-quiet mode with terminals.
  The “collecting …” message is only printed/updated every 0.5s.

Bug Fixes
* Fix false RemovedInPytest4Warning: usage of Session... is deprecated, please \ 
use pytest warnings.
* Fix problems with running tests in package __init__.py files.
* Swallow warnings during anonymous compilation of source.
* Fix access denied error when deleting stale directories created by tmpdir / \ 
* Naming a fixture request will now raise a warning: the request fixture is \ 
internal and should not be overwritten as it will lead to internal errors.
* Handle (ignore) exceptions raised during collection, e.g. with Django’s \ 
LazySettings proxy class.

Improved Documentation
* Added missing documentation about the fact that module names passed to filter \ 
warnings are not regex-escaped.

Trivial/Internal Changes
* Display cachedir also in non-verbose mode if non-default.
* pdb: improve message about output capturing with set_trace.
  Do not display “IO-capturing turned off/on” when -s is used to avoid confusion.
* Improve message and stack level of warnings issued by monkeypatch.setenv when \ 
the value of the environment variable is not a str.
   2018-10-29 09:25:08 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.9.3

pytest 3.9.3:
Bug Fixes
* Fix “ValueError: Plugin already registered” with conftest plugins via symlink.
* Handle race condition between creation and deletion of temporary folders.
* Fix bug where the warning summary at the end of the test session was not \ 
showing the test where the warning was originated.
* Fix regression when stacklevel for warnings was passed as positional argument \ 
on python2.

Improved Documentation
* Add reference to empty_parameter_set_mark ini option in documentation of \ 

Trivial/Internal Changes
* Revert patching of sys.breakpointhook since it appears to do nothing.
* Apply an import sorter (reorder-python-imports) to the codebase.
* Remove use of unnecessary compat shim, six.binary_type
   2018-10-23 08:34:00 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-test: updated to 3.9.2

pytest 3.9.2:

Bug Fixes
* Improve error message when a recursive dependency between fixtures is detected.
* Fix logging messages not shown in hooks pytest_sessionstart() and \ 
* Fix unescaped XML raw objects in JUnit report for skipped tests
* Python 2: safely format warning message about passing unicode strings to \ 
warnings.warn, which may cause surprising MemoryError exception when monkey \ 
patching warnings.warn itself.
* Improve error message when it is not possible to determine a function’s \ 
* Pin setuptools>=40.0 to support py_modules in setup.cfg
* Restore the tmpdir behaviour of symlinking the current test run.
* Fix filename reported by warnings.warn when using recwarn under python2.
   2018-10-18 12:11:25 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-test: updated to 3.9.1

pytest 3.9.1:
- For test-suites containing test classes, the information about the subclassed \ 
module is now output only if a higher verbosity level is specified (at least \ 

pytest 3.9.0:
- The following accesses have been documented as deprecated for years, but are \ 
now actually emitting deprecation warnings.
Access of Module, Function, Class, Instance, File and Item through Node \ 
instances. Now users will this warning:
usage of Function.Module is deprecated, please use pytest.Module instead
Users should just import pytest and access those objects using the pytest module.
request.cached_setup, this was the precursor of the setup/teardown mechanism \ 
available to fixtures. You can consult funcarg comparison section in the docs.
Using objects named "Class" as a way to customize the type of nodes \ 
that are collected in Collector subclasses has been deprecated. Users instead \ 
should use pytest_collect_make_item to customize node types during collection.
This issue should affect only advanced plugins who create new collection types, \ 
so if you see this warning message please contact the authors so they can change \ 
the code.
The warning that produces the message below has changed to RemovedInPytest4Warning:
getfuncargvalue is deprecated, use getfixturevalue
- Add a Deprecation warning for pytest.ensuretemp as it was deprecated since a while.

- Improve usage errors messages by hiding internal details which can be \ 
distracting and noisy.
This has the side effect that some error conditions that previously raised \ 
generic errors (such as ValueError for unregistered marks) are now raising \ 
Failed exceptions.
- Improve the error displayed when a conftest.py file could not be imported.
In order to implement this, a new chain parameter was added to \ 
ExceptionInfo.getrepr to show or hide chained tracebacks in Python 3 (defaults \ 
to True).
- Add empty_parameter_set_mark=fail_at_collect ini option for raising an \ 
exception when parametrize collects an empty set.
- Log messages generated in the collection phase are shown when live-logging is \ 
enabled and/or when they are logged to a file.
- Introduce tmp_path as a fixture providing a Path object.
- Deprecation warnings are now shown even if you customize the warnings filters \ 
yourself. In the previous version any customization would override pytest’s \ 
filters and deprecation warnings would fall back to being hidden by default.
- Allow specification of timeout for Testdir.runpytest_subprocess() and \ 
- Add returncode argument to pytest.exit() to exit pytest with a specific return \ 
- Reimplement pytest.deprecated_call using pytest.warns so it supports the \ 
match='...' keyword argument.
This has the side effect that pytest.deprecated_call now raises \ 
pytest.fail.Exception instead of AssertionError.
- Require setuptools>=30.3 and move most of the metadata to setup.cfg.

Bug Fixes
- Improve error message when test functions of unittest.TestCase subclasses use \ 
a parametrized fixture.
- request.fixturenames now correctly returns the name of fixtures created by \ 
- Warning filters passed as command line options using -W now take precedence \ 
over filters defined in ini configuration files.
- Fix source reindenting by using textwrap.dedent directly.
- pytest.warn will capture previously-warned warnings in Python 2. Previously \ 
they were never raised.
- Resolve symbolic links for args.
This fixes running pytest tests/test_foo.py::test_bar, where tests is a symlink \ 
to project/app/tests: previously project/app/conftest.py would be ignored for \ 
fixtures then.
- Fix duplicate printing of internal errors when using --pdb.
- pathlib based tmpdir cleanup now correctly handles symlinks in the folder.
- Display the filename when encountering SyntaxWarning.

Improved Documentation
- Update usefixtures documentation to clarify that it can’t be used with \ 
fixture functions.
- Update fixture documentation to specify that a fixture can be invoked twice in \ 
the scope it’s defined for.
- According to unittest.rst, setUpModule and tearDownModule were not \ 
implemented, but it turns out they are. So updated the documentation for \ 
- Add tempir testing example to CONTRIBUTING.rst guide
Trivial/Internal Changes
- The internal MarkerError exception has been removed.
- Port the implementation of tmpdir to pathlib.
- Exclude 0.00 second entries from --duration output unless -vv is passed on the \ 
- Fixed formatting of string literals in internal tests.