Commit Graph

11012 Commits

Author SHA1 Message Date
Daniel Hahler c2ae0e0dc6 tests: move tests for setuponly/setupplan
Forgotten in 032ce8baf.
2019-10-15 00:41:05 +02:00
Bruno Oliveira afabbb6346
minor: test_assertion: improve mock_config (#5940)
minor: test_assertion: improve mock_config
2019-10-11 08:28:42 -03:00
Daniel Hahler fb90259460 test_assertion: improve mock_config 2019-10-11 04:19:07 +02:00
Bruno Oliveira db6653ce3b
Improve ExceptionInfo.__repr__ (#5934)
Improve ExceptionInfo.__repr__
2019-10-09 17:08:55 -03:00
Daniel Hahler 2a2fe7d3db Improve ExceptionInfo.__repr__ 2019-10-09 19:27:46 +02:00
Bruno Oliveira 5c92a0f695
Merge master into features (#5930)
Merge master into features
2019-10-08 17:39:49 -03:00
Daniel Hahler 21c038f304 Merge master into features 2019-10-08 18:57:15 +02:00
Daniel Hahler fca462cf7d
Merge pull request #5924 from blueyed/improve-list-diff
Improve full diff output for lists
2019-10-08 17:58:25 +02:00
Daniel Hahler 946434c610 Improve full diff output for lists
Massage text input for difflib when comparing pformat output of
different line lengths.

Also do not strip ndiff output on the left, which currently already
removes indenting for lines with no differences.

Before:

    E   AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
    E     Right contains 3 more items, first extra item: ' '
    E     Full diff:
    E     - ['version', 'version_info', 'sys.version', 'sys.version_info']
    E     + ['version',
    E     +  'version_info',
    E     +  'sys.version',
    E     +  'sys.version_info',
    E     +  ' ',
    E     +  'sys.version',
    E     +  'sys.version_info']

After:

    E   AssertionError: assert ['version', '...version_info'] == ['version', '...version', ...]
    E     Right contains 3 more items, first extra item: ' '
    E     Full diff:
    E       [
    E        'version',
    E        'version_info',
    E        'sys.version',
    E        'sys.version_info',
    E     +  ' ',
    E     +  'sys.version',
    E     +  'sys.version_info',
    E       ]
2019-10-08 15:27:51 +02:00
Anthony Sottile 3fada8c8ee
Merge pull request #5925 from asottile/fix_resource_warning_again_5088
Fix spurious ResourceWarning stderr in testsuite again
2019-10-07 16:26:38 -07:00
Anthony Sottile 271dc7f17a
Merge pull request #5904 from asottile/warnings_v2
Add test to ensure _pytest is warning-clean on import
2019-10-06 19:24:07 -07:00
Anthony Sottile 19eb0590f1 Fix spurious ResourceWarning stderr in testsuite again 2019-10-06 19:11:33 -07:00
Bruno Oliveira 5186635387
Introduce no_fnmatch_line/no_re_match_line in pytester (#5914)
Introduce no_fnmatch_line/no_re_match_line in pytester
2019-10-06 20:27:20 -03:00
Daniel Hahler cd398e289f
Merge pull request #5920 from blueyed/lazy-import-pdb
Allow for "pdb" module to be rewritten
2019-10-06 23:46:11 +02:00
Anthony Sottile eaa05531ed Add test to ensure _pytest is warning-clean on import 2019-10-06 14:11:08 -07:00
Bruno Oliveira 47c2091ecd Use new no-match functions to replace previous idiom 2019-10-06 18:05:24 -03:00
Bruno Oliveira 0c18e24433 Introduce no_fnmatch_line/no_re_match_line in pytester
The current idiom is to use:

  assert re.match(pat, result.stdout.str())

Or

  assert line in result.stdout.str()

But this does not really give good results when it fails.

Those new functions produce similar output to ther other match lines functions.
2019-10-06 18:05:24 -03:00
Daniel Hahler 07f20ccab6 Allow for "pdb" module to be rewritten 2019-10-06 23:02:24 +02:00
Daniel Hahler b847d5712b
Merge pull request #5923 from nicoddemus/mm
Merge master into features
2019-10-06 23:01:19 +02:00
Bruno Oliveira 74aed6ea4c
Release 5.2.1 (#5917)
Release 5.2.1
2019-10-06 12:55:15 -03:00
Bruno Oliveira cfa9ebc91f
ci: test oldest supported attrs (#5922)
ci: test oldest supported attrs
2019-10-06 12:55:03 -03:00
Daniel Hahler b0fd8742da ci: test oldest supported attrs 2019-10-06 16:12:56 +02:00
Bruno Oliveira 12cc729f6b Preparing release version 5.2.1 2019-10-06 08:00:49 -04:00
Bruno Oliveira 1c5efffd90 Add changelog entry for #5902 2019-10-06 07:58:23 -04:00
Bruno Oliveira 8c9ea5e055
Fix warnings with attrs 19.2 and fix object assertions (#5902)
Fix warnings with attrs 19.2 and fix object assertions
2019-10-06 08:47:17 -03:00
Anthony Sottile c58b0fb4ac Use ATTRS_EQ_FIELD for attrs 19.2 compat 2019-10-05 18:16:35 -07:00
Anthony Sottile 4011af68cd
Merge pull request #5910 from pytest-dev/asottile-patch-1
Fix dynamic scoping changelog link
2019-10-03 09:39:12 -07:00
Anthony Sottile 9637b3e376
Fix dynamic scoping changelog link 2019-10-03 09:01:08 -07:00
Anthony Sottile 33c3ec66b7
Merge pull request #5898 from kevinjfoley/doc-typo-fix
Fix doc typo
2019-10-01 12:58:54 -07:00
Hynek Schlawack a79acf279a Fix warnings with attrs 19.2 and fix object assertions
attrs 19.2 deprecated cmp in favor of the dataclass-ish eq/order duo.

This causes deprecation warnings that in turn break some of the cool new deep
object comparisons. Since we at attrs expected this to be a problem, it shipped
with helpers to write backward and forward compatible code.

This PR uses that and avoids changed to minimal versions.
2019-10-01 20:47:59 +02:00
Bruno Oliveira 9a4c0b991b
Update doc: pytest section in setup.cfg (#5894)
Update doc: pytest section in setup.cfg
2019-10-01 11:45:01 -03:00
Kevin J. Foley b490f5f979 Fix doc typo 2019-10-01 10:17:26 -04:00
tadashigaki acfd0fd9d6 Update doc: pytest section in setup.cfg 2019-10-01 02:44:07 +09:00
Bruno Oliveira 88434f1f42
Release 5.2.0 (#5885)
Release 5.2.0
2019-09-29 10:26:06 -03:00
Florian Bruhin 4d01740be3
Merge pull request #5887 from asottile/fix_attributes_docs_pytester
Fix attribute docs in _pytest.pytester
2019-09-29 14:22:54 +02:00
Anthony Sottile 07792c7113 Fix attribute docs in _pytest.pytester 2019-09-28 18:19:53 -07:00
Bruno Oliveira 068ef90b92 Preparing release version 5.2.0 2019-09-28 21:18:37 -04:00
Bruno Oliveira 065773aa97 Use 'python3' instead of 'python3.6' on tox
This allows us to use python3.7+ to use tox
2019-09-28 21:16:20 -04:00
Anthony Sottile b62276826c
Merge pull request #5886 from nicoddemus/setup-plan-custom-items-5884
Fix --setup-only and --setup-show for custom pytest items
2019-09-28 18:08:36 -07:00
Bruno Oliveira 7bdfba3578 Fix --setup-only and --setup-show for custom pytest items
Fix #5884
2019-09-28 11:52:09 -03:00
Daniel Hahler 6bfd30d169
Merge pull request #5878 from blueyed/codecov-retry-6
ci: codecov: use 6 retries with curl
2019-09-24 10:30:23 +02:00
Daniel Hahler 7731e45615 ci: codecov: use 6 retries with curl
This should result in retries of 1+2+4+8+16+32 = 63s.

Ref: https://github.com/pytest-dev/pytest/pull/5869#issuecomment-534235437
2019-09-23 20:58:52 +02:00
Anthony Sottile 8806b1f531
Merge pull request #5875 from asottile/patch-1
Make sure to quote `sys.executable` as we're running a shell
2019-09-23 18:55:33 +02:00
Anthony Sottile 19c9e53604 Make sure to quote `sys.executable` as we're running a shell 2019-09-23 08:58:56 -07:00
Bruno Oliveira c28b63135f
Merge master into features (#5874)
Merge master into features
2019-09-23 12:44:20 -03:00
Bruno Oliveira 7c64d5d882
Do not call python directly but use sys.executable. Fixes #5872 (#5873)
Do not call python directly but use sys.executable. Fixes #5872
2019-09-23 12:28:00 -03:00
Bruno Oliveira d3d9f9f668 Merge remote-tracking branch 'upstream/master' into mm 2019-09-23 12:09:01 -03:00
Bruno Oliveira 018edf2a0e
Change report-coverage.sh in attempt to fix Azure (#5869)
Change report-coverage.sh in attempt to fix Azure
2019-09-23 12:01:19 -03:00
Tomáš Chvátal 04c01fb606
test_argcomplete do not call python directly #5872
Use sys.executable to detect which python we should actually be testing.
2019-09-23 16:38:15 +02:00
Daniel Hahler ea0c7e43b6 Remove unneeded codecov options (implied with "-f") 2019-09-23 02:26:53 +02:00