Commit Graph

542 Commits

Author SHA1 Message Date
Bruno Oliveira 25399da904 Reintroduce more_itertools dependency
Reintroduce more_itertools that was added in #3265, now in the features branch
2018-03-04 10:59:46 -03:00
Bruno Oliveira 54884b8c87 Merge branch 'revert-more_itertools-master' into introduce-more_itertools 2018-03-04 10:58:52 -03:00
Bruno Oliveira 65534682aa Revert introduction of more_itertools
This was merged on master but really should be on features: we should not
add new dependencies in bug-fix releases

This reverts commits:

* cfaf3600c1
* 14a9b1ec83
2018-03-04 10:56:24 -03:00
Bruno Oliveira e980fbbe39
Merge pull request #3277 from maiksensi/bug/3241-check-if-dir-exists
Use `isdir` instead of `exists`
2018-03-04 10:49:25 -03:00
Bruno Oliveira 9a2e0c061d
Update 3241.bugfix.rst 2018-03-03 23:14:57 -03:00
Maik Figura 056d9e8dc2
Use `isdir` instead of `exists` 2018-03-04 00:55:04 +01:00
Maik Figura 46f5d7a1bb
Add filetype to changelog fragment 2018-03-04 00:52:27 +01:00
Maik Figura 30453057e8
Add logging plugin to plugins list 2018-03-03 23:50:13 +01:00
Bruno Oliveira 08831396a5
Merge pull request #3218 from feuillemorte/3034-new-tests-first
#3034 Added new option "--new-first"
2018-03-02 18:33:25 -03:00
feuillemorte a506052d12 #3268 Added changelog file 2018-03-02 10:54:31 +03:00
Ronny Pfannschmidt 3b757b1b8c
Merge pull request #3265 from pytest-dev/feature/always-iterable-refactor
Consolidate behavior by using filterfalse and always_iterable
2018-03-01 08:51:44 +01:00
Bruno Oliveira 14a9b1ec83 Add CHANGELOG for #3265 2018-02-28 17:31:11 -03:00
Bruno Oliveira ea854086e1
Rename 3236.trivial.rst to 3236.feature.rst 2018-02-27 22:46:12 -03:00
Bruno Oliveira a2a64546eb Merge remote-tracking branch 'upstream/master' into features 2018-02-27 16:43:45 -03:00
Bruno Oliveira 9fcbf57163
Merge pull request #3267 from feuillemorte/3260-fix-pytest-section
#3260 fix pytest section
2018-02-27 16:41:45 -03:00
Bruno Oliveira dab96cbf27
Merge pull request #3255 from nicoddemus/post-summary
Show "short test summary info" after tracebacks and warnings
2018-02-27 16:36:13 -03:00
Bruno Oliveira 1fb2457018
Adjust CHANGELOG 2018-02-27 14:58:27 -03:00
feuillemorte eadd15fe45 #3260 Added changelog file 2018-02-27 19:05:53 +03:00
Bruno Oliveira a968c0fa05
Merge pull request #3264 from jeffreyrack/3236-skipif-using-platform
#3236 Use platform module in pytest.mark
2018-02-27 09:44:52 -03:00
Bruno Oliveira 5cb72b6188
Merge pull request #3257 from will133/continue-on-failure
Continue on doctest failure
2018-02-27 07:45:41 -03:00
Bruno Oliveira 20085542e2
Merge pull request #3263 from feuillemorte/3203-remove-statistic-indicator
#3203 Remove progress when no-capture
2018-02-27 07:33:45 -03:00
Bruno Oliveira 9479bda392
Adjust the CHANGELOG 2018-02-27 07:03:20 -03:00
Jeffrey Rackauckas f6ad25928e Fixing grammar. 2018-02-26 19:15:10 -08:00
Bruno Oliveira 4e405dd9f9 Show "short test summary info" after tracebacks and warnings 2018-02-26 21:12:33 -03:00
Bruno Oliveira d196ab45d3
Change 1642 entry from "trivial" to "feature" 2018-02-26 19:56:53 -03:00
Bruno Oliveira 188df8100c
Small adjustment to the CHANGELOG 2018-02-26 17:14:28 -03:00
Bruno Oliveira e8f9a91056
Small adjustment to CHANGELOG entry 2018-02-26 17:10:59 -03:00
feuillemorte 6200920dc3 #3203 Added changelog file 2018-02-26 17:24:16 +03:00
Jeffrey Rackauckas 307cd6630f Add the ability to use platform in pytest.mark.skipif 2018-02-25 22:38:25 -08:00
joshm91 6166151ee4 Fix minor typo in fixture.rst 2018-02-24 19:12:40 +00:00
Ronny Pfannschmidt da3f4045e7
Merge pull request #3250 from RonnyPfannschmidt/mark-package
Mark package
2018-02-24 18:19:27 +01:00
feuillemorte c032d4c5d5 Merge branch 'features' of https://github.com/feuillemorte/pytest into 3034-new-tests-first 2018-02-23 23:55:28 +03:00
feuillemorte e865f2a235 #3034 Fix comments 2018-02-23 22:49:17 +03:00
William Lee 8d90591b33 Merge remote-tracking branch 'upstream/features' into continue-on-failure 2018-02-22 21:01:31 -06:00
William Lee 14cd1e9d94 Added the feature in change log for #3149 2018-02-22 21:01:19 -06:00
Bruno Oliveira bedceaacc4
Merge pull request #3249 from a-feld/request-fixture-reference-cycle
Fix PseudoFixtureDef reference cycle.
2018-02-22 19:23:56 -03:00
Bruno Oliveira 9959164c9a Add CHANGELOG entry for #3250 2018-02-22 18:55:25 -03:00
Allan Feldman 7536e949b1 Add changelog entry. 2018-02-21 22:42:44 -08:00
Ronny Pfannschmidt 54e63b7dd5
Merge pull request #2770 from HPENetworking/master
Make record_xml_property generic and compatible with xdist and markers.
2018-02-22 07:38:55 +01:00
Ronny Pfannschmidt 264e455410
Merge pull request #3248 from durocher/master
Fix approx default tolerances for Decimal
2018-02-22 07:35:56 +01:00
Bruno Oliveira 147b43f832
Small changelog tweak 2018-02-21 20:31:33 -03:00
Bruno Oliveira 7336dbb979
Merge pull request #3246 from RonnyPfannschmidt/remove-addcall-in-tests
remove addcall in the terminal tests
2018-02-21 19:42:53 -03:00
mike 6e14585ca2 Fix approx default tolerances for Decimal 2018-02-21 23:08:23 +01:00
Bruno Oliveira d838193d2d Add note about deprecating record_xml_property
Also make record_xml_property return record_property directly
2018-02-21 17:45:52 -03:00
Bruno Oliveira d844ad18c2
Fix formatting of CHANGELOG entry 2018-02-21 15:40:25 -03:00
Ronny Pfannschmidt 3d4d0a2614 remove addcall in the terminal tests 2018-02-21 18:56:20 +01:00
Bruno Oliveira 7a62619a75 Merge remote-tracking branch 'upstream/master' into features 2018-02-21 10:39:55 -03:00
Bruno Oliveira 2a99e5dd2a Delete changelog entries for 3.4.1 release
Unfortunately due to hawkowl/towncrier#99 those news fragments were
not deleted at the time of CHANGELOG generation.
2018-02-20 23:45:21 -03:00
Carlos Jenkins 8b49ddfa58 Renamed the fixture record_xml_property to record_property and adapted logic so that the properties are passed to the TestReport object and thus allow compatibility with pytest-xdist. 2018-02-20 15:46:26 -06:00
Bruno Oliveira 053fc118b7
Merge pull request #3199 from nicoddemus/publish-tag-3060
Implement deploying to PyPI by pushing a tag
2018-02-19 22:34:35 -03:00
Bruno Oliveira 97bb6abcfa
Merge pull request #3234 from thisch/showcapture_log_support
Add captured-log support to --show-capture
2018-02-19 20:46:50 -03:00
Thomas Hisch 51ece00923 Add captured-log support to --show-capture
Fixes: #3233
2018-02-18 20:18:37 +01:00
Bruno Oliveira b486e1294b
Merge pull request #3222 from The-Compiler/match-msg
Remove "matching '...'" part from the pytest.raises message
2018-02-17 21:18:05 -02:00
Bruno Oliveira 3bc8b50a0d
Merge pull request #3228 from thisch/update_attr
Update minimal attrs library to v17.4.0
2018-02-17 20:19:07 -02:00
Bruno Oliveira 81fa547fa8 Add CHANGELOG entry about changed attrs req 2018-02-17 20:18:32 -02:00
Bruno Oliveira 9d879bee36
Merge pull request #3215 from pytest-dev/bugfix/985/disable-output-capturing-in-doctest
Disable output capturing in doctest
2018-02-17 18:39:32 -02:00
Brian Maissy 069f32a8c4 print captured logs before entering pdb 2018-02-17 20:32:49 +02:00
Bruno Oliveira 0f6879bf5e
Small update to changelog/README.rst 2018-02-17 10:20:41 -02:00
Bruno Oliveira bfe2cbe875 Implement publishing to PyPI by pushing a tag
Fix #3060
2018-02-17 10:13:25 -02:00
Bruno Oliveira 69d608aec3 Merge remote-tracking branch 'upstream/master' into merge-upstream 2018-02-17 09:38:06 -02:00
Bruno Oliveira fa8354e872
Merge pull request #3213 from thisch/collection_deselection
Show deselection count before tests are executed
2018-02-17 09:03:26 -02:00
Bruno Oliveira 00d3001138
Merge pull request #3188 from s0undt3ch/issues/3184
Don't traceback on unkown sections.
2018-02-17 09:02:44 -02:00
Jordan Speicher 774c539f1a Add --deselect command line option
Fixes #3198
2018-02-16 08:17:37 -06:00
Bruno Oliveira df2f019997
Slight rewording in the CHANGELOG 2018-02-15 19:45:05 -02:00
Bruno Oliveira 6bc45d158d
Merge pull request #3186 from brianmaissy/bugfix/print_captured_stdout_before_entering_pdb
Added printing of captured stdout before entering pdb
2018-02-15 19:38:23 -02:00
Florian Bruhin 3cbf0c8ec0 Raise unexpected exceptions with pytest.raises() using match= 2018-02-15 12:11:56 +01:00
Florian Bruhin 9849022eb2 Remove "matching '...'" part from the pytest.raises message
When a test with pytest.raises(ValueError, match='foo') doesn't raise, the
following error is printed:

    Failed: DID NOT RAISE <class 'ValueError'> matching 'foo'

This error message is confusing as it implies a ValueError was raised, but the
message wasn't matching 'foo'.

I first considered rewording it somehow to preserve the match pattern in it, but
I don't think that's worthwhile as the pattern should usually be apparent from
the stacktrace anyways (hard-coded, as parametrization, or with --showlocals for
more sophisticated cases).
2018-02-14 19:20:00 +01:00
Thomas Hisch 6496131b79 Show deselection count before tests are exectued
Fixes #1527
2018-02-13 22:27:02 +01:00
feuillemorte dff0500114 #3034 Added new option "--new-first" 2018-02-13 22:49:28 +03:00
Jason R. Coombs ce1872e7e8 Merge branch 'master' into bugfix/985/disable-output-capturing-in-doctest 2018-02-13 12:33:07 -05:00
Jason R. Coombs d845af7b24 Add changelog. Ref #985. 2018-02-13 12:32:00 -05:00
Brian Maissy 7656fc8320 Added printing of captured stdout and stderr before entering pdb 2018-02-12 23:17:51 +02: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 ffee213c85
Update and rename 3202.trivial.rst to 3202.doc.rst 2018-02-09 22:51:15 -02:00
Andy Freeland e5b527d0e3 Add Sphinx parameter docs for `match` and `message` args to `pytest.raises()` 2018-02-09 16:28:17 -08:00
Bruno Oliveira 063e2da967
Merge pull request #3176 from feuillemorte/1478_no_stdout_option
#1478 Added --no-stdout option
2018-02-09 18:36:36 -02:00
Bruno Oliveira c04e248de5
Rename 3161.bugfix to 3161.bugfix.rst 2018-02-09 14:06:24 -02:00
Florian Bruhin 3685c1bc01
Merge pull request #3192 from nicoddemus/pr-template
Add changelog/README.rst and streamline our PR template text
2018-02-08 19:20:54 +01:00
feuillemorte 71367881ed #1478 Added --show-capture=both option (fix comments) 2018-02-08 16:21:22 +03:00
Bruno Oliveira eea169e515 Code review suggestions 2018-02-08 08:03:14 -02:00
Pedro Algarvio 0b71255dda
Expose `log_cli` as a CLI parser option. 2018-02-08 09:42:53 +00:00
Bruno Oliveira ce0a9aadec
Merge pull request #3127 from feuillemorte/1642-add-rootdir-option
#1642 add rootdir option
2018-02-07 18:18:59 -02:00
Bruno Oliveira f72182977d
Merge pull request #3183 from cheezman34/master
Fix ordering of tests to minimize fixture creating
2018-02-07 18:15:41 -02:00
Bruno Oliveira ed12cf3fb3
Merge pull request #3189 from s0undt3ch/feature/logstart-logfinish
Additionally handle logstart and logfinish hooks
2018-02-07 18:09:45 -02:00
Bruno Oliveira 40d0ade2d9 Add changelog/README.rst and streamline our PR template text
This streamlines the PR template text and adds a more in-depth explanation
about how the changelog entries work because this topic is a common source of
confusion:

- How to name the files.
- Which formatting to use (people in general assume it is Markdown).
- Recommend adding `.rst` extension to changelog files to help with the
  above (`towncrier` doesn't care).

This was heavily inspired by the excellent python-trio/trio docs.
2018-02-06 22:20:39 -02:00
feuillemorte 1a650a9eb9 #1478 Added --show-capture option 2018-02-06 23:38:51 +03:00
Bruno Oliveira ea06c1345f
Update changelog wording slightly 2018-02-06 15:45:37 +00:00
Pedro Algarvio 67558e0e22
Additionally handle logstart and logfinish hooks 2018-02-06 15:45:36 +00:00
Bruno Oliveira 7152707280
Update changelog entry to "trivial" as it is a temporary workaround
I think this is a more appropriate category given that the underlying problem still exists
2018-02-06 08:54:44 -02:00
Bruno Oliveira 42c1f85257
Update CHANGELOG 2018-02-05 20:07:42 -02:00
Pedro Algarvio 0d15a46863
Don't traceback on unkown sections. 2018-02-05 19:09:38 +00:00
Ronny Pfannschmidt 7c80c81433
Merge pull request #3152 from brianmaissy/silently_fail_to_import_during_postmortem
If we fail to import doctest.UnexpectedException during postmortem, fail quietly
2018-02-05 10:04:00 +01:00
Bruno Oliveira ea8997a108
Update wording in CHANGELOG 2018-02-03 20:21:06 -02:00
Brian Maissy 867344d0d7 move import to top 2018-02-04 00:03:17 +02:00
Brian Maissy 74633815aa skip failing pdb/doctest test on mac 2018-02-03 23:24:11 +02:00
Thomas Hisch c0ef4a4d35 Add captured log msgs to junit xml file
For each test this adds the captured log msgs to a system-* tag in the junit
xml output file. The destination of the system-* tag is specified by
junit_logging ini option.
2018-02-03 09:39:29 +01:00
Bruno Oliveira 3425edd2a5
Reword changelog a bit 2018-02-01 19:54:51 -02:00
Aaron 4458e65fe7 Fix ordering of tests to minimize fixture creating 2018-02-01 13:07:45 -08:00
feuillemorte 9f1772e679 #1642 Resolve conflicts 2018-02-01 00:18:28 +03:00
feuillemorte 949a620d3a #1478 Added --no-stdout option 2018-01-31 22:36:28 +03:00
Bruno Oliveira ef7df8f167
Small update to CHANGELOG 2018-01-30 21:40:14 -02:00
Alan Velasco e12a588c39
Merge branch 'master' into typo_for_parametrize 2018-01-30 16:22:54 -06:00
Alan Velasco 547070e2d8 Switch `for_parameterize` to `for_parametrize` 2018-01-30 16:20:43 -06:00
Bruno Oliveira 489e638b4e Preparing release version 3.4.0 2018-01-30 19:47:56 +00:00
Thomas Hisch ebab1b6c69 live-logging: Colorize levelname 2018-01-30 18:21:12 +01:00
Bruno Oliveira 49773b573f
Merge pull request #3132 from raphaelcastaneda/feature/add-record-xml-attribute
implement #3130 - add record_xml_attribute fixture
2018-01-29 15:42:55 -02:00
Bruno Oliveira 0e1be01b7a
Merge pull request #3108 from cheezman34/features
Optimize reorder_items in fixtures.py
2018-01-27 23:21:09 -02:00
Bruno Oliveira aff463a3c4 Merge remote-tracking branch 'upstream/master' into features 2018-01-27 12:28:43 -02:00
Bruno Oliveira b3247c1d03
Merge pull request #3044 from RonnyPfannschmidt/parameterset-empty-enable-xfail
empty parameterset - enable opt to xfail
2018-01-27 12:23:49 -02:00
Bruno Oliveira cd0b2ace67
Merge pull request #3150 from alanbato/pytest_cache
Change cache directory structure to include `pytest`
2018-01-27 10:08:56 -02:00
Ronny Pfannschmidt 77de45cce3 enhance docs for empty_parameter_set_mark according to review comments 2018-01-26 12:01:27 +01:00
Bruno Oliveira a58099022a
Merge pull request #3124 from nicoddemus/logging-3013
Changes in the logging plugin for 3.4
2018-01-26 08:52:43 -02:00
Ronny Pfannschmidt 37b41de779 fix #2527 - introduce a option to pic the empty parameterset action 2018-01-26 11:10:00 +01:00
Brian Maissy 4285325cb8 Added note that calling pytest.main multiple times from the same process is not recommended because of import caching 2018-01-25 23:07:34 +02:00
Brian Maissy 2a1b1107c5 If we fail to import doctest.UnexpectedException during postmortem, fail quietly and continue 2018-01-25 22:28:27 +02:00
Bruno Oliveira cbbd606b6c
Reword changelog 2018-01-25 17:21:54 -02:00
Alan Velasco a24ca9872f Change cache directory name to include `pytest` 2018-01-25 07:50:08 -06:00
Bruno Oliveira b8be339632
Merge pull request #3148 from nicoddemus/deprecate-old-style-classes-2147
All classes now subclass object for better py3 compatibility
2018-01-25 10:41:28 -02:00
Bruno Oliveira 15cbd61159 Change caplog.get_handler(when) to caplog.get_records(when)
While updating the docs I noticed that caplog.get_handler() exposes
the underlying Handler object, which I think it is a bit too much
detail at this stage. Update to return the records directly instead.
2018-01-24 19:08:49 -02:00
Bruno Oliveira af37778b0d All classes now subclass object for better py3 compatibility
Fix #2147
2018-01-24 18:23:42 -02:00
Bruno Oliveira 3f5e9ea71e Fix -o behavior to no longer swallow all remaining options
The current behavior was too error-prone because a "-o" option would
swallow all the following non-option parameters:

  pytest -o foo=bar path/to/test.py

path/to/test.py would be captured by the -o option, and would fail
because "path/to/test.py" is not in the format "key=value".
2018-01-23 21:19:16 -02:00
Bruno Oliveira 443275f025 Reword changelog a bit 2018-01-23 21:19:04 -02:00
Aron Coyle 30ca9f9d38 Add endline 2018-01-23 21:18:51 -02:00
Aron Coyle 46d87deb5d Add changelog update authors 2018-01-23 21:18:45 -02:00
Bruno Oliveira ff90c9e237
Merge pull request #3116 from brianmaissy/pexpect_test_hangs_on_mac
use flush in order to avoid hanging on mac
2018-01-23 19:32:19 -02:00
Bruno Oliveira baa189f5a3
Merge pull request #3131 from soyrice/master
Improve readability of Getting Started guide
2018-01-23 17:48:11 -02:00
Bruno Oliveira a7066ba837
Update formatting in the CHANGELOG 2018-01-23 17:31:07 -02:00
Raphael Castaneda a5e60b6a2d implement #3130 - adding record_xml_attribute fixture
update incorrect expected attribute value in test_record_attribute

attr names must be strings

Update CHANGELOG formatting

update usage documentation

Fix versionadded for record_xml_attribute

Indent the xml schema properly inside the warning box in the docs
2018-01-22 15:14:53 -08:00
Bruno Oliveira 0d96a5bf90
Merge pull request #3135 from brianmaissy/doc/clarify_pytest_fixture_setup_with_fixture_that_returns_None
Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None
2018-01-22 18:02:33 -02:00
Bruno Oliveira 060f68bd90
Merge pull request #3137 from brianmaissy/doc/note_that_certain_hooks_cant_be_used_with_hookwrapper
Document hooks (defined with historic=True) which cannot be used with hookwrapper=True
2018-01-22 18:00:35 -02:00
Bruno Oliveira 8a8797df80
Small changelog formatting 2018-01-21 23:21:21 -02:00
Brian Maissy 8994603d46 Document hooks (defined with historic=True) which cannot be used with hookwrapper=True 2018-01-21 23:17:16 +02:00
Brian Maissy 5c0b340a4b Clarify that warning capturing doesn't change the warning filter by default 2018-01-21 22:43:00 +02:00
Brian Maissy 196dcc37a8 Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None 2018-01-21 21:50:26 +02:00
Bruno Oliveira c53b72fd7b Add CHANGELOG for 3013 2018-01-20 12:02:54 -02:00
Bruno Oliveira 3b3d237f07
Merge pull request #3117 from boxed/access_logs_in_teardown
Access captures logs in teardown
2018-01-20 11:21:17 -02:00
Bruno Oliveira c4c968fe69
Reword CHANGELOG after introduction of caplog.get_handler() 2018-01-20 11:14:09 -02:00
Anders Hovmöller 7ea5a22657 Access captures logs in teardown 2018-01-19 12:42:35 +01:00
Cyrus Maden cd76366d87
Rename pr.doc to 3131.doc 2018-01-18 15:59:37 -08:00
Cyrus Maden 931e8830ba
Update changelog
Not issue ID. Will update with pr ID after submitting pr
2018-01-18 15:54:31 -08:00
Bruno Oliveira 8be1136d03
Small changelog formatting 2018-01-18 16:40:00 -02:00
Kimberly e0b63e34fa fixed typo in logging doc and added fix to changelog 2018-01-18 10:40:18 -07:00
feuillemorte a7c39c894b #1642 fix flake8 2018-01-17 23:48:04 +03:00
feuillemorte 86f01967e1 #1642 Added changelog entry 2018-01-17 23:05:22 +03:00
Bruno Oliveira 86e1b44230
Improve changelog formatting 2018-01-16 18:10:15 -02:00
feuillemorte dff597dcd0
Add changelog entry 2018-01-16 21:34:13 +03:00
Brian Maissy 0a0d97aeb5 added changelog news fragment 2018-01-14 23:14:59 +02:00
Aaron d314691fd3 more descriptive changelog message 2018-01-12 10:29:18 -08:00
Bruno Oliveira 5939b336cd Fix progress report when tests fail during teardown
Fix #3088
2018-01-11 20:42:05 -02:00
Aaron 3d289b803d update AUTHORS and changelog 2018-01-11 12:25:41 -08:00