Commit Graph

6224 Commits

Author SHA1 Message Date
Florian Bruhin 91c6bef77a Add venv to the default norecursedirs
venv (without a dot) is commonly used as a name for a virtualenv directory, and
we don't want to collect that.
2017-02-15 14:55:12 +01:00
Patrick Hayes 6b5566db66 Update changelog 2017-02-14 17:47:42 -08:00
Patrick Hayes 49289fed52 Fix docs 2017-02-14 17:21:20 -08:00
Patrick Hayes 00ec30353b Update docs as requested 2017-02-14 17:08:42 -08:00
Patrick Hayes 58ce3a9e8c Safer sys.modules delete 2017-02-14 16:54:32 -08:00
Floris Bruynooghe 427bf42a52 Merge pull request #2247 from flub/flub/training
Mention next training event.
2017-02-14 12:06:13 +00:00
Floris Bruynooghe b536fb7ace Mention next training event. 2017-02-14 11:45:39 +00:00
Bruno Oliveira 9eb1d73951 --override-ini now correctly overrides some fundamental options like "python_files"
#2238
2017-02-08 23:03:33 -02:00
Bruno Oliveira 3d9c5cf19f Merge pull request #2225 from mbyt/allow_skipping_unittests_with_pdb_active
Allow to skip unittests if --pdb active
2017-02-08 21:23:51 -02:00
Bruno Oliveira 6a097aa0f1 Merge branch 'master' into allow_skipping_unittests_with_pdb_active 2017-02-08 20:30:14 -02:00
Bruno Oliveira a4fb971c1f Merge pull request #2235 from bluetech/dont-execute-properties
ignore property errors when parsing fixure factories
2017-02-07 23:41:36 -02:00
Ran Benita 3a0a0c2df9 Ignore errors raised from descriptors when collecting fixtures
Descriptors (e.g. properties) such as in the added test case are
triggered during collection, executing arbitrary code which can raise.
Previously, such exceptions were propagated and failed the collection.
Now these exceptions are caught and the corresponding attributes are
silently ignored.

A better solution would be to completely skip access to all custom
descriptors, such that the offending code doesn't even trigger. However
I think this requires manually going through the instance and all of its
MRO for each and every attribute checking if it might be a proper
fixture before accessing it. So I took the easy route here.

In other words, putting something like this in your test class is still
a bad idea...:

    @property
    def innocent(self):
        os.system('rm -rf /')

Fixes #2234.
2017-02-07 14:27:34 +02:00
Ran Benita 87fb689ab1 Remove an unneeded `except KeyboardInterrupt`
KeyboardInterrupt is a subclass of BaseException, but not of Exception.
Hence if we remove this except, KeyboardInterrupts will still be raised
so the behavior stays the same.
2017-02-07 14:12:09 +02:00
Bruno Oliveira ccf9877447 Merge pull request #2232 from vidartf/patch-1
Do not asssume `Item.obj` in 'skipping' plugin
2017-02-03 21:39:42 -02:00
Bruno Oliveira a4d2a5785b Merge pull request #2142 from barneygale/xfail_without_condition_getglobals
'xfail' markers without a condition no longer rely on the underlying `Item` objects deriving from `PyobjMixin`
2017-02-03 16:09:47 -02:00
Vidar Tonaas Fauske 832c89dd5f Test for `pytest.mark.xfail` with non-Python Item 2017-02-03 17:13:05 +01:00
Vidar Tonaas Fauske 1a88a91c7a Update authors/history 2017-02-03 16:29:43 +01:00
Vidar Tonaas Fauske bad261279c Do not asssume `Item.obj` in 'skipping' plugin
See #2231 for discussion.
2017-02-03 16:04:34 +01:00
Bruno Oliveira 208fae5bf0 Merge pull request #2227 from Kriechi/raises-info
add matching the error message to pytest.raises
2017-02-03 00:56:35 -02:00
Bruno Oliveira abbff681ba Fix '{0}' format for py26 2017-02-02 18:01:44 -02:00
Thomas Kriechbaumer 43662ce789 allow error message matching in pytest.raises 2017-02-02 19:52:33 +01:00
mbyt ad56cd8027 extract a _handle_skip method, secure PY2 branch 2017-02-02 05:01:51 +01:00
Bruno Oliveira 176c680e19 Merge branch 'master' into allow_skipping_unittests_with_pdb_active 2017-02-01 15:53:14 -02:00
Ronny Pfannschmidt da5a3dba87 Merge pull request #2226 from nicoddemus/raise-stop-iteration
Replace 'raise StopIteration' usages in the code by 'return's in accordance to PEP-479
2017-02-01 14:50:54 +01:00
Bruno Oliveira e1c5314d80 Replace 'raise StopIteration' usages in the code by 'return's in accordance to PEP-479
Fix #2160
2017-02-01 02:37:55 -02:00
mbyt 36b6f17727 fixing code-style, keep flake8 happy 2017-01-31 21:03:49 +01:00
mbyt d1c725078a Allow to skip unittests if --pdb active
closes #2137
2017-01-31 04:47:31 +01:00
Ronny Pfannschmidt 3b47cb45e6 Merge pull request #2222 from RonnyPfannschmidt/features
merge master into features
2017-01-26 13:48:10 +01:00
Ronny Pfannschmidt 3f30c22894 fix changelog merge mistake 2017-01-26 13:03:29 +01:00
Ronny Pfannschmidt 713bdc1f9f merge master into features 2017-01-26 12:00:52 +01:00
Bruno Oliveira 0931fe2c89 Merge pull request #2221 from pytest-dev/ionelmc-patch-1
Discourage users from using unittest support somewhat
2017-01-25 21:38:44 -02:00
Bruno Oliveira 34e98bce0a Merge pull request #2198 from unsignedint/make-parametrize-enhancement
Enhancement to `make_parametrize_id`hook function
2017-01-25 21:37:18 -02:00
Ionel Cristian Mărieș c8032a9bbb Fix reference. 2017-01-25 14:44:07 +02:00
Ionel Cristian Mărieș d98d122e81 Discourage users from using this all the time. 2017-01-25 14:20:38 +02:00
Bruno Oliveira beb77c1a38 Fix release date for 3.0.6 2017-01-23 13:51:12 -02:00
Ronny Pfannschmidt d076e4158f Merge pull request #2216 from vmuriart/patch-1
Add py36 classifier & Add py37 to travis
2017-01-23 10:19:13 +01:00
Victor Uriarte 902fd2ff6a Add py37-nightly to travis 2017-01-22 17:20:15 -07:00
Victor Uriarte 839aa963a1 Add py36 identifier
and order AUTHORS
2017-01-22 17:13:17 -07:00
Ronny Pfannschmidt 400b0779f9 Merge pull request #2213 from RonnyPfannschmidt/release-3.0.6
Release 3.0.6
2017-01-22 22:21:53 +01:00
Ronny Pfannschmidt c9f327dc87 bump version to next dev 2017-01-22 22:21:08 +01:00
Ronny Pfannschmidt 0e64cd045c take off author_email after pypi rejects 2017-01-22 22:14:54 +01:00
Ronny Pfannschmidt 22da561ae5 fix copy+paste error, its supposed to be 3.0.6 2017-01-22 18:44:30 +01:00
Ronny Pfannschmidt 449b88c640 rerun regendoc with correct install 2017-01-22 18:44:30 +01:00
Ronny Pfannschmidt 34b898b47e generate the release announcement 2017-01-22 18:44:30 +01:00
Ronny Pfannschmidt 01eaf9db51 fix the xfail docstring typo at the actual docstring + regendoc 2017-01-22 18:44:30 +01:00
Ronny Pfannschmidt 4d0c635252 regendoc 2017-01-22 18:44:30 +01:00
Ronny Pfannschmidt 55f21bd2b9 bump version 2017-01-22 18:44:30 +01:00
Bruno Oliveira c39d846c1b Merge pull request #2215 from RonnyPfannschmidt/fix-doctesting/devpi-bug
fix devpi test for doctesting env
2017-01-22 13:02:03 -02:00
Ronny Pfannschmidt 403122281a fix devpi test for doctesting env
due to a devpi bug, we always get a sdist install which in turn triggers
the pytest issue #2042 / #726

going for pyargs and a changed folder, it should no longer happen
(and will be tested firther after rebasing the release branch)
2017-01-22 11:48:05 +01:00
Ravi Chandra 0e58c3fa80 updates for PR review #2198 2017-01-21 16:47:49 +13:00