Commit Graph

7668 Commits

Author SHA1 Message Date
Tadeu Manoel 97f9a8bfdf Add fixes to make `numpy.approx` array-scalar comparisons work with older numpy versions 2018-03-14 17:10:35 -03:00
Tadeu Manoel 161d4e5fe4 Add support for pytest.approx comparisons between scalar and array (inverted order) 2018-03-14 16:29:04 -03:00
Tadeu Manoel c34dde7a3f Add support for pytest.approx comparisons between array and scalar 2018-03-14 15:47:21 -03:00
Ronny Pfannschmidt 1b535387bf
Merge pull request #3309 from tareqalayan/issue-3308
issue #3308: fix example in documentation
2018-03-14 15:52:55 +01:00
Tareq Alayan 7e53f9432c issue #3308: fix example in documentation
https://github.com/pytest-dev/pytest/issues/3308
2018-03-14 15:44:43 +02:00
Ronny Pfannschmidt b2b629f462
Merge pull request #3305 from nicoddemus/2370-tmpfile-close-py27
Suppress ``IOError`` when closing the temporary file used for capturing streams in Python 2.7
2018-03-14 06:42:06 +01:00
Bruno Oliveira cbb2c55dea
Merge pull request #3304 from RonnyPfannschmidt/cmdoptions-removal
remove CmdOptions since we can use argparse.Namespace()
2018-03-13 17:48:21 -03:00
Bruno Oliveira 9517c3a2aa Suppress ``IOError`` when closing the temporary file used for capturing streams in Python 2.7.
Fix #2370
2018-03-13 17:41:42 -03:00
Bruno Oliveira 4175ed8b43
Merge pull request #3296 from RonnyPfannschmidt/verbosity-actions
unify cli verbosity handling
2018-03-13 17:38:41 -03:00
Ronny Pfannschmidt 87f2003245 remove CmdOptions since we can use argparse.Namespace() 2018-03-13 18:13:56 +01:00
Ronny Pfannschmidt 2612d967f8
Merge pull request #3301 from ankostis/caplog_clear_text
Fix #3297 where caplog.clear() did not clear text, just records
2018-03-13 16:39:53 +01:00
Ronny Pfannschmidt 37a52607c2 unify cli verbosity handling
based on https://github.com/pytest-dev/pytest/issues/3294#issuecomment-372190084

we really shouldnt have N options we post mortem hack together to determine verbosity
this change starts by unifying the data, we still need to handle deprecation/removal of config.quiet
2018-03-13 07:05:22 +01:00
Bruno Oliveira 51c0256cd4 Remove :py:mod: ref from changelog: fails our linting check 2018-03-12 20:57:51 -03:00
Bruno Oliveira f8791c9246
Merge pull request #3292 from RonnyPfannschmidt/exception-attrs
internal refactor port exc FOrmattedExcinfo to attrs, remove old code
2018-03-12 20:54:52 -03:00
Kostis Anagnostopoulos 02bec7a3bb Add changelog & myself (ankostis) to authors 2018-03-13 01:46:44 +02:00
Bruno Oliveira 4459aa3d8b Remove redundant "# content of pytest.ini" headers from examples 2018-03-12 20:09:31 -03:00
Bruno Oliveira 2e347643a3 Add ini options for logging 2018-03-12 20:09:05 -03:00
Bruno Oliveira 8629ef6a78 Add missing ini options: markers, usefixtures and xfail_strict 2018-03-12 19:43:31 -03:00
Thomas Hisch 5e92644f94 Properly reset LogCaptureHandler in caplog
Closes #3297
2018-03-13 00:36:51 +02:00
Bruno Oliveira 3198596f8a Sort ini options 2018-03-12 19:33:34 -03:00
Kostis Anagnostopoulos 68375513f3 Add TC to demonstrate #3297 that caplog.clear() does not clean text 2018-03-13 00:28:47 +02:00
Bruno Oliveira 61b8ea8656 Add doctest_encoding and junit_suite_name ini options 2018-03-12 19:27:17 -03:00
Bruno Oliveira 0557ab431f
Merge pull request #3291 from RonnyPfannschmidt/small-moves
move some code and make nodeid computed early
2018-03-12 18:49:13 -03:00
Bruno Oliveira 8035f6cced Fix typo in docs 2018-03-12 18:32:51 -03:00
Bruno Oliveira 0302622310
Improve CHANGELOG entry a bit 2018-03-12 18:22:12 -03:00
Bruno Oliveira 3909225bf9
Merge pull request #3300 from JulienPalard/typo
Typo in example, os.getcwd does not take any parameter.
2018-03-12 12:16:18 -03:00
Julien Palard e71d907d34 Typo in example, os.getcwd does not take any parameter. 2018-03-12 15:19:26 +01:00
Brian Maissy d2e533b8a3 implemented --last-failed-no-failures 2018-03-10 22:45:45 +02:00
Brian Maissy 54b15f5826 deprecated pytest_plugins in non-top-level conftest 2018-03-10 21:20:12 +02:00
Bruno Oliveira d2dbbd4caa Add CHANGELOG entry 2018-03-09 17:46:44 -03:00
Bruno Oliveira 5f9bc557ea
Fix linting 2018-03-09 17:44:39 -03:00
Ronny Pfannschmidt 543bac925a fix if-chain in _code.source 2018-03-09 16:50:46 +01:00
Ronny Pfannschmidt 2fe56b97c9 remove unused assertion parameter in source and minor cleanups 2018-03-09 15:03:57 +01:00
Ronny Pfannschmidt 3284d575e8 readline generator no longer needs to yield empty strings 2018-03-09 14:58:11 +01:00
Ronny Pfannschmidt a406ca14d6 remove getstatementrange_old - its documented for python <= 2.4 2018-03-09 14:48:28 +01:00
Ronny Pfannschmidt 2e5337f5e3 makr strutures: lint fixings, removal of shadowing 2018-03-09 14:39:54 +01:00
Ronny Pfannschmidt 74884b1901 turn FormattedExcinfo into a attrs class 2018-03-09 14:21:56 +01:00
Ronny Pfannschmidt c67f45b716 simplify a few imports in _pytest._code.source 2018-03-09 12:06:50 +01:00
Ronny Pfannschmidt 50e682d2db add changelog 2018-03-09 11:06:26 +01:00
Ronny Pfannschmidt 5e5935759e make nodeids precalculated, there is no sane reason to commpute lazyly 2018-03-09 10:52:59 +01:00
Ronny Pfannschmidt 45b6b7df92 move nodekeywords to the mark structures 2018-03-09 10:23:18 +01:00
Ronny Pfannschmidt c9b9d796e6 remove dead code 2018-03-09 10:22:43 +01:00
Ronny Pfannschmidt 09ce84e64e remove unneeded commas 2018-03-09 10:21:42 +01:00
Bruno Oliveira 8243900960 Move definition of ini options to reference 2018-03-07 20:45:41 -03:00
Bruno Oliveira c0fe4d483d Add environment variables 2018-03-06 20:41:21 -03:00
Bruno Oliveira 18a47bfd22 Add docs for CaptureFixture 2018-03-06 20:41:21 -03:00
Bruno Oliveira 3979f9ba3a Add pytest_plugins and pytestmark special variables 2018-03-06 20:41:21 -03:00
Bruno Oliveira 443888248a Improve fixture reference a bit 2018-03-06 20:41:21 -03:00
Bruno Oliveira 69d49f18e9 Add pytest_addhooks 2018-03-06 20:41:21 -03:00
Bruno Oliveira 8b7e6df73d Add register_assert_rewrite and improve signature of other functions 2018-03-06 20:41:21 -03:00