Commit Graph

118 Commits

Author SHA1 Message Date
Dirk Thomas ce8c829945 add test for #2824 2017-10-11 09:41:18 -07:00
hugovk ef732fc51d Remove code for unsupported Python versions 2017-10-10 08:54:56 +03:00
Srinivas Reddy Thatiparthy a0101f024e remove os.sep as it behaves differently linux and windows.
* on linux it is '/'

* on windows it is '\'
2017-08-05 23:21:43 +05:30
Andras Tim 45ac863069 Fixed E401 flake8 errors
multiple imports on one line
2017-07-17 01:44:23 +02:00
Andras Tim 7248b759e8 Fixed E303 flake8 errors
too many blank lines (3)
2017-07-17 01:44:23 +02:00
Andras Tim b840622819 Fixed E302 flake8 errors
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim 4730c6d99d Fixed E272 flake8 errors
multiple spaces before keyword
2017-07-17 01:44:23 +02:00
Andras Tim b226454582 Fixed E251 flake8 errors
unexpected spaces around keyword / parameter equals
2017-07-17 01:44:22 +02:00
Andras Tim 617e510b6e Fixed E231 flake8 errors
missing whitespace after ‘,’, ‘;’, or ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim cf97159009 Fixed E128 flake8 errors
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim 6af2abdb53 Fixed flake8 warnings
W191 indentation contains tabs
W292 no newline at end of file
W293 blank line contains whitespace
W391 blank line at end of file
2017-07-17 01:28:16 +02:00
Bruno Oliveira fa56114115 Clean up warnings generated by pytest's own suite 2017-03-20 22:13:17 -03:00
Bruno Oliveira 9f85584656 Merge remote-tracking branch 'upstream/features' into integrate-pytest-warnings 2017-03-20 19:59:05 -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 78194093af Improve warning representation in terminal plugin and fix tests 2017-03-16 21:57:32 -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 1e0cf5ce4d Merge remote-tracking branch 'upstream/master' into merge-master-into-features
# Conflicts:
#	AUTHORS
#	CHANGELOG.rst
#	_pytest/pytester.py
2017-03-10 15:54:05 -03:00
fbjorn cee578e327 Fix trailing whitespace in terminal output 2017-03-05 23:20:55 +03:00
Michal Wajszczuk fb0b90646e New-style classes implemented for python 2.7 - #2147 2017-02-16 20:28:17 +01: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 7cd7c283dd Refactor plugin specs handling into an isolated function 2017-01-12 14:31:35 -02: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
Luke Murphy c856537e71 Add warning for incorrect passing args to `-o`. 2016-12-01 13:20:42 +01:00
Bruno Oliveira 629d8e9fd6 Show an error if --confcutdir is not a valid directory
Fixes #2078
2016-11-23 09:49:11 -02:00
Bruno Oliveira 1eb5a690d4 Fix flake8 E305 and E306 errors
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Bruno Oliveira 463e6572c5 Merge branch 'master' into merge-master-into-features
Preparing for 3.0
2016-08-17 22:39:23 -03:00
Bruno Oliveira 224ef67374 Quick fix for tests in config depended on the current directory
When running those tests from pytest's root folder, they would
fail because they would end up picking pytest's own pytest.ini
2016-08-17 21:32:05 -03:00
Bruno Oliveira ab86dea529 Support [tool:pytest] in setup.cfg files
Also deprecate [pytest] usage in setup.cfg files

Fix #567
2016-08-17 08:19:38 -03:00
Daniel Hahler 16cb5d01b1 Fix off-by-one error with lines from request.node.warn
The line numbers in `node.location` seem to be zero-based?!
2016-08-14 22:10:01 +02:00
Bruno Oliveira 802755ceed Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2016-08-06 17:58:17 -03:00
Daniel Hahler a2891420de Fix determining rootdir from common_ancestor 2016-08-06 19:35:40 +02:00
Daniel Hahler 5c5d7e05f7 Followup to #1718: style/formatting 2016-07-24 00:21:42 +02:00
Floris Bruynooghe 24fbbbef1f Merge pull request #1641 from flub/rewrite-plugins
Rewrite plugins
2016-07-14 19:39:15 +01:00
Floris Bruynooghe 51ee7f8734 Fixup things after rebase
Some changes to make things work on top of current features branch.
2016-07-14 12:42:29 +01:00
Bruno Oliveira 1266ebec83 Merge remote-tracking branch 'upstream/features' into warnings-displayed-by-default
# Conflicts:
#	CHANGELOG.rst
#	testing/test_terminal.py
2016-07-13 18:45:15 -03:00
Floris Bruynooghe a98e3cefc5 Enable re-writing of setuptools-installed plugins
Hook up the PEP 302 import hook very early in pytest startup so
that it gets installed before setuptools-installed plugins are
imported.  Also iterate over all installed plugins and mark them
for rewriting.  If an installed plugin is already imported then
a warning is issued, we can not break since that might break
existing plugins and the fallback will still be gracefull to
plain asserts.

Some existing tests are failing in this commit because of the new
warning triggered by inline pytest runs due to the hypothesis
plugin already being imported.  The tests will be fixed in the next
commit.
2016-07-13 17:29:19 +01:00
Ronny Pfannschmidt b9a91dc112 merge from master to features 2016-07-06 11:51:48 +02:00
aostr 94e4a2dd67 * implemented changes recommended by nicoddemus 2016-07-05 15:22:27 +02:00
RedBeardCode 0e2ebc96ff Remove deprecated cmd options
Fixes #1657
2016-06-26 19:26:04 +02:00
aostr e04d9ff80b * now showing pytest warnings summary by default.
* added ``--disable-pytest-warnings` flag to let users disable the warnings summary.
* extended/changed unit tests for the changes in the pytest core.
2016-06-25 18:16:13 +02:00
Ted Xiao 856e6cab75 add --override-ini option to overrides ini values
Signed-off-by: Ted Xiao <xiao.xj@gmail.com>
2016-06-25 23:45:32 +08:00
Florian Bruhin 757f37f445 Don't ignore ImportError with setuptools plugins
This was added in b2d66b9e7b but is a bad
idea. When a plugin can't be imported, commandline options (optionally
set in pytest.ini) could be undefined, which means pytest bails out
much earlier before showing the warning, which is hard to debug.

Fixes #1479, also see #1307 and #1497
2016-06-25 09:56:22 +02:00
Bruno Oliveira 4350f499b2 Merge branch 'issue1629' of https://github.com/davehunt/pytest into features 2016-06-21 18:37:14 +02:00
Dave Hunt ef9dd14963 Introduce pytest command as recommended entry point
Fixes #1629
2016-06-21 16:16:57 +02:00
Bruno Oliveira 3a81d2e012 conftest files now use assertion rewriting
Fix #1619
2016-06-20 23:13:29 +02:00
MengJueM 1a37035d71 Add test test_absolute_win32_path 2016-04-20 01:27:37 +08:00
Bruno Oliveira a965386b9e Add bool type to addini 2016-02-14 20:52:27 -02:00
Bruno Oliveira a912d3745b Moved py.code code over to py.test
Fix #103
2016-01-25 23:18:04 -02:00
Buck Golemon 67236d6de3 strengthen the ini assertion 2015-10-09 09:58:12 -07:00