Andras Tim
b840622819
Fixed E302 flake8 errors
...
expected 2 blank lines, 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
617e510b6e
Fixed E231 flake8 errors
...
missing whitespace after ‘,’, ‘;’, or ‘:’
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
ba0a4d0b2e
Fixed E202 flake8 errors
...
whitespace before ‘)’
2017-07-17 01:28:17 +02:00
Andras Tim
df54bf0db5
Fixed E131 flake8 errors
...
continuation line unaligned for hanging 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
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
Omer Hadari
6a52fe1650
fixed internal error on unprintable raised AssertionErrors
2017-03-04 10:26:46 +02:00
Michal Wajszczuk
fb0b90646e
New-style classes implemented for python 2.7 - #2147
2017-02-16 20:28:17 +01:00
Ville Skyttä
ede4e9171f
Spelling fixes
2017-02-15 17:00:58 +02:00
Ronny Pfannschmidt
713bdc1f9f
merge master into features
2017-01-26 12:00:52 +01:00
Bruno Oliveira
c477f09177
Assert statements of the pytester plugin again benefit from assertion rewriting
...
Fix #1920
2017-01-19 21:33:51 -02: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
6876ba9ba6
Merge pull request #1995 from mattduck/feat/restructure-assert-truncation
...
Restructure truncation of assertion messages
2016-11-13 19:07:35 -02:00
Bruno Oliveira
efc54b2e56
Merge branch 'master' into merge-master-features
2016-11-11 18:56:53 -02:00
Bruno Oliveira
006a901b86
Properly handle exceptions in multiprocessing tasks
...
Fix #1984
2016-11-03 10:48:43 -02:00
Matthew Duck
acee88a118
Fix truncation tests: pyruntest() match
...
Fix issue with truncation tests for -vv and CI, where the test for
non-truncated output would return a positive match even on truncated output.
2016-10-16 20:54:51 +01:00
Matthew Duck
0061d9bd3d
Fix flake8 (unused import, trailng whitespace)
2016-10-11 00:17:15 +01:00
Matthew Duck
b629da424e
Restructure truncation of assertion messages
...
This addresses ref https://github.com/pytest-dev/pytest/issues/1954 .
The current truncation for assertion explanations does not deal with long lines
properly:
- Previously if lines were too long it would display a "-n more lines"
message.
- 999e7c6541
introduced a bug where long lines can
cause index errors if there are < 10 lines.
Extract the truncation logic into its own file and ensure it can deal with
long lines properly.
2016-10-10 23:38:27 +01:00
Bruno Oliveira
654af0ba25
Merge remote-tracking branch 'upstream/master' into features
2016-09-26 19:32:53 -03:00
Lev Maximov
8cba033bbb
added a test
2016-09-20 02:47:59 +07:00
Matthew Duck
dd64d823b9
Don't display dict common items if verbosity=1
...
Part one of https://github.com/pytest-dev/pytest/issues/1512 .
If verbosity=1, assertion explanations are truncated at 10 lines. In this
situation, it's more important to tell the user which dictionary items are
different than which are the same.
2016-09-19 15:27:28 +01:00
Bruno Oliveira
04cf5e1df4
Fixed assertion rewriting for plugins in development mode
...
Fix #1934
2016-09-14 21:59:33 -03:00
Bruno Oliveira
c8a366e551
Fix issue where pytest_plugins as string was marking wrong modules for rewrite
...
Fix #1888
2016-08-30 22:53:50 -03:00
Ahn Ki-Wook
856ad719d3
Fix UnicodeEncodeError when string comparison with unicode has failed.
2016-08-26 09:41:40 +09:00
Floris Bruynooghe
d1852a48b7
Remove assertion reinterpretation
...
The assertion reinterpretation is an old backwards compatibility
mode which was no longer being maintained on feature-parity with
the assertion rewriting mode. It was also responsible for some
dubious patching of builtins and test with side-effects would
suddenly start passing. Since re-writing has been the default for
a long time and plugins are now also re-written it is time to
retire reinterpretation.
2016-07-15 00:33:39 +01:00
Floris Bruynooghe
743f59afb2
Introduce pytest.register_assert_rewrite()
...
Plugins can now explicitly mark modules to be re-written. By default
only the modules containing the plugin entrypoint are re-written.
2016-07-13 17:31:09 +01: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
Bruno Oliveira
458ecae1df
Replace all usages of "pytest_funcarg__" for @pytest.fixture
2016-07-11 22:21:52 -03:00
Bruno Oliveira
5891061ac1
Merge pull request #1675 from kvas-it/issue-1562
...
Add warning for assertions on tuples #1562
2016-06-26 16:09:15 -03:00
RedBeardCode
0e2ebc96ff
Remove deprecated cmd options
...
Fixes #1657
2016-06-26 19:26:04 +02:00
Vasily Kuznetsov
6d4cee2159
Add a test for indirect use of tuple in the assert that should not cause a warning
2016-06-26 02:21:51 +02:00
Vasily Kuznetsov
c17027e576
Warn about asserts on tuples ( fixes #1562 )
2016-06-25 19:21:48 +02:00
Tom Viner
98adf204b2
issue 1553: Include terminal newlines in diffs
2016-06-22 09:50:15 +02:00
Marcin Biernat
1b431d6644
fix formatting utf-8 error explanation
2016-02-12 20:28:06 +01:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00
Florian Bruhin
3e5c9038ec
Always show full comparison output if on CI.
...
When you don't get enough information with a test running on a CI, it's quite
frustrating, for various reasons:
- It's more likely to be a flaky test, so you might not be able to reproduce
the failure.
- Passing -vv is quite bothersome (creating a temporary commit and reverting
it)
For those reasons, if something goes wrong on CI, it's good to have as much
information as possible.
2016-01-11 08:45:04 +01:00
Bruno Oliveira
af893aab26
Remove code related to support python <= 2.5
...
Fix #1226
2015-12-16 16:16:22 -02:00
Ronny Pfannschmidt
49c99a41ea
reencode non-ascii python2 assertion reprs, fixes #877
...
i decided against using a warning since the problem goes away with python3
the support code can be removed once we drop python2 in 10 years or so
2015-09-19 00:30:01 +02:00
Bruno Oliveira
dd7112d5ea
Show a few diff lines when truncating string diffs
...
Fix #934
2015-08-27 22:20:13 -03:00
holger krekel
ee40ea5f6d
Merge branch 'pytest-2.7'
...
Conflicts:
AUTHORS
_pytest/__init__.py
setup.py
testing/conftest.py
tox.ini
2015-06-23 16:49:05 +02:00