Commit Graph

778 Commits

Author SHA1 Message Date
Jose Carlos Menezes dbaa9464ba Update usefixtures documentation
Clarifying that it can't be used with fixture functions
2018-10-12 09:45:49 -03:00
Bruno Oliveira c9a85b0e78 Fix linting 2018-10-10 19:54:39 -03:00
Niklas JQ d1322570dd Fix issue 4093 2018-10-10 19:45:07 +02:00
Ronny Pfannschmidt 66609665f2
Merge pull request #4076 from nicoddemus/unittest-param-fixture-msg
Improve error message when TestCase functions use a parametrized fixture
2018-10-06 07:43:57 +02:00
Bruno Oliveira a1208f5631
Merge pull request #4075 from nicoddemus/dynamic-fixturenames
Fix request.fixturenames to return fixtures created dynamically
2018-10-04 09:21:23 -03:00
Anthony Sottile b098292352
Merge pull request #4069 from asottile/deindent_4066
Fix source reindenting by using `textwrap.dedent` directly.
2018-10-03 16:11:51 -07:00
Bruno Oliveira 212937eb3e Improve error message when TestCase functions use a parametrized fixture
Fix #2535
2018-10-03 19:43:46 -03:00
Bruno Oliveira 70c7273640 Fix request.fixturenames to return fixtures created dynamically
Fix #3057
2018-10-03 18:50:14 -03:00
Palash Chatterjee f9ac60807c Fixes #4064 by correcting the documentation for unit-tests 2018-10-03 18:11:09 +05:30
Bruno Oliveira 3f03625a5d
Merge pull request #4070 from jeffreyrack/4058-update-fixture-docs
Update documentation to indicate a fixture can be invoked more than once in it's scope.
2018-10-03 08:39:41 -03:00
Jeffrey Rackauckas 642847c079 Update documentation on fixture being invoked more than once in a scope. 2018-10-02 20:53:15 -07:00
Anthony Sottile f102ccc8f0 Fix source reindenting by using `textwrap.dedent` directly. 2018-10-02 16:13:35 -07:00
Anthony Sottile d3673c7429 Preparing release version 3.8.2 2018-10-02 07:46:02 -07:00
Bruno Oliveira 25fe3706a4
Merge pull request #4056 from nicoddemus/unicode-vars
Ensure Monkeypatch setenv and delenv use bytes keys in Python 2
2018-10-02 07:56:32 -03:00
Bruno Oliveira 5e7d427df1
Merge pull request #4060 from nicoddemus/4051-changelog
Improve changelog for #4051
2018-10-01 18:12:52 -03:00
Bruno Oliveira 20d0f0e56b Improve changelog for #4051 2018-10-01 17:12:05 -03:00
Bruno Oliveira d24a7e6c5a Issue warning if Monkeypatch.setenv/delenv receive non-strings in Python 2
Fixes the bug described in:

	https://github.com/tox-dev/tox/pull/1025#discussion_r221273830

Which is more evident when using `unicode_literals`.
2018-10-01 17:05:30 -03:00
Jose Carlos Menezes 4dc73bda45 Update changelog 2018-10-01 14:41:30 -03:00
Ronny Pfannschmidt 5d2d64c190
Merge pull request #4057 from jeffreyrack/4051-improve-error-messaging
Improve error messaging when invalid syntax is passed to the -m option
2018-10-01 07:16:59 +02:00
Jeffrey Rackauckas 7a6d16c1eb Adding .rst to end of changelog fragment filename. 2018-09-30 18:45:49 -07:00
Jeffrey Rackauckas c2179c3127 Improve error messaging when invalid syntax is passed to the -m option 2018-09-30 18:34:56 -07:00
Bruno Oliveira d8d7f73e1c
Merge pull request #4045 from nicoddemus/root-conftest-warning-workaround-4039
Do not issue non-top-level conftest warning when --pyargs is used
2018-09-27 09:26:11 -03:00
Ronny Pfannschmidt 3c23b5b010
Merge pull request #4037 from nicoddemus/deprecate-item-warnings-captured-hook
Document that item parameter of pytest_warning_captured hook is deprecated
2018-09-27 13:20:26 +02:00
Bruno Oliveira 783019a8e6
Rename 4040.trivial.rst to 4040.bugfix.rst 2018-09-27 08:08:03 -03:00
Bruno Oliveira d2fc7ca6e0
Merge pull request #4041 from Zac-HD/user-properties-type
Ensure user_properties is a list
2018-09-27 08:04:30 -03:00
Denis Otkidach 44d29d887e Changelog entry on excluding empty reports for passed tests 2018-09-26 19:02:35 +03:00
Bruno Oliveira 32c5a113e2 Do not issue non-top-level conftest warning when --pyargs is used
Fix #4039
2018-09-26 12:02:08 -03:00
Zac-HD 6be2136f20 Ensure user_properties is a list 2018-09-26 22:04:50 +10:00
Bruno Oliveira 1636522563 Document that item parameter of pytest_warning_captured hook is deprecated
Our policy is to not deprecate features during bugfix releases, but in this
case I believe it makes sense as we are only documenting it as deprecated,
without issuing warnings which might potentially break test suites.

This will get the word out that hook implementers should not use this parameter
at all.

Fix #4036
2018-09-25 17:38:22 -03:00
iwanb c61ff31ffa Fix #3539: reload module with assertion rewrite import hook 2018-09-23 13:05:55 +02:00
CrazyMerlyn 3f6a46c2a4 Preparing release version 3.8.1 2018-09-22 16:34:06 +00:00
Ronny Pfannschmidt f02dbaf97f
Merge pull request #4010 from nicoddemus/package-len-error-3749
Fix 'Package has no len()' error during collection
2018-09-21 07:40:20 +02:00
Bruno Oliveira 41f6ea13ce Fix 'Package has no len()' error during collection
Fix #3749
2018-09-20 17:53:21 -03:00
Ronny Pfannschmidt f6eb39df33
Merge pull request #4001 from asottile/fix_bytes_repr_text_mix_python_2
Fix UnicodeDecodeError in assertion with mixed non-ascii bytes repr + text
2018-09-20 22:16:37 +02:00
Bruno Oliveira 7a5e11bbcf
Merge pull request #3997 from nicoddemus/deprecation-docs
Introduce deprecations page
2018-09-20 08:22:51 -03:00
Anthony Sottile 7122fa5613 Fix UnicodeDecodeError in assertion with mixed non-ascii bytes repr + text 2018-09-19 20:24:00 -07:00
Bruno Oliveira 7aff81739e
Merge pull request #3998 from blueyed/logging-del
logging: del item.catch_log_handler only in teardown
2018-09-19 20:07:19 -03:00
Bruno Oliveira 27772f67c0
Merge pull request #3987 from nicoddemus/fix-find-scope-3941
Fix scope determination with indirect parameters
2018-09-19 20:06:45 -03:00
Bruno Oliveira c2841542af Introduce deprecations page
fix #3996
2018-09-19 19:51:29 -03:00
Bruno Oliveira d1fa8ae08e
Improve CHANGELOG entry 2018-09-19 12:52:10 -03:00
Daniel Hahler e7eb7e799b logging: del item.catch_log_handler only in teardown
Without this caplog.record_tuples etc is not available anymore when using
`--pdb`.
2018-09-19 17:17:47 +02:00
Bruno Oliveira 1df6d28080 Fix assertion rewriter crash if cwd changes mid-testing
Unfortunately we need to get a `py.path.local` object to perform the fnmatch
operation, it is different from the standard `fnmatch` module because it
implements its own custom logic. So we need to use `py.path` to perform
the fnmatch for backward compatibility reasons.

Ideally we should be able to use a "pure path" in `pathlib` terms (a path
not bound to the file system), but we don't have those in pylib.

Fix #3973
2018-09-17 20:04:44 -03:00
Bruno Oliveira 86a14d007d Fix scope determination with indirect parameters
Fix #3941
2018-09-14 21:33:59 -03:00
Bruno Oliveira 9aa6b0903b .pytest_cache is now automatically ignored by Git 2018-09-14 15:16:40 -03:00
Ronny Pfannschmidt 8fe55b1d18 add changelog for fix #3975 2018-09-13 15:40:45 +02:00
Anthony Sottile 826adafe2e Improve pre-commit detection for changelog filenames 2018-09-07 09:36:09 -07:00
Bruno Oliveira b55351274e Amend CHANGELOG with missing #3251 2018-09-06 18:56:08 -03:00
Bruno Oliveira 1f20626618 Preparing release version 3.8.0 2018-09-05 21:06:32 +00:00
Bruno Oliveira 69b34f7658 Merge remote-tracking branch 'upstream/master' into release-3.8.0 2018-09-05 18:02:02 -03:00
Bruno Oliveira 531b76a513
Merge pull request #3931 from nicoddemus/internal-warnings
Use standard warnings for internal pytest warnings
2018-09-05 14:05:52 -03:00