Anthony Sottile
2368fbb63c
Apply reorder-python-imports to all files
2018-10-25 00:01:29 -07:00
Bruno Oliveira
02ae7d8531
Improve error message when a recursive dependency between fixtures is detected
...
Fix #2909
2018-10-20 09:44:42 -03:00
Bruno Oliveira
9646a1cd7a
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-15 12:55:28 -03:00
Bruno Oliveira
4808145846
test_request_garbage is flaky when running with xdist
...
Example failure:
https://travis-ci.org/pytest-dev/pytest/jobs/441305926#L545
2018-10-14 15:17:08 -03:00
Bruno Oliveira
933de16fe4
Merge pull request #3988 from RonnyPfannschmidt/tmpdir-port-pathlib
...
Tmpdir port pathlib
2018-10-12 08:33:47 -03:00
Ronny Pfannschmidt
00716177b4
fix missed Path import
2018-10-11 07:15:09 +02:00
Bruno Oliveira
5436e42990
Use pytest.fail(..., pytrace=False) when treating user errors
...
This prevents an enormous and often useless stack trace from showing
to end users.
Fix #3867
Fix #2293
2018-10-10 19:16:53 -03:00
Bruno Oliveira
9a3836a0cf
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-10-09 19:34:04 -03: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
56d0b5a7e2
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-09-22 18:14:36 -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
Bruno Oliveira
482bd5efd2
Show deprecation warning for cached_setup
2018-09-13 14:25:46 -03:00
Bruno Oliveira
29e114b463
Try to fix test in MacOS-X
2018-08-27 19:27:51 -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
Ronny Pfannschmidt
ca0476953e
Merge pull request #3751 from nicoddemus/collect-file-bug
...
Workaround for #3742
2018-08-02 07:35:46 +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
e1ad1a14af
Add example script and failure for #3742
2018-07-31 17:50:55 -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
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
3c19370cec
Merge remote-tracking branch 'upstream/features' into jonozzz/features
2018-07-05 18:15:17 -03:00
Ronny Pfannschmidt
0fd86ec8a8
move some fill fixture acceptance tests contents to the examples script folder
2018-06-29 10:58:33 +02:00
Ronny Pfannschmidt
4ae7e9788c
fix quotes in scope order test
2018-06-29 07:13:18 +02:00
Ronny Pfannschmidt
5582ad0445
remove use of formatting in test_func_closure_module_auto
...
this makes it apparent that pytester should supply some kind of variable support
2018-06-29 07:07:03 +02:00
Ronny Pfannschmidt
982b614010
remove format calls for most fixture tests
2018-06-29 07:07:03 +02:00
Ronny Pfannschmidt
7845ab4bc3
remove test file formatting from TestContextManagerFixtureFuncs
2018-06-29 07:07:03 +02:00
Anthony Sottile
cbaa7dd56a
Upgrade pre-commit hooks except pyupgrade
2018-06-26 06:35:27 -07:00
Bruno Oliveira
5ea647a245
Attempt to fix flaky test_request_garbage on Windows
...
Fix #3564
2018-06-10 19:18:44 -03:00
Ronny Pfannschmidt
703e4b11ba
run black
2018-05-23 16:48:46 +02:00
Ronny Pfannschmidt
9aacb4635e
run pyupgrade
2018-05-23 16:45:09 +02:00
Bruno Oliveira
674879976f
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2018-05-18 12:30:08 -03:00
Ville Skyttä
aa51fcb2b6
Spelling and grammar fixes
2018-05-13 12:06:09 +02:00
Bruno Oliveira
fa76a5c8fe
Attempt to fix flaky test on Python 2
...
This test sometimes fails on AppVeyor with:
```
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.0 = <listiterator object at 0x0549DC50>
leaked_types = sum(1 for _ in gc.garbage
> if 'PseudoFixtureDef' in str(_))
E UnicodeEncodeError: 'ascii' codec can't encode character u'\u263a' in position 23: ordinal not in range(128)
test_request_garbage.py:19: UnicodeEncodeError
====================== 1 passed, 1 error in 1.39 seconds ======================
```
Use our internal "safe_repr" function to handle Encode errors: who knows
what objects are in garbage after all.
2018-05-04 17:56:51 -03:00
turturica
d483b401ee
Merge remote-tracking branch 'upstream/features' into features
2018-04-24 13:45:10 -07:00
turturica
acacf75f49
Added another package-scoped fixture test.
...
Changed existing complex tests to use package fixtures.
2018-04-24 13:32:58 -07:00
Bruno Oliveira
132fb61eba
Merge remote-tracking branch 'upstream/features' into ApaDoctor/disable-repeated-fixture
2018-04-23 22:24:53 -03:00
Bruno Oliveira
03850cf962
Add test for applying fixture twice
...
Fix #2334
2018-04-23 22:17:46 -03:00
turturica
2b1410895e
Add package scoped fixtures #2283
2018-04-11 15:39:42 -07:00
Ronny Pfannschmidt
180ae09202
deprecate markinfo and fix up most marker scoping access while completely breaking metafunc testing
2018-03-29 17:52:01 +02:00
Bruno Oliveira
59e7fd478e
Sort fixtures by scope when determining fixture closure
...
Fix #2405
2018-03-20 20:10:53 -03:00
Bruno Oliveira
9e24b09a9f
Use re_match_lines in test_class_ordering
...
"[1-a]" works fine using fnmatch_lines, but "[a-1]" breaks horribly
inside `re`.
2018-03-20 20:10:52 -03:00
Allan Feldman
aa53e37fa2
Add a test to expose leaked PseudoFixtureDef types.
2018-02-21 22:42:44 -08:00
Aaron
4458e65fe7
Fix ordering of tests to minimize fixture creating
2018-02-01 13:07:45 -08:00
Bruno Oliveira
af37778b0d
All classes now subclass object for better py3 compatibility
...
Fix #2147
2018-01-24 18:23:42 -02:00