Commit Graph

6225 Commits

Author SHA1 Message Date
Ronny Pfannschmidt 31e6fe8f52 HOWTORELEASE.tst: use restructuredtext autonumbering 2017-04-19 19:40:42 +02:00
Ronny Pfannschmidt c3aee4b1e6 second take at setuptools_scm
since setuptools 18.6 fixes the issues with develop installs

https://github.com/pypa/setuptools/blob/master/CHANGES.rst#186

https://github.com/pypa/setuptools/issues/439
2017-04-19 19:40:42 +02:00
Ronny Pfannschmidt 80cabca21a Merge pull request #2292 from nicoddemus/defer-hook-checking
Verify hooks after collection completes
2017-04-19 13:04:03 +02:00
Bruno Oliveira cac82e71d8 Improve item.warn handling of fslocation parameter
Just pass fslocation forward and let the hook implementer decide what to do with the parameter
2017-04-13 19:01:14 -03:00
Bruno Oliveira d9a2e70155 Change LsofFdLeakChecker to emit a warning instead of failing when detecting leaked FDs
Related to #2366
2017-04-13 17:34:48 -03:00
Bruno Oliveira 731776702d Fix hook name in LsofFdLeakChecker 2017-04-11 21:55:12 -03:00
Bruno Oliveira 0baf5e1499 Fix test that expected "unknown hook" error on stderr 2017-04-11 21:55:12 -03:00
Bruno Oliveira 83c508eea3 Verify hooks after collection completes
Fix #1821
2017-04-11 21:55:12 -03:00
Bruno Oliveira 78ac1bf5d1 Merge pull request #2350 from nicoddemus/future-imports-rewrite
Ensure rewritten modules don't inherit __future__ flags from pytest
2017-04-11 20:59:05 -03:00
Bruno Oliveira 02da278894 Merge pull request #2357 from ojii/lastfailed-failedfirst
Changed behavior if --lf and --ff are both used.
2017-04-11 19:05:01 -03:00
Bruno Oliveira 1125786e78 Improve --lf/--ff test as commented during review 2017-04-11 17:55:55 -03:00
Jonas Obrist 08d83a5c6a updated changelog and authors files 2017-04-10 17:50:18 +09:00
Jonas Obrist 0ab85e7a9c Changed behavior if --lf and --ff are both used.
When using both --last-failed/--lf and --failed-first/--ff pytest would
run all tests with failed tests first (as if --lf was not provied). This
patch changes it so that when using both flags, only the last failed
tests are run. This makes it easier to set --ff as the default behavior
via the config file and then selectively use --lf to only run the last
failed tests.
2017-04-10 17:46:13 +09:00
Bruno Oliveira 1b5f898dc5 Ensure rewritten modules don't inherit __future__ flags from pytest
In a recent refactoring we enabled all __future__ features in pytest
modules, but that has the unwanted side effect of propagating those
features to compile()'d modules inside assertion rewriting, unless
we pass dont_inherit=False to compile().
2017-04-06 15:00:36 -03:00
Ronny Pfannschmidt 83b241b449 Merge pull request #2347 from reutsharabani/features
added option to unicode plugin name
2017-04-06 18:16:20 +02:00
Bruno Oliveira 24ac923938 Add CHANGELOG entry 2017-04-06 12:42:17 -03:00
reut 333ce9849d added acceptance test for unicode plugin names 2017-04-06 10:54:47 +00:00
reut 417b54abed added option to unicode plugin name 2017-04-05 13:03:11 +00:00
Ronny Pfannschmidt 2a130daae6 Merge pull request #2072 from nicoddemus/integrate-pytest-warnings
Integrate pytest warnings
2017-03-22 17:10:04 +01:00
Bruno Oliveira 0c1c2580d0 Add CHANGELOG entry 2017-03-22 12:40:31 -03:00
Bruno Oliveira 74b54ac0ec Fix errors related to warnings raised on pypy test environment
For some reason pypy raises this warning in the line that the catch_warnings block was added:

______________________________ ERROR collecting  ______________________________
C:\ProgramData\chocolatey\lib\python.pypy\tools\pypy2-v5.4.1-win32\lib-python\2.7\pkgutil.py:476: in find_loader
    loader = importer.find_module(fullname)
c:\pytest\.tox\pypy\site-packages\_pytest\assertion\rewrite.py:75: in find_module
    fd, fn, desc = imp.find_module(lastname, path)
<builtin>/?:3: in anonymous
    ???
E   ImportWarning: Not importing directory 'c:\users\bruno\appdata\local\temp\pytest-of-Bruno\pytest-3192\testdir\test_cmdline_python_package0' missing __init__.py
2017-03-21 22:32:41 -03:00
Bruno Oliveira 2c730743f1 Fix errors related to warnings raised by xdist
- pytester was creating a 'pexpect' directory to serve as temporary dir, but due to the fact that
   xdist adds the current directory to sys.path, that directory was being considered as candidate
   for import as a package. The directory is empty and a warning was being raised about
   it missing __init__ file, which is now turned into an error by our filterwarnings config
   in pytest.ini.

- Decided to play it safe and ignore any warnings during `pytest.importorskip`.

- pytest-xdist and execnet raise two warnings which should be fixed upstream:
   pytest-dev/pytest-xdist/issues/133
2017-03-21 22:17:07 -03:00
Bruno Oliveira 916d272c44 Fix test on linux 2017-03-20 23:44:50 -03:00
Bruno Oliveira eabe3eed6b Add docs for the warnings functionality 2017-03-20 23:35:01 -03:00
Bruno Oliveira fa56114115 Clean up warnings generated by pytest's own suite 2017-03-20 22:13:17 -03:00
Bruno Oliveira d027f760c0 Avoid displaying the same warning multiple times for an item 2017-03-20 20:40:53 -03:00
Bruno Oliveira 3373e02eae Add __future__ imports to warnings module 2017-03-20 20:06:01 -03:00
Bruno Oliveira 9f85584656 Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings 2017-03-20 19:59:05 -03:00
Florian Bruhin de8607deb2 Merge pull request #1921 from RonnyPfannschmidt/marked-value
introduce pytest.Marked as holder for marked parameter values
2017-03-20 10:54:12 +01:00
Ronny Pfannschmidt e8a1b36c82 add changelog 2017-03-20 10:21:47 +01:00
Ronny Pfannschmidt e368fb4b29 implement pytest.param
this allows a clear addition of parameterization parameters that carry along marks
instead of nesting multiple mark objects and destroying the possibility of creating
function valued parameters,
it just folders everything together into one object carrfying parameters, and the marks.
2017-03-17 16:53:43 +01:00
Ronny Pfannschmidt a122ae85e9 Merge pull request #2316 from nicoddemus/add-future-imports
Add __future__ imports to all pytest modules
2017-03-17 13:41:46 +01:00
Bruno Oliveira 4d947077bb Fix test in py26 that expected a floor division error message 2017-03-16 23:07:03 -03:00
Bruno Oliveira e5021dc9dc Replace py.builtin.print_() calls by builtin print() function 2017-03-16 22:46:51 -03:00
Bruno Oliveira 42a5d6bdfa Add __future__ imports to all pytest modules
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Bruno Oliveira 7684b3af7b Recommend using py36 for testing on CONTRIBUTING 2017-03-16 22:20:38 -03:00
Bruno Oliveira 78194093af Improve warning representation in terminal plugin and fix tests 2017-03-16 21:57:32 -03:00
Bruno Oliveira be5db6fa22 Capture warnings around the entire runtestprotocol
This is necessary for the warnings plugin to play nice with the
recwarn fixture
2017-03-16 21:54:41 -03:00
Bruno Oliveira 0baed781fe Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings 2017-03-16 20:02:06 -03:00
Bruno Oliveira 337f891d78 Fixed tests 2017-03-16 20:01:47 -03:00
Bruno Oliveira 5482dfe0f3 Merge pull request #2303 from nicoddemus/recwarn-refactor
Refactor recwarn to use warnings.catch_warnings instead of custom code
2017-03-15 12:27:31 -03:00
Bruno Oliveira 55b891ddd0 Merge pull request #2312 from nicoddemus/merge-master-into-features-post-3.0.7
Merge master into features post 3.0.7
2017-03-14 23:26:43 -03:00
Bruno Oliveira 6c9011c12f Merge branch 'master' into merge-master-into-features-post-3.0.7 2017-03-14 18:10:23 -03:00
Bruno Oliveira fa15ae7545 Post 3.0.7 release handling 2017-03-14 18:07:44 -03:00
Bruno Oliveira 5056d8cbe8 Merge pull request #2304 from nicoddemus/release-3.0.7
Release 3.0.7
2017-03-14 18:03:44 -03:00
Ronny Pfannschmidt 5e52a4dda4 Merge pull request #2307 from nicoddemus/clarify-record-xml-property
Clarify that record_xml_property is experimental, not junitxml
2017-03-14 09:39:12 +01:00
Bruno Oliveira 92b49d246e Clarify that record_xml_property is experimental, not junitxml
Related to #2306
2017-03-13 23:04:44 -03:00
Bruno Oliveira 90c934e25e Include release 3.0.7 announce in index.rst 2017-03-13 18:59:15 -04:00
Bruno Oliveira 3c07072bfd Fix test_recwarn in Python 3.6
No longer test for implementation details of recwarn since warnings.catch_warnings has changed
significantly in 3.6.
2017-03-13 19:52:35 -03:00
Bruno Oliveira d58780f9a6 Update regendoc 2017-03-13 18:41:20 -04:00