Ronny Pfannschmidt
3e08c4ee64
sort out flake8 issues and unicode name usage
2018-05-23 18:12:04 +02:00
Ronny Pfannschmidt
703e4b11ba
run black
2018-05-23 16:48:46 +02:00
Miro Hrončok
5072226f69
Import Mapping and Sequence from compat in python_api::approx
...
Related to https://github.com/pytest-dev/pytest/issues/3339
Fixes a DeprecationWarning on Python 3.7
Adds Mapping to compat
2018-05-22 22:25:15 +02:00
Ville Skyttä
aa51fcb2b6
Spelling and grammar fixes
2018-05-13 12:06:09 +02:00
Brian Maissy
857098fe0f
added indicative error when parametrizing an argument with a default value
2018-04-15 20:52:57 +03:00
Bruno Oliveira
3fc2c94b5e
Switch imports based on python versions, my bad
2018-03-29 23:15:03 -03:00
Bruno Oliveira
8ca9321940
Move compatibility imports to compat.py and fix linting
2018-03-29 19:02:35 -03:00
Marcin Bachry
b6166dccb4
Fix mock patchings detection when both mock and unittest.mock are present
2018-02-12 20:29:37 +01:00
Bruno Oliveira
4e581b637f
Use zip and map from six
2017-10-24 22:13:32 -02:00
Bruno Oliveira
6b86b0dbfe
Fix additional linting issues
2017-10-24 21:01:00 -02:00
Ceridwen
3da28067f3
Replace introspection in compat.getfuncargnames() with inspect/funcsigs.signature
2017-10-19 16:01:26 -07:00
Ronny Pfannschmidt
c486598440
remove some support code for old python versions
2017-10-09 17:25:13 +02:00
Bruno Oliveira
df6d5cd4e7
Use ascii_escaped to escape unicode warnings
2017-10-03 12:19:37 -03:00
Bruno Oliveira
9273e11f21
Merge branch 'master' into features
2017-09-07 13:59:10 -03:00
Ronny Pfannschmidt
ad36407747
Merge pull request #2700 from nicoddemus/staticmethods-fixtures
...
Allow tests declared as @staticmethod to use fixtures
2017-09-06 08:24:00 +02:00
Bruno Oliveira
e1f2254fc2
Merge pull request #2734 from RonnyPfannschmidt/simplify-string-safening
...
simplyfy ascii escaping by using backslashreplace error handling
2017-09-05 21:14:27 -03:00
Bruno Oliveira
1fc185b640
Add comment about possible future refactoring in the fixture mechanism
2017-09-05 19:28:39 -03:00
Ronny Pfannschmidt
13eac944ae
restore ascii escaping for python 3.3/3.4
2017-09-04 21:25:46 +02:00
Ronny Pfannschmidt
78a027e128
simplyfy ascii escaping by using backslashreplace error handling
2017-08-30 16:43:16 +02:00
Kirill Pinchuk
12b1bff6c5
`compat.safe_getattr` now catches OutcomeExceptions too
2017-08-23 17:17:03 +03:00
Bruno Oliveira
a993add783
Allow tests declared as @staticmethod to use fixtures
...
Fix #2699
2017-08-17 20:44:19 -03:00
Bruno Oliveira
abb5d20841
Merge branch 'master' into features
2017-07-20 22:10:58 -03:00
Bruno Oliveira
da12c52347
Fix: do not load hypothesis during test_logging_initialized_in_test
...
A recent release seem to have added a "logging" import to the top-level,
which breaks test_logging_initialized_in_test
2017-07-20 21:43:24 -03:00
Floris Bruynooghe
56e6b4b501
Merge pull request #2578 from Llandy3d/2375
...
Provides encoding attribute on CaptureIO
2017-07-20 23:14:14 +02:00
Bruno Oliveira
4fd92ef9ba
Merge branch 'fix-flake8-issues' into features
2017-07-17 21:05:39 -03: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
c9a081d1a3
Fixed E271 flake8 errors
...
multiple spaces after keyword
2017-07-17 01:44:22 +02:00
Andras Tim
195a816522
Fixed E265 flake8 errors
...
block comment should start with ‘# ‘
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
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
Llandy Riveron Del Risco
ba9a76fdb3
Provides encoding attribute on CaptureIO
...
Fix #2375
2017-07-16 14:29:00 +02:00
Bruno Oliveira
d9aaab7ab2
Merge remote-tracking branch 'upstream/master' into features
2017-07-10 17:51:59 -03:00
John Still
80595115b0
replace all _escape_strings to _ascii_escaped
2017-07-10 12:32:27 -05:00
Kale Kundert
8badb47db6
Implement suggestions from code review.
...
- Avoid importing numpy unless necessary.
- Mention numpy arrays and dictionaries in the docs.
- Add numpy to the list of tox dependencies.
- Don't unnecessarily copy arrays or allocate empty space for them.
- Use code from compat.py rather than writing py2/3 versions of things
myself.
- Avoid reimplementing __repr__ for built-in types.
- Add an option to consider NaN == NaN, because sometimes people use NaN
to mean "missing data".
2017-06-15 09:19:10 -07:00
wanghui
d7a5c5716f
Add UnicodeWarning for unicode warnings in Python2
2017-05-26 13:12:02 +08: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
Michael Howitz
7d4ac14a31
Fix #2343 : Replace version checks by constants.
...
This way they do not have to be recomputed at runtime.
2017-04-12 08:18:09 +02:00
Bruno Oliveira
a542ed48a2
Convert using utf-8 instead of ascii in safe_str()
...
This way we don't lose information and the returned string is
ascii-compatible anyway
2017-03-29 15:18:41 -03:00
Bruno Oliveira
58ac4faf0c
Fix exception formatting while importing test modules
...
Fix #2336
2017-03-29 14:43:13 -03:00
Ronny Pfannschmidt
92f6ab1881
fix all singular internal module imports and add a test for them
2017-03-28 11:45:06 +02:00
Ronny Pfannschmidt
9b58d6eaca
prepare a own pytest.collect fake module in oder to remove the nested builtin namespaces
2017-03-28 11:45:06 +02: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
Anthony Sottile
6ba3475448
Make capsys more like stdio streams in python3. Resolves #1407 .
2017-02-23 17:46:27 -08:00
Ronny Pfannschmidt
250597d468
get_real_func: use saferepr when formatting the error message
2017-01-19 13:05:58 +01:00
Ronny Pfannschmidt
123289a88e
fixes #2208 by introducing a iteration limit
2017-01-19 11:38:15 +01:00
Bruno Oliveira
402fbe503a
Merge branch 'master' into merge-master-into-features
2016-12-27 23:31:26 -02:00
Bruno Oliveira
091148f843
Merge pull request #2136 from hroncok/i2132
...
Tests: Check for ModuleNotFoundError on Python 3.6+
2016-12-27 23:10:58 -02:00