Commit Graph

6604 Commits

Author SHA1 Message Date
Bruno Oliveira f1900bbea6 Revert subclassing explicitly from object introduced by accident in #2260 2017-02-18 10:34:41 -02:00
Bruno Oliveira 21a09f0895 Merge pull request #2261 from vmuriart/doc-report_header
Document pytest_report_header and conftest behavior
2017-02-17 12:22:28 -02:00
Victor Uriarte a88017cf26 Add note documenting #2257 2017-02-16 23:00:55 -07:00
Victor Uriarte 58d7f4e048 Correct typo 2017-02-16 22:52:06 -07:00
Bruno Oliveira abd6ad3751 Merge pull request #2260 from MichalTHEDUDE/feature/NewStyleClasses-2147
New-style classes implemented for python 2.7 - #2147
2017-02-16 19:05:09 -02:00
Michal Wajszczuk fb0b90646e New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01:00
Bruno Oliveira 9c809f5ad0 Merge pull request #2255 from scop/spelling
Spelling fixes
2017-02-15 18:41:49 -02:00
Bruno Oliveira 27f12ed0c3 Merge pull request #2254 from scop/py36-escseq
Python 3.6 invalid escape sequence deprecation fixes
2017-02-15 18:41:06 -02:00
Ronny Pfannschmidt 0a26132232 Merge pull request #2241 from nicoddemus/override-python-files
--override-ini now correctly overrides some fundamental options like "python_files"
2017-02-15 21:40:50 +01:00
Bruno Oliveira da828aac05 Merge pull request #2253 from The-Compiler/norecursedirs
Add venv to the default norecursedirs
2017-02-15 18:40:38 -02:00
Bruno Oliveira 8f98ac5ae8 Fix typo in docs "textures" -> "fixtures" 2017-02-15 13:15:53 -02:00
Ville Skyttä ede4e9171f Spelling fixes 2017-02-15 17:00:58 +02:00
Ville Skyttä eeb6603d71 Python 3.6 invalid escape sequence deprecation fixes 2017-02-15 16:54:53 +02:00
Ronny Pfannschmidt 231e2f9a90 Merge pull request #2252 from nicoddemus/fixture-visibility-docs
Improve pytest_plugins docs
2017-02-15 15:53:30 +01:00
Bruno Oliveira c4d974460c Improve pytest_plugins docs
As discussed in #2246
2017-02-15 11:57:03 -02:00
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