Bruno Oliveira
1deac2e210
Properly escape test names when setting PYTEST_CURRENT_TEST environment variable
...
Fix #2644
2017-08-01 20:52:37 -03:00
Andras Tim
50764d9ebb
Avoid interactive pdb when pytest tests itself - fix #2023
...
The debugging.py calls post_mortem() on error and pdb will drops an
interactive debugger when the stdin is a readable fd.
2017-07-21 21:29:03 +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
17a21d540b
Fixed E301 flake8 errors
...
expected 1 blank line, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
195a816522
Fixed E265 flake8 errors
...
block comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim
8f3eb6dfc7
Fixed E261 flake8 errors
...
at least two spaces before inline comment
2017-07-17 01:44:22 +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
4c24947785
Fixed E241 flake8 errors
...
multiple spaces after ‘,’
2017-07-17 01:44:22 +02:00
Andras Tim
4b22f270a3
Fixed E226 flake8 errors
...
missing whitespace around arithmetic operator
2017-07-17 01:44:22 +02:00
Andras Tim
2e8caefcab
Fixed E225 flake8 errors
...
missing whitespace around operator
2017-07-17 01:44:22 +02:00
Andras Tim
f640e0cb04
Fixed E221 flake8 errors
...
multiple spaces before operator
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
57438f3efe
Fixed E127 flake8 errors
...
continuation line over-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim
e855a79dd4
Fixed E126 flake8 errors
...
continuation line over-indented for hanging indent
2017-07-17 01:28:16 +02:00
Andras Tim
92e2cd9c68
Fixed E125 flake8 errors
...
continuation line with same indent as next logical line
2017-07-17 01:28:16 +02:00
Andras Tim
6146ac97d9
Fixed E101 flake8 errors
...
indentation contains mixed spaces and tabs
2017-07-17 01:28:16 +02:00
Bruno Oliveira
d86c89e193
Revert refactor of old-style to new-style classes
...
As discussed in the mailing list, unfortunately this might break APIs
due to the subtle differences between new and old-style classes (see #2398 ).
This reverts commit d4afa1554b
from PR #2179 .
2017-05-17 18:20:51 -03:00
Bruno Oliveira
f3b359f5b8
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
...
# Conflicts:
# _pytest/capture.py
# _pytest/compat.py
# _pytest/python.py
# testing/python/collect.py
# testing/test_mark.py
2017-05-03 19:04:53 -03:00
Bruno Oliveira
630cca2fba
Fix py35-trial environment
...
After updating to twisted 17.1.0, again the trial tests started to fail; didn't investigate too deep, decided to just
no longer delete "zope" modules when cleaning up after pytester because it seems more zope modules keep
global state that shouldn't be discarded
2017-05-02 21:05:42 -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
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
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
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
Anthony Sottile
8b598f00e9
Make pytester use pytest's capture implementation
2017-02-23 17:46:28 -08:00
Bruno Oliveira
9c809f5ad0
Merge pull request #2255 from scop/spelling
...
Spelling fixes
2017-02-15 18:41:49 -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
713bdc1f9f
merge master into features
2017-01-26 12:00:52 +01:00
Bruno Oliveira
3766060893
Merge branch 'master' into trial-envs
2017-01-20 08:37:34 -02:00
Bruno Oliveira
2574da8d32
Fix pytester internal plugin to work correctly with latest versions of zope.interface
...
Fix #1989
2017-01-19 20:53:35 -02:00
Eli Boyarski
e18b2a427a
Fail assert_outcomes() on missing terminal report
...
Currently if the terminal report of testdir.runpytest() is missing,
assert_outcomes() on its output fails because parseoutcomes()
returns an unexpected value (None).
It's better to fail parseoutcomes() directly.
2017-01-11 17:09:37 +02:00
mandeep
d4afa1554b
Refactored old style classes to new style classes
2017-01-08 22:52:42 -06:00
Bruno Oliveira
402fbe503a
Merge branch 'master' into merge-master-into-features
2016-12-27 23:31:26 -02:00
Bruno Oliveira
81528ea81f
Remove hook proxy cache
...
Fix #2016
2016-12-02 07:32:11 -02: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
Bruno Oliveira
5ce551e469
Merge pull request #2075 from pytest-dev/master
...
Merge master into features after fixing flake8 errors
2016-11-22 14:10:31 -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
efc54b2e56
Merge branch 'master' into merge-master-features
2016-11-11 18:56:53 -02:00
Jason R. Coombs
f2c01c5407
Restore pexpect tests and bypass isalive/wait on macOS. Ref #2022 .
2016-10-21 12:36:42 -04:00
Ronny Pfannschmidt
e1674f60e7
remove memocollect anmd memoized_call
2016-09-05 14:41:28 +02:00
Bruno Oliveira
4c112401c5
Log LineMatcher output in a stream instead of stderr
...
This makes the match/nomatch output appear as part
of the fnmatch_lines() error on pytest's output instead
of globbered together with general stdout/stderr capture
2016-07-20 22:35:43 -03:00
Floris Bruynooghe
944da5b98a
Avoid rewrite warning for inline runs
...
When running pytest inline/inprocess we plugins have already been
imported and re-writen, so avoid the warning.
2016-07-13 17:29:19 +01:00
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
Ronny Pfannschmidt
083f64100d
merge master into features
2016-06-22 14:39:33 +02:00
Dave Hunt
ef9dd14963
Introduce pytest command as recommended entry point
...
Fixes #1629
2016-06-21 16:16:57 +02:00
Daniel Hahler
e53e45b55c
tests: getexecutable: call `--version` on all Pythons
...
This should prevent errors from pyenv:
pyenv: python2.6: command not found
The `python2.6' command exists in these Python versions:
2.6.9
While the pyenv wrapper explicitly returns 127, I think it is better to
just check for non-zero?!
2016-06-21 08:36:02 +02:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00