Miro Hrončok
1680eeb3a3
Tests: Check for ModuleNotFoundError on Python 3.6+
...
Those tests originally checked for ImportError. Since Python 3.6
ModuleNotFoundError is raised in this context instead, the tests didn't work
as they are text based (so exception inheritance does not save the day).
Fixes https://github.com/pytest-dev/pytest/issues/2132
2016-12-27 23:15:12 +01:00
Andreas Pelme
0bb8a4a36d
Fixed #2148 - parse directory names properly when args contains ::.
...
This commit also improves readbility in get_dirs_from_args by using self
documenting local functions.
get_dirs_from_args also now only returns directories that actually exists,
and not files to avoid confusion.
This commit also removes redundant checks in get_common_ancestor that
was already performed in get_dirs_from_args..
2016-12-27 15:28:56 +01:00
Bruno Oliveira
f7a1d369c3
Allow trial environments to fail on CI for now
...
While I agree this is *far* from ideal, IMHO It is better to ignore them for now otherwise we hamper contributors with unrelated errors.
We should fix this before the next release.
#1989
2016-12-26 21:47:50 -02:00
Bruno Oliveira
316406291d
Merge pull request #2150 from lesteve/add-caught-warnings-info-when-warns-fail
...
Improve error message when pytest.warns fail
2016-12-26 21:42:15 -02:00
Bruno Oliveira
a27c824fd0
Merge pull request #2146 from lwm/minor-docs-fixup
...
Fix fixture/parametrize override example.
2016-12-26 20:13:00 -02:00
Bruno Oliveira
fc74eb332b
Merge pull request #2128 from nicoddemus/pytest-m
...
Mention that Python also adds CWD to sys.path using python -m
2016-12-26 20:11:59 -02:00
Loïc Estève
bfada968d3
Update AUTHORS and CHANGELOG.rst
...
following contribution guidelines
2016-12-20 14:36:10 +01:00
Loïc Estève
c5f0b751f4
Improve error message when pytest.warns fail
...
The error message contains the expected type of warnings and the
warnings that were captured. Add tests.
2016-12-20 13:45:39 +01:00
Luke Murphy
f94189b48b
Fix wrong fixture name. Closes #2143 .
2016-12-20 01:48:32 +01:00
Stefan Scherfke
3f5edc705a
Explicitly add setuptools to install_requires
...
Setuptools is used in `_pytest/config.py` but was not explicitly listed as requirement. This led to an error when creating a Conda package for pytest since setuptools is not necessarily installed by default in Conda envs.
2016-12-19 13:22:25 +01:00
Bruno Oliveira
caee5ce489
Avoid importing asyncio directly because that in turn initializes logging ( #8 )
2016-12-13 21:54:20 -02:00
Bruno Oliveira
1312b83866
Add CHANGELOG entry for #2129
2016-12-13 21:33:01 -02:00
Bruno Oliveira
45eb9b566c
Move compat tests to a single file using testdir
...
This avoids having to resort to skipping modules in conftest.py file and avoids flake8 errors
2016-12-13 21:28:07 -02:00
Dmitry Malinovsky
3a59acf69f
Use inspect to properly detect generators. Fixes #2129
2016-12-11 21:59:11 +06:00
Bruno Oliveira
81c9bdcd0b
Mention that Python also adds CWD to sys.path using python -m
2016-12-10 16:55:04 -02:00
Bruno Oliveira
da40bcf97f
Merge pull request #2119 from nicoddemus/changelog-dates
...
Add release dates to CHANGELOG entries
2016-12-08 19:49:22 -02:00
Bruno Oliveira
a4a30ae4a2
Merge pull request #2123 from oscarh/documentation-issue-687
...
Also update yield teardown for Issue #687
2016-12-07 12:46:43 -02:00
Oscar Hellström
f42a954cb3
Also update yield teardown for Issue #687
2016-12-07 15:08:38 +01:00
Ronny Pfannschmidt
9c285dfc1d
fix #2118 - rework Node._getcustomclass and Node compat properties
2016-12-06 09:13:25 +01:00
Bruno Oliveira
8afca5d0fa
Add release dates to CHANGELOG entry
...
Fix #721
2016-12-05 17:21:01 -02:00
Bruno Oliveira
3a0a1d2de3
Bump version to 3.0.6.dev0
2016-12-05 12:51:00 -02:00
Bruno Oliveira
6a52afc8c9
Merge pull request #2116 from nicoddemus/release-3.0.5
...
Release 3.0.5
2016-12-05 12:42:32 -02:00
Bruno Oliveira
f592c7746a
Regendocs for 3.0.5
2016-12-05 07:22:06 -05:00
Bruno Oliveira
31f114e51f
Add release announcement for 3.0.5
2016-12-05 10:19:27 -02:00
Bruno Oliveira
833acb9d3c
Finalize CHANGELOG for 3.0.5
2016-12-05 10:07:37 -02:00
Bruno Oliveira
0febd855e1
Bump version to 3.0.5
2016-12-05 10:06:58 -02:00
Ronny Pfannschmidt
3c81f83602
Merge pull request #2113 from nicoddemus/approx-repr-unicode
...
Use a simple ``+-`` ASCII string in the string representation of pytest.approx In Python 2
2016-12-05 13:02:07 +01:00
Bruno Oliveira
57c4489916
Use a simple ``+-`` ASCII string in the string representation of pytest.approx In Python 2
...
Fix #2111
2016-12-02 20:01:53 -02:00
Bruno Oliveira
5365f7c9ca
Merge pull request #2112 from ismail-s/patch-1
...
Fix minor typo
2016-12-02 14:12:06 -02:00
Ismail
1f0401ab62
Fix minor typo
2016-12-02 15:09:38 +00:00
Bruno Oliveira
7480342710
Fix typo in docstring of register_assert_rewrite
2016-12-02 09:22:47 -02:00
Bruno Oliveira
db62f160e1
Merge pull request #2073 from nicoddemus/fix-hookproxy-cache
...
Remove hook proxy cache
2016-12-02 09:07:20 -02:00
Bruno Oliveira
81528ea81f
Remove hook proxy cache
...
Fix #2016
2016-12-02 07:32:11 -02:00
Ronny Pfannschmidt
64193add91
Merge pull request #2110 from nicoddemus/rewrite-warning-pytest-plugins
...
Fix false-positive assert rewrite warnings when using 'pytest_plugins'
2016-12-01 20:33:38 +01:00
Bruno Oliveira
bc0f7e6243
Fix false-positive assert rewrite warnings when using 'pytest_plugins'
...
pytest would emit false positive warnings about assertion-rewrite when a
module appears multiple times in plugins which depend
on other plugins using the 'pytest_plugins' mechanism
2016-12-01 15:50:08 -02:00
Ronny Pfannschmidt
9ed3d76b51
Merge pull request #2108 from lwm/exp-2105
...
Add warning for incorrect passing args to `-o`.
2016-12-01 13:49:24 +01:00
Luke Murphy
c856537e71
Add warning for incorrect passing args to `-o`.
2016-12-01 13:20:42 +01:00
Ronny Pfannschmidt
e612619aea
Merge pull request #2106 from nicoddemus/sys-modules-none
...
Remove support code for earlier Python 3 version in Source.compile
2016-12-01 10:22:32 +01:00
Bruno Oliveira
30f0152ae6
Remove unused import
2016-11-30 22:34:02 -02:00
Bruno Oliveira
f8d195253e
Remove support code for earlier Python 3 version in Source.compile
...
This code leaves None in sys.modules as a side effect but is no longer needed in the Python 3 versions we support.
Fix #2103
2016-11-30 22:23:02 -02:00
Bruno Oliveira
669332b7e0
Merge pull request #2101 from wheerd/doctest-encoding
...
Added doctest encoding command line option
2016-11-30 17:43:42 -02:00
Florian Bruhin
9c224c94f0
Merge pull request #2099 from lwm/fixup-2007
...
Add missing `__test__` check for discovery
2016-11-30 20:23:40 +01:00
Wheerd
2edfc805af
Added "versionadded" for doctest_encoding ini option to docs.
2016-11-30 18:01:00 +01:00
Luke Murphy
f5afd8cb54
Add missing `__test__` check for test discovery.
2016-11-30 17:05:42 +01:00
Manuel Krebber
f8fef07b4c
Fixed the tests for python 2.6
2016-11-30 14:19:07 +01:00
Manuel Krebber
b7fb9fac91
Fixed the documentation for doctest_encoding.
2016-11-30 14:17:54 +01:00
Manuel Krebber
1f62e5b5a0
Added CHANGELOG entry and myself to AUTHORS.
2016-11-30 11:50:11 +01:00
Manuel Krebber
c043bbb854
Changed the doctest_encoding option to an ini option.
...
Parametrized the tests for it.
2016-11-30 11:43:33 +01:00
Manuel Krebber
929912de29
Changed the tests to pass on python 2 as well.
2016-11-29 14:51:17 +01:00
Manuel Krebber
d254c6b0ae
Added some tests for --docstring-encoding option. Added option to specify encoding for internal testdir._makefile() for the tests.
2016-11-29 12:29:16 +01:00