Commit Graph

430 Commits

Author SHA1 Message Date
Anthony Sottile 1caf6d5907 Upgrade pre-commit hooks 2018-10-08 10:10:46 -07:00
Ronny Pfannschmidt 66609665f2
Merge pull request #4076 from nicoddemus/unittest-param-fixture-msg
Improve error message when TestCase functions use a parametrized fixture
2018-10-06 07:43:57 +02:00
Bruno Oliveira 212937eb3e Improve error message when TestCase functions use a parametrized fixture
Fix #2535
2018-10-03 19:43:46 -03:00
Bruno Oliveira 70c7273640 Fix request.fixturenames to return fixtures created dynamically
Fix #3057
2018-10-03 18:50:14 -03:00
Bruno Oliveira 41f6ea13ce Fix 'Package has no len()' error during collection
Fix #3749
2018-09-20 17:53:21 -03:00
Bruno Oliveira 27772f67c0
Merge pull request #3987 from nicoddemus/fix-find-scope-3941
Fix scope determination with indirect parameters
2018-09-19 20:06:45 -03:00
Bruno Oliveira 86a14d007d Fix scope determination with indirect parameters
Fix #3941
2018-09-14 21:33:59 -03:00
Bruno Oliveira 87ddb2dbd5 Change flaky test_request_garbage to provide more debug information
This test fails *very* rarely when running in xdist.
2018-09-14 15:25:45 -03:00
Ronny Pfannschmidt a0ce9a4441 remove the legacy code about im_func and generalize using fix and compat.getimfunc 2018-09-13 15:38:36 +02:00
Bruno Oliveira c00d934b21
Merge pull request #3933 from nicoddemus/idval-hypothesis-flaky-3707
Use -n auto now that xdist behaves well in Travis and AppVeyor
2018-09-06 15:15:55 -03:00
Bruno Oliveira 5eb85efa14 Use -n auto now that xdist behaves well in Travis and AppVeyor
This hopefully fixes the flaky test_idval_hypothesis on AppVeyor

Fix #3707
2018-09-06 09:22:13 -03:00
Bruno Oliveira adc9ed85bc Fix test_idval_hypothesis 2018-09-04 18:49:20 -03:00
Bruno Oliveira 5a52acaa92 Make config no longer optional in parametrize id functions 2018-09-04 16:55:52 -03:00
Bruno Oliveira b42518acd5 Change std_warn to receive a single warning instance, addressed review suggestions 2018-09-04 14:20:42 -03:00
Bruno Oliveira 9965ed84da Show deprecation warnings by default if no other filters are configured
Fix #2908
2018-09-04 11:35:34 -03:00
Bruno Oliveira 78ac7d99f5 Deprecate Config.warn and Node.warn, replaced by standard warnings 2018-09-04 11:35:34 -03:00
Bruno Oliveira 0c8dbdcd92 Fix existing tests now that we are using standard warnings 2018-09-04 11:35:34 -03:00
Bruno Oliveira 29e114b463 Try to fix test in MacOS-X 2018-08-27 19:27:51 -03:00
turturica 8cf0e46bbf test_package_ordering: Collect *.py, but keep a mix of case for filenames. The test doesn't make sense for Windows, because of its case-insensitivity. 2018-08-24 16:23:50 -07:00
Bruno Oliveira f0226e9329 Fix test_package_ordering on Windows 2018-08-24 20:15:33 -03:00
turturica dce8df45d5 Added changelog items. 2018-08-24 15:51:42 -07:00
turturica e3df1031ca Add encoding: utf8 for python 2.7 2018-08-24 12:26:18 -07:00
turturica 459b040d21 Fix dedent after merge. 2018-08-24 11:54:04 -07:00
turturica 3396225f74 Merge branch 'master' of github.com:pytest-dev/pytest into fix-3854 2018-08-24 11:47:24 -07:00
turturica 5f8b50c094 Address #3796 and add a test for it. 2018-08-23 22:48:44 -07:00
Anthony Sottile 85482d575e Replace Source with dedent where possible 2018-08-23 09:06:17 -07:00
Anthony Sottile 0fc4a806e5 py.builtins._totext -> string literals or six.text_type 2018-08-22 23:00:04 -07:00
turturica 4d3c1ab4f0 Fixes #3854 2018-08-22 21:42:59 -07:00
turturica e92893ed24 Add test for packages mixed with modules. 2018-08-10 17:29:30 -07:00
Bruno Oliveira dcafb8c48c Add example for package recursion bug 2018-08-03 15:40:33 -03:00
Ronny Pfannschmidt ca0476953e
Merge pull request #3751 from nicoddemus/collect-file-bug
Workaround for #3742
2018-08-02 07:35:46 +02:00
Ronny Pfannschmidt 33769d0328
Merge pull request #3754 from nicoddemus/fix-function-call-warning
Refactor direct fixture call warning to avoid incompatibility with plugins
2018-08-02 07:17:15 +02:00
Bruno Oliveira c6b11b9f62 Refactor direct fixture call warning to avoid incompatibility with plugins
This refactors the code so we have the real function object right during
collection. This avoids having to unwrap it later and lose attached information
such as "async" functions.

Fix #3747
2018-08-01 16:38:43 -03:00
Bruno Oliveira 43664d7841 Use ids for parametrized values in test_expected_value_type_error 2018-08-01 07:34:08 -03:00
Bruno Oliveira 6e32a1f73d Use parametrize in repr test for nd arrays 2018-08-01 07:04:25 -03:00
Bruno Oliveira e1ad1a14af Add example script and failure for #3742 2018-07-31 17:50:55 -03:00
Kale Kundert 032db159c9
Let black reformat the code... 2018-07-31 11:23:23 -07:00
Kale Kundert cd2085ee71
approx(): Detect type errors earlier. 2018-07-31 00:26:35 -07:00
Kale Kundert 7d8688d54b
Reflect dimension in approx repr for numpy arrays. 2018-07-30 23:23:17 -07:00
Bruno Oliveira eada0b1fd7 Merge remote-tracking branch 'upstream/master' into release-3.7.0 2018-07-30 20:12:30 +00:00
abrammer 535fd1f311 may as well include inf test while we're at it 2018-07-29 23:12:04 -04:00
abrammer 330640eb96 update tests to check tolerance args and expecing nan in numpy arrays 2018-07-29 22:47:38 -04:00
Bruno Oliveira 6e57d123bb Mark test_idval_hypothesis as flaky on Windows (#3707) 2018-07-26 19:58:42 -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
abrammer 514ca6f4ad add test wrt #3695 checking numpy array tolerance args 2018-07-23 23:40:06 -04:00
Bruno Oliveira ac9ceaacd8 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-07-15 11:54:14 -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
Anthony Sottile 4ae93a7a07 Remove obsolete __future__ imports 2018-07-08 08:37:02 -07:00
Bruno Oliveira 3c19370cec Merge remote-tracking branch 'upstream/features' into jonozzz/features 2018-07-05 18:15:17 -03:00