Victor Maryama
4db5488ed8
Now dependent on command line option.
2019-06-25 19:49:05 +02:00
Victor Maryama
cfbfa53f2b
Using pytester subprocess to avoid keeping references in the HookRecorder.
2019-06-25 17:46:56 +02:00
Victor Maryama
db50a975fd
Reverted leak fixture test.
2019-06-25 17:23:14 +02:00
Victor Maryama
81e3f3cf95
Black formatting
2019-06-25 10:41:11 +02:00
Victor Maryama
9a89783fbb
Assertion passed hook
2019-06-24 16:09:39 +02:00
Bruno Oliveira
b38a4e8e11
Fix stepwise crash when first collected module fails ( #5446 )
...
Fix stepwise crash when first collected module fails
2019-06-16 10:43:18 -03:00
Bruno Oliveira
689ce112e7
Small cleanups on _pytest.compat ( #5451 )
...
Small cleanups on _pytest.compat
2019-06-16 10:42:07 -03:00
Bruno Oliveira
87fc5a5455
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types' ( #5452 )
...
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
2019-06-16 10:41:40 -03:00
Bruno Oliveira
bbfc8d1501
conversion of exit codes to enum + exposure ( #5420 )
...
conversion of exit codes to enum + exposure
2019-06-16 10:41:18 -03:00
Daniel Hahler
cf27af734e
Merge pull request #5404 from Zac-HD/helpful-mock-unwrapper
...
Emit warning for broken object
2019-06-15 18:54:03 +02:00
Bruno Oliveira
43e8576ca3
Make pytest warnings show as from 'pytest' module instead of '_pytest.warning_types'
...
When we configure warnings as errors, users see error messages like this:
def test():
> warnings.warn(pytest.PytestWarning("some warning"))
E _pytest.warning_types.PytestWarning: some warning
This is a problem because suggests the user should use `_pytest.warning_types.PytestWarning` to configure
their warning filters, which is not nice.
This commit changes the message to:
def test():
> warnings.warn(pytest.PytestWarning("some warning"))
E pytest.PytestWarning: some warning
2019-06-15 11:48:34 -03:00
Bruno Oliveira
177af032d2
Remove unused/unneeded code
2019-06-15 10:45:16 -03:00
Ronny Pfannschmidt
2b92fee1c3
initial conversion of exit codes to enum
2019-06-15 06:48:00 +02:00
Bruno Oliveira
c94e9b6145
Fix test docstring
2019-06-13 23:10:13 -03:00
Bruno Oliveira
bc345ac980
Remove handling of collection errors by --sw
...
Since then pytest itself adopted the behavior of interrupting
the test session on collection errors, so --sw no longer needs
to handle this.
The --sw behavior seems have been implemented when pytest
would continue execution even if there were collection errors.
2019-06-13 17:19:36 -03:00
Bruno Oliveira
4cc05a657d
Fix --sw crash when first file in cmdline fails to collect
...
Fix #5444
2019-06-13 16:47:01 -03:00
Thomas Grainger
ad15efc7ea
add test for stepwise attribute error Refs: #5444
2019-06-13 12:39:49 +01:00
Bruno Oliveira
52780f39ce
Postpone removal of --result-log to pytest 6.0
...
As we did not provide an alternative yet, it is better to postpone
the actual removal until we have provided a suitable and stable
alternative.
Related to #4488
2019-06-12 08:26:11 -03:00
Zac-HD
c5a549b5bb
Emit warning for broken object
2019-06-09 22:17:40 +10:00
Bruno Oliveira
9f5c356784
Remove ExceptionInfo.__str__, falling back to __repr__ ( #5413 )
...
Remove ExceptionInfo.__str__, falling back to __repr__
2019-06-07 08:48:03 -03:00
Anthony Sottile
ccd87f9e80
small mypy fixes
2019-06-06 09:13:02 -07:00
Bruno Oliveira
65c2a81924
Remove ExceptionInfo.__str__, falling back to __repr__
...
Fix #5412
2019-06-06 12:20:32 -03:00
Bruno Oliveira
9f8b566ea9
Turn PytestDeprecationWarning into error ( #5410 )
...
Turn PytestDeprecationWarning into error
2019-06-05 22:20:14 -03:00
Bruno Oliveira
3656885d0d
Fix verbosity bug in --collect-only ( #5391 )
...
Fix verbosity bug in --collect-only
2019-06-05 20:47:59 -03:00
Thomas Hisch
577b0dffe7
Fix verbosity bug in --collect-only
2019-06-05 20:10:16 -03:00
Bruno Oliveira
8f5cb461a8
Turn PytestDeprecationWarning into error
...
Fix #5402
2019-06-05 19:02:52 -03:00
Daniel Hahler
aab5687093
tests: restore tracing function
...
Without this, `testing/test_pdb.py` (already without pexpect) will cause
missing test coverage afterwards (for the same process).
2019-06-05 11:26:48 +02:00
Anthony Sottile
be2be040f9
Clean up u' prefixes and py2 bytes conversions
2019-06-04 17:50:34 -07:00
Anthony Sottile
0f4992c223
Merge pull request #5393 from nicoddemus/unittest-self-5390
...
item.obj is again a bound method on TestCase function items
2019-06-04 17:48:48 -07:00
Bruno Oliveira
1f8fd421c4
item.obj is again a bound method on TestCase function items
...
Fix #5390
2019-06-04 20:22:49 -03:00
Bruno Oliveira
883db6a216
Add test for packages with broken metadata
...
Related to #5389
2019-06-04 17:04:15 -03:00
Anthony Sottile
1b381d5277
Revert "Unroll calls to any #5062 ( #5103 )"
...
This reverts commit 2b9ca34280
, reversing
changes made to 0a57124063
.
2019-06-03 08:42:03 -07:00
Anthony Sottile
2125d04501
Revert "Fix all() unroll for non-generators/non-list comprehensions ( #5360 )"
...
This reverts commit 733f43b02e
, reversing
changes made to e4fe41ebb7
.
2019-06-03 08:42:03 -07:00
Bruno Oliveira
ce78c9adef
Fix linting
2019-06-03 12:08:50 -03:00
Anthony Sottile
8292644015
Allow multiple positions for the SyntaxError in pypy3.6
2019-06-03 12:08:02 -03:00
Anthony Sottile
96fd44e040
Update line number for warning
2019-06-03 12:08:02 -03:00
Anthony Sottile
5dcf85c17e
manual: remove dependence on six
2019-06-03 12:08:02 -03:00
Anthony Sottile
c63320cc31
codecs.open / io.open
2019-06-03 12:08:02 -03:00
Anthony Sottile
4df529e5b9
Clean up __future__ and coding: in tests
2019-06-03 12:08:02 -03:00
Anthony Sottile
a91fe1fedd
pre-commit run pyupgrade --all-files
2019-06-03 12:08:02 -03:00
Anthony Sottile
3f1ec520fc
pre-commit run reorder-python-imports --all-files
2019-06-03 12:08:01 -03:00
Anthony Sottile
5034399d7a
pre-commit run fix-encoding-pragma --all-files
2019-06-03 12:08:01 -03:00
Thomas Hisch
ef053193b5
logging: Extend LEVELNAME_FMT_REGEX
2019-06-03 05:53:19 +02:00
Bruno Oliveira
4d49ba6529
Drop Python 2.7 and 3.4 support
...
* Update setup.py requires and classifiers
* Drop Python 2.7 and 3.4 from CI
* Update docs dropping 2.7 and 3.4 support
* Fix mock imports and remove tests related to pypi's mock module
* Add py27 and 34 support docs to the sidebar
* Remove usage of six from tmpdir
* Remove six.PY* code blocks
* Remove sys.version_info related code
* Cleanup compat
* Remove obsolete safe_str
* Remove obsolete __unicode__ methods
* Remove compat.PY35 and compat.PY36: not really needed anymore
* Remove unused UNICODE_TYPES
* Remove Jython specific code
* Remove some Python 2 references from docs
Related to #5275
2019-06-02 14:39:11 -03:00
Bruno Oliveira
acdf30a523
Fix all() unroll for non-generators/non-list comprehensions
...
Fix #5358
2019-06-02 12:12:14 -03:00
Anthony Sottile
cafb13c95f
Fix `pytest.mark.parametrize` when the argvalue is an iterator
2019-06-01 15:09:17 -07:00
Anthony Sottile
fb3ae5eaa9
Merge remote-tracking branch 'origin/master' into mm
2019-05-30 20:23:38 -07:00
Bruno Oliveira
c8d23c206b
logging: Improve formatting of multiline message ( #5312 )
...
logging: Improve formatting of multiline message
2019-05-30 21:42:41 -03:00
Victor Maryama
65bd1b8a93
Avoiding looking upwards for parameter argnames when generating fixtureinfo.
2019-05-30 23:42:04 +02:00
Daniel Hahler
ace3a02cd4
pytester: factor out testdir._env_run_update
2019-05-30 17:39:44 +02:00