Bruno Oliveira
569c091769
Add FunctionDefinition to the reference docs
...
Fix #7968
2020-10-31 08:45:34 -03:00
Bruno Oliveira
0c7233032f
Manually add the remaining 4.6.x release notes to the changelog
...
Fix #7967
2020-10-31 08:36:26 -03:00
Ran Benita
531416cc5a
code: simplify Code construction
2020-10-31 12:40:25 +02:00
Ran Benita
6506f016ac
testing/test_source: use unqualified imports
2020-10-31 12:40:25 +02:00
Ran Benita
a1df458e85
code: use properties for derived attributes, use slots
...
Make the objects more light weight.
Remove unused properties.
2020-10-31 12:40:25 +02:00
Ariel Pillemer
a7e38c5c61
pytest-dev#7942 test_runner_xunit.py ( #7964 )
2020-10-31 12:38:11 +02:00
crricks
3c7eb5a398
migrated test_nodes.py from testdir to pytester #7492 . ( #7969 )
2020-10-30 22:34:05 +02:00
Ran Benita
ad94456ca0
Merge pull request #7976 from symonk/7942-refactor-stepwise-to-use-pytester
...
#7942 refactor stepwise tests to utilize pytester
2020-10-30 22:15:12 +02:00
Christine Mecklenborg
aa843746a4
Migrate test_error_diffs.py from testdir to pytester ( #7971 )
2020-10-30 22:12:40 +02:00
symonk
c58abf7ad1
#7942 refactor stepwise tests to utilize pytester
2020-10-30 19:21:42 +00:00
Ran Benita
5913cd20ec
assertion/util: remove unhelpful `type_fns` indirection
...
It doesn't serve any purpose that I am able to discern.
2020-10-30 21:15:48 +02:00
Simon K
6cddeb8cb3
#7938 - [Plugin: Stepwise][Enhancements] Refactoring, smarter registration & --sw-skip functionality ( #7939 )
...
* adding --sw-skip shorthand for stepwise skip
* be explicit rather than implicit with default args for stepwise
* add constant for sw cache dir; only register plugin if necessary rather check check activity always;
* use str format; remove unused args in hooks
* assert cache upfront, allow stepwise to have a reference to the cache
* type hinting lf, skip, move literal strings into module constants
* convert parametrized option into a list
* add a sessionfinish hook for stepwise to keep backwards behaviour the same
* add changelog for #7938
* Improve performance of stepwise modifyitems & address PR feedback
* add test for stepwise deselected based on performance enhancements
* Apply suggestions from code review
* delete from items, account for edge case where failed_index = 0
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-10-30 19:13:06 +00:00
Ran Benita
0cd190f037
Merge pull request #7970 from cmecklenborg/pytester_refactor_test_assertion
...
Migrate test_assertion.py from testdir to pytester
2020-10-30 20:56:21 +02:00
Christine Mecklenborg
47ff911c8f
Migrate test_assertion.py from testdir to pytester
2020-10-29 20:39:44 -05:00
Ran Benita
8f52fc777a
Merge pull request #7962 from bluetech/mypy-typed-deps
...
pre-commit: install typed dependencies in the mypy target
2020-10-29 17:52:12 +02:00
Ran Benita
65dfa98877
Merge pull request #7961 from bluetech/rm-checkqa-mypy
...
tox: remove checkqa-mypy environment
2020-10-29 17:25:51 +02:00
Christine Mecklenborg
65148e3120
Migrate test_compat.py from testdir to pytester ( #7963 )
2020-10-29 09:56:34 +02:00
Christine Mecklenborg
460b51dd95
Migrate test_setuponly.py from testdir to pytester ( #7959 )
2020-10-29 09:55:30 +02:00
Christine Mecklenborg
efe470bf1c
Migrate test_assertrewrite.py from testdir to pytester ( #7952 )
2020-10-29 09:54:34 +02:00
Ran Benita
e3ce5d6b53
pre-commit: install typed dependencies in the mypy target
...
Otherwise, mypy doesn't know about them and their types are considered
Any.
2020-10-28 22:22:33 +02:00
Ran Benita
de810152ec
tox: remove checkqa-mypy environment
...
We run mypy through pre-commit, and we don't keep duplicate targets in
tox for all of the other linters. Since this adds some (small)
maintenance overhead, remove it.
2020-10-28 22:16:25 +02:00
Bruno Oliveira
b95991aeea
Merge pull request #7960 from nicoddemus/cherry-pick-release
...
Merge pull request #7958 from pytest-dev/release-6.1.2
2020-10-28 14:36:37 -03:00
Bruno Oliveira
5711ced250
Merge pull request #7958 from pytest-dev/release-6.1.2
...
Prepare release 6.1.2
(cherry picked from commit 1ed903e8fcbe60f8ce25b8911641059cd89d892b)
2020-10-28 14:23:09 -03:00
Christine M
8d369f73ba
Migrate test_skipping.py from testdir to pytester ( #7953 )
2020-10-28 17:05:54 +02:00
Ran Benita
6cd6d9b61a
Merge pull request #7949 from gcamargo1/gcamargo1-patch-1
...
Update doctest.rst
2020-10-28 15:56:59 +02:00
Vasilis Gerakaris
a431310c0a
Increase temp dir deletion period to 3 days ( #7914 )
...
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-10-28 08:23:35 -03:00
Ran Benita
78c09b9931
Merge pull request #7944 from symonk/refactor-test-mark-to-use-pytester
...
Refactor test_warning_types.py & test_mark.py to use pytester
2020-10-27 21:06:42 +02:00
symonk
434e30424e
Address feedback for converting testdir to pytester
2020-10-27 17:50:54 +00:00
Gustavo Camargo
b308c6ddb3
Update doctest.rst
2020-10-26 14:30:00 -05:00
Ran Benita
0fe8a8dfe6
Merge pull request #7945 from proggga/fix_test_helpconfig_7942
...
#7942 test_helpconfig.py migrate from testdir to pytester
2020-10-26 17:52:41 +02:00
Mikhail Fesenko
cd9b3618c7
#7942 test_helpconfig.py migrate from testdir to pytester
2020-10-26 18:30:48 +03:00
Bruno Oliveira
20b710c4b4
Merge pull request #7948 from bluetech/testing-conftest-pytester
...
testing: make conftest stuff check for pytester not testdir
2020-10-26 12:08:19 -03:00
Ran Benita
c31f4dc112
testing: make conftest stuff check for pytester not testdir
...
testdir uses pytester so this applies to it as well, but now includes
pytester as well.
2020-10-26 15:01:38 +02:00
Ran Benita
096d096539
Merge pull request #7946 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-django-4.1.0
...
build(deps): bump pytest-django from 4.0.0 to 4.1.0 in /testing/plugins_integration
2020-10-26 14:36:49 +02:00
dependabot[bot]
f7c5067823
build(deps): bump pytest-django in /testing/plugins_integration
...
Bumps [pytest-django](https://github.com/pytest-dev/pytest-django ) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/pytest-dev/pytest-django/releases )
- [Changelog](https://github.com/pytest-dev/pytest-django/blob/master/docs/changelog.rst )
- [Commits](https://github.com/pytest-dev/pytest-django/compare/v4.0.0...v4.1.0 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 03:15:50 +00:00
symonk
cde50db6e7
add type hint to parametrized warning_class
2020-10-25 18:31:43 +00:00
symonk
c818ac2248
Tidy up type hints for pytest in test_marks & test_warning_types
2020-10-25 18:03:59 +00:00
symonk
6b7203aba7
add conversion for test_warning_types.py also
2020-10-25 17:38:12 +00:00
symonk
7495d2c345
add missing pytester type hints
2020-10-25 17:33:40 +00:00
symonk
1bd83e75a4
refactor test mark to use new pytester
2020-10-25 17:27:19 +00:00
Ran Benita
8105e60f20
Merge pull request #7937 from bluetech/testing-fixes
...
testing: fix pexpect hang
2020-10-25 16:53:03 +02:00
Ran Benita
ca82214444
pytester: workaround issue causing spawn to crash or hang
...
In pytester tests, pytest stashes & restores the sys.modules for each
test. So if the test imports a new module, it is initialized anew each
time.
Turns out the readline module isn't multi-init safe, which causes
pytester.spawn to crash or hang. So preserve it as a workaround.
2020-10-25 16:31:47 +02:00
Ran Benita
897f151e94
testing: use pytester.spawn instead of testdir
...
Part of investigating a bug, but didn't fix it.
2020-10-25 10:11:10 +02:00
Ran Benita
25dee8fef6
testing: fix test_assertrewrite with PYTHONPYCACHEPREFIX
...
Make the tests work when running with PYTHONPYCACHEPREFIX (possible when
running in a dirty environment, not under tox).
2020-10-25 10:11:10 +02:00
Ran Benita
d9ac2efbcd
testing: python 3.10 fix
2020-10-25 01:27:44 +02:00
Ran Benita
65e6e39b76
Merge pull request #7931 from bluetech/xunit-quadratic-2
...
fixtures: fix quadratic behavior in the number of autouse fixtures
2020-10-25 01:24:38 +03:00
Ran Benita
470ea504e2
fixtures: fix quadratic behavior in the number of autouse fixtures
...
It turns out all autouse fixtures are kept in a global list, and thinned
out for a particular node using a linear scan of the entire list each
time.
Change the list to a dict, and only take the nodes we need.
2020-10-25 00:49:23 +03:00
Ran Benita
d6becfa177
fixtures: change _getautousenames to an iterator
...
This reads better.
2020-10-25 00:49:06 +03:00
Ran Benita
aa0e2d654f
fixtures: use a faster replacement for ischildnode
...
ischildnode can be quite hot in some cases involving many fixtures.
However it is always used in a way that the nodeid is constant and the
baseid is iterated. So we can save work by pre-computing the parents of
the nodeid and use a simple containment test.
The `_getautousenames` function has the same stuff open-coded, so change
it to use the new function as well.
2020-10-25 00:48:35 +03:00
Bruno Oliveira
f7d4f457d0
Merge pull request #7934 from symonk/small-adjustment-to-hookspec-docstrings
...
Replace term 'triple' with 'tuple' in hookspec docstrings
2020-10-24 08:01:05 -03:00