Commit Graph

97 Commits

Author SHA1 Message Date
Bruno Oliveira eada0b1fd7 Merge remote-tracking branch 'upstream/master' into release-3.7.0 2018-07-30 20:12:30 +00:00
Bruno Oliveira 8609f8d25a Move warning definition to deprecated module 2018-07-30 14:25:29 -03:00
Bruno Oliveira cf6d8e7e53 Fix test and update warning in pytest_namespace docs 2018-07-30 12:16:42 -03:00
Bruno Oliveira e3d412d1f4 Warn when implementations exist for pytest_namespace hook
This hook has been deprecated and will be removed in the future.

Fix #2639
2018-07-29 22:20:23 -03:00
Kale Kundert bf127a63b2
Need to iterate over the flattened array. 2018-07-27 11:24:42 -07:00
Bruno Oliveira d0ba242c46 Implement change suggested by @kalekundert in PR 2018-07-27 15:07:20 -03:00
Bruno Oliveira 57b0c60cb4 Remove Testdir.run_example as recommended 2018-07-26 20:10:40 -03:00
Bruno Oliveira 011f88f7e7 Deprecate calling fixture functions directly
This will now issue a RemovedInPytest4Warning when the user calls
a fixture function directly, instead of requesting it from test
functions as is expected

Fix #3661
2018-07-26 19:58:42 -03:00
abrammer f0db64ac2e drop the duplicate approx call
update test to include both np.array(actual) and np.array(expected)
2018-07-24 21:18:44 -04:00
Bruno Oliveira f5165064ee Make yield_fixture just call fixture to do its work
Since fixture and yield_fixture are identical, they should call
the same code; as it was, the code inside them was already starting
to deviate.
2018-07-22 09:41:03 -03:00
Bruno Oliveira c9a0881309 Isolate the code that resolves the fixturefunc to a separate function
pytest_fixture_setup was somewhat convoluted because it was trying
to do too many things.
2018-07-22 09:37:41 -03:00
Bruno Oliveira 5167933395 Move teardown code of yield fixtures to a partial to avoid leaks
As it were before, it was keeping a reference to fixturefunc and it
alive when an error occurred
2018-07-22 09:27:34 -03:00
Alan 7bff5866b1 bugfix in ApproxNumpy initialisation, use keywords for arguments now 2018-07-18 17:29:55 -04:00
Bruno Oliveira 0bb29d5649
Merge pull request #3685 from nicoddemus/merge-master-into-features
Merge master into features
2018-07-15 16:53:39 -03:00
Bruno Oliveira ac9ceaacd8 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-07-15 11:54:14 -03:00
Tadek Teleżyński d2fe619120 Fix truncated locals in verbose mode 2018-07-15 11:30:26 -03:00
Vlad Shcherbina 58e77f58bd Replace broken type annotations with type comments
Fixes #3635.
2018-07-15 16:58:39 +03:00
Bruno Oliveira f6ceedd15b
Merge pull request #3636 from RonnyPfannschmidt/fixturetest-examples
[RFC] Fixturetest examples - move test contents to use example scripts for contents
2018-07-11 23:29:33 -03:00
Bruno Oliveira 3e599dc149 Check that param sets match number of args during _for_parametrize
It makes sense to validate them during creation of the parameter set
2018-07-11 22:57:53 -03:00
Bruno Oliveira 54fbc6f6e1 Refactor parametrize() code for readability
Extract the parametrize() block of code into methods for better
readability
2018-07-11 21:29:21 -03:00
Anthony Sottile 61301d934e Remove some extraneous `# noqa` comments
This was partially automated with https://github.com/asottile/yesqa

_with a few caveats_:
- it was run under python2 (chosen arbitrarily, when run under python3 other
  things were changed)
- I used `git checkout -p` to revert the removal of `noqa` comments from
  `cmp()` lines.
2018-07-08 17:05:52 -07:00
Anthony Sottile 4ae93a7a07 Remove obsolete __future__ imports 2018-07-08 08:37:02 -07:00
Anthony Sottile 42bbb4fa8a Use -mpytest when invoking pytest in pytester 2018-07-07 17:18:44 -07:00
Bruno Oliveira 303133f013
Merge pull request #3647 from jeffreyrack/3610-add-trace-option
3610 add trace option
2018-07-07 10:05:34 -03:00
Bruno Oliveira 027d2336b8 Add minimal docs for package-scoped fixtures (experimental) 2018-07-05 21:56:31 -03:00
Bruno Oliveira 3c19370cec Merge remote-tracking branch 'upstream/features' into jonozzz/features 2018-07-05 18:15:17 -03:00
Bruno Oliveira 7696d5371a Merge remote-tracking branch 'upstream/master' into features 2018-07-04 18:49:35 -03:00
Jean-Paul Calderone 55ebf261ce Switch to new API 2018-07-03 13:37:03 -04:00
Jeffrey Rackauckas 4afb8c428b Fix python 2 issues 2018-07-02 20:20:42 -07:00
Jeffrey Rackauckas 10a8691eca Add support for yielded functions. 2018-07-02 19:46:26 -07:00
Jeffrey Rackauckas b75320ba95 Fix --trace option with yield tests. 2018-07-02 19:08:41 -07:00
T.E.A de Souza a43205b4bc
Fix monkeypatch doc
`delenv` is incorrectly documented.
2018-07-02 21:01:41 +08:00
Jeffrey Rackauckas 0b70477930 Fix linting issues. 2018-07-01 20:18:00 -07:00
Jeffrey Rackauckas 66fa6bb42e Fix flake8 issues. 2018-07-01 18:50:57 -07:00
Jeffrey Rackauckas a46b94950c Properly set immediately_break value 2018-06-30 21:32:25 -07:00
Jeffrey Rackauckas 54d3cd587d Adding the --trace option. 2018-06-30 18:09:06 -07:00
Bruno Oliveira 2b75a311a7
Merge pull request #3637 from RonnyPfannschmidt/fix-3631
fix #3631 - don't store legacy markinfo when its impossible
2018-06-30 17:48:46 -03:00
Victor 342f2cdc17 Fixes #3630 2018-06-29 16:09:39 +02:00
Ronny Pfannschmidt 5bd5b8c68a fix #3631 - don't store legacy markinfo when its impossible 2018-06-29 14:01:20 +02:00
Ronny Pfannschmidt 0fd86ec8a8 move some fill fixture acceptance tests contents to the examples script folder 2018-06-29 10:58:33 +02:00
Bruno Oliveira 8680dfc939
Merge pull request #3629 from egnartsms/issue-2220-param-breaks-dep
Make test parametrization override indirect fixtures
2018-06-28 21:43:21 -03:00
Ronny Pfannschmidt 3c73d6298a merge from master to features 2018-06-28 17:32:41 +02:00
Serhii Mozghovyi c220fb235a Minor fix (code improvement) 2018-06-28 14:53:06 +03:00
Serhii Mozghovyi 1dc5e97ac2 Make test parametrization override indirect fixtures 2018-06-28 14:32:29 +03:00
Bruno Oliveira e9371a58a0
Merge pull request #3622 from RonnyPfannschmidt/builtin-serialize
move report classes to own file to prepare for serialisazion
2018-06-27 15:17:09 -03:00
Ronny Pfannschmidt 17e01993d9 regendoc and invocation fixes 2018-06-27 08:28:21 +02:00
Ronny Pfannschmidt 581d49635e add docs and changelog 2018-06-27 06:52:36 +02:00
Ronny Pfannschmidt e860ff7299 port some acceptance tests over to copy_example 2018-06-26 22:59:40 +02:00
Ronny Pfannschmidt 0672bc633f enable pytester to run examples copied from the cwd 2018-06-26 22:48:33 +02:00
Ronny Pfannschmidt 2dfb52f7e0 fix rebase artifacts 2018-06-26 22:10:26 +02:00