Commit Graph

7208 Commits

Author SHA1 Message Date
Srinivas Reddy Thatiparthy a0101f024e remove os.sep as it behaves differently linux and windows.
* on linux it is '/'

* on windows it is '\'
2017-08-05 23:21:43 +05:30
Ronny Pfannschmidt d5f4496bdf Merge pull request #2656 from nicoddemus/unittest-features
Document which pytest features work with `unittest`
2017-08-05 09:38:02 +02:00
Bruno Oliveira 37353a854e Implement suggestions by Raphael 2017-08-04 17:56:13 -03:00
Ronny Pfannschmidt 12e60956de Merge pull request #2655 from nicoddemus/terminal-collecting-glitch
Fix small terminal glitch when collecting a single test item
2017-08-04 14:10:45 +02:00
Bruno Oliveira 15cdf137d5 Document which pytest features work with `unittest`
Fix #2626
2017-08-04 07:44:04 -03:00
Ronny Pfannschmidt 9e62a31b63 Merge pull request #2650 from srinivasreddy/2642
Fixed#2642: Convert py module references to six module
2017-08-04 09:21:51 +02:00
Bruno Oliveira 2e33d9b35e Add changelog entry for using six for portability 2017-08-04 00:03:43 -03:00
Srinivas Reddy Thatiparthy dc563e4954 convert py module references to six module 2017-08-04 08:05:03 +05:30
Bruno Oliveira ad52f714a9 Fix small terminal glitch when collecting a single test item
Fix #2579
2017-08-03 20:57:46 -03:00
Florian Bruhin 8969bd43c9 Merge pull request #2646 from nicoddemus/issue-2644
Properly escape test names when setting PYTEST_CURRENT_TEST environment variable
2017-08-02 16:27:05 +02:00
Bruno Oliveira 7703dc921c Only skip null bytes before setting the environment variable
As discussed, node ids have already been "ascii" sanitized by the
parametrization process
2017-08-02 10:27:45 -03:00
Bruno Oliveira 1deac2e210 Properly escape test names when setting PYTEST_CURRENT_TEST environment variable
Fix #2644
2017-08-01 20:52:37 -03:00
Bruno Oliveira 02da156351 Merge pull request #2645 from alex/patch-1
Tiny rst syntax fix
2017-08-01 20:14:39 -03:00
Alex Gaynor 84061233ef Tiny rst syntax fix 2017-08-01 19:10:50 -04:00
Bruno Oliveira 40254b64e5 Merge branch 'master' into features 2017-08-01 19:35:56 -03:00
Bruno Oliveira 0a15edd573 Merge branch 'release-3.2.0' 2017-08-01 18:58:43 -03:00
Bruno Oliveira 51ebad76f2 Fix merge instruction after a minor/major release 2017-08-01 18:24:17 -03:00
Bruno Oliveira d2bca93109 Update grammar in changelog as requested 2017-08-01 18:01:22 -03:00
Ronny Pfannschmidt 6e7547244b Merge pull request #2636 from RonnyPfannschmidt/remove-preinit
remove preinit, its no longer needed
2017-08-01 05:22:41 +02:00
Ronny Pfannschmidt 333ec8ba5a Merge pull request #2638 from RonnyPfannschmidt/function-definition
small code cleanups
2017-08-01 05:21:21 +02:00
Ronny Pfannschmidt dcaeef7c10 take review comments into account 2017-07-31 22:21:09 +02:00
Bruno Oliveira 8a2e6a8d51 Fix linting 2017-07-31 16:49:30 -03:00
Ronny Pfannschmidt 74d536314f pytester: make pytest fullpath a constant 2017-07-31 18:18:53 +02:00
Ronny Pfannschmidt ceb016514b remove dead code - Node._memoizedcall 2017-07-31 18:18:26 +02:00
Ronny Pfannschmidt e90f876b34 remove the last own implementation of pytest_namespace 2017-07-31 13:48:25 +02:00
Ronny Pfannschmidt c68a89b4a7 remove preinit, its no longer needed 2017-07-31 13:44:05 +02:00
Bruno Oliveira 07dd1ca7b8 Preparing release version 3.2.0 2017-07-30 21:37:18 +00:00
Bruno Oliveira f1467f8f03 Merge remote-tracking branch 'upstream/master' into features 2017-07-30 18:08:24 -03:00
Bruno Oliveira 763c580a2a Merge pull request #2576 from maiksensi/feat/raise-not-implemented-for-lt-gt-in-approx
#2003 Change behavior of `approx.py` to only support `__eq__` comparison
2017-07-30 17:48:33 -03:00
Bruno Oliveira e1aed8cb17 Merge pull request #2490 from RonnyPfannschmidt/fix-580
Test Outcomes as BaseException - fix #580
2017-07-30 17:38:42 -03:00
Bruno Oliveira 713f7636e1 Merge pull request #2632 from jmoldow/pep_0415_suppress_exception_context
Support PEP-415's Exception.__suppress_context__
2017-07-30 17:22:40 -03:00
Bruno Oliveira 4cd8727379 Merge pull request #2617 from wence-/fix/nondeterministic-fixtures
Fix nondeterminism in fixture collection order
2017-07-30 17:17:40 -03:00
Bruno Oliveira 5e0e038fec Merge pull request #2625 from nicoddemus/historical-notes
Historical notes in the docs
2017-07-29 12:22:04 -03:00
Jordan Moldow 2e61f702c0 Support PEP-415's Exception.__suppress_context__
PEP-415 states that `exception.__context__` should be suppressed
in traceback outputs, if `exception.__suppress_context__` is
`True`.

Now if a ``raise exception from None`` is caught by pytest,
pytest will no longer chain the context in the test report.

The algorithm in `FormattedExcinfo` now better matches the one
in `traceback.TracebackException`.

`Exception.__suppress_context__` is available in all of the
versions of Python 3 that are supported by pytest.

Fixes #2631.
2017-07-29 02:39:17 -07:00
Bruno Oliveira 8c2319168a Rephrase the bit about unittest migration to pytest 2017-07-28 23:15:59 -03:00
Bruno Oliveira 768edde899 Merge pull request #2624 from nicoddemus/lf-report-after-collection
Fix --last-failed reported items in terminal
2017-07-28 14:48:23 -03:00
Ronny Pfannschmidt be401bc2f8 fix linting issues 2017-07-28 18:27:59 +02:00
Ronny Pfannschmidt 06a49338b2 make Test Outcomes inherit from BaseException instead of exception
fixes #580
2017-07-28 15:28:51 +02:00
Bruno Oliveira 7a12acb6a1 Fix linting 2017-07-28 08:54:55 -03:00
Bruno Oliveira 5acb64be90 Add versionadded tag to pytest_report_collectionfinish hook 2017-07-28 08:54:55 -03:00
Bruno Oliveira 75e6f7717c Use new hook to report accurate tests skipped in --lf and --ff 2017-07-28 08:54:55 -03:00
Ronny Pfannschmidt 17121960b4 Merge pull request #2621 from nicoddemus/cumulative-cache
Make cache plugin cumulative
2017-07-28 13:46:37 +02:00
Bruno Oliveira 7082320f3f Apply modifications requested in review 2017-07-28 07:55:34 -03:00
Bruno Oliveira 6fe7069cbb Move historical notes to their own doc
Fix #2512
2017-07-27 20:47:12 -03:00
Bruno Oliveira d46006f791 Fixes in "contact" doc 2017-07-27 19:28:55 -03:00
Bruno Oliveira f770f16294 Replace deprecated "config.option.<name>" usages from docs 2017-07-27 19:18:44 -03:00
Bruno Oliveira eb1bd3449e xfail and skipped tests are removed from the "last-failed" cache
This accommodates the case where a failing test is marked as
skipped/failed later
2017-07-27 18:43:04 -03:00
Bruno Oliveira 22212c4d61 Add xfail specific tests 2017-07-27 14:40:21 -03:00
Bruno Oliveira 62810f61b2 Make cache plugin always remember failed tests 2017-07-27 14:40:21 -03:00
Ronny Pfannschmidt e97fd5ec55 Merge pull request #2623 from nicoddemus/post-collection-report-hook
Introduce new pytest_report_collectionfinish hook
2017-07-27 17:17:21 +02:00