Commit Graph

11691 Commits

Author SHA1 Message Date
Bruno Oliveira ef283efc42
Merge pull request #6624 from nicoddemus/gh-notes-wrap
Use --wrap=preserve in release notes script
2020-01-29 22:36:42 -03:00
Daniel Hahler 10b1b79f4e
Merge pull request #6623 from blueyed/move-back-test_getfslineno
tests: move test_getfslineno back
2020-01-30 02:17:25 +01:00
Bruno Oliveira 6d7e06e6be Use --wrap=preserve in release notes script
Follow up to #6621 after premature merge
2020-01-29 20:28:04 -03:00
Daniel Hahler 78eddcb5b1 tests: move test_getfslineno back
Reverts https://github.com/pytest-dev/pytest/pull/6610.

The tested `getfslineno` is `src/_pytest/_code/source.py` actually,
exported via `src/_pytest/_code/__init__.py`.
I've confused it with the one in `src/_pytest/compat.py` apparently.
2020-01-29 23:47:39 +01:00
Bruno Oliveira 757873edb3
Docs: Don't wrap the markdown for GitHub releases (#6621)
Docs: Don't wrap the markdown for GitHub releases
2020-01-29 19:38:17 -03:00
Daniel Hahler 66330444a3
Merge pull request #6611 from blueyed/test_code-imports
tests: test_code: improve/clarify imports
2020-01-29 21:23:37 +01:00
Hugo van Kemenade 97f1645993 Don't wrap the markdown for GitHub releases 2020-01-29 21:56:01 +02:00
Daniel Hahler 3dbc61dd80 tests: test_code: improve/clarify imports 2020-01-29 19:44:37 +01:00
Daniel Hahler b42938421e
Merge pull request #6610 from blueyed/tests-move-test_getfslineno
tests: move test_getfslineno
2020-01-29 19:43:28 +01:00
Daniel Hahler 87fecce77b
Merge pull request #6600 from blueyed/harden-test_teardown_many_verbose
tests: harden test_teardown_many_verbose
2020-01-29 18:56:10 +01:00
Daniel Hahler 05d953d9e4
Merge pull request #6620 from blueyed/cp-release
doc: release-5.3.5
2020-01-29 18:42:27 +01:00
Daniel Hahler d478e2bbca doc: release-5.3.4
(cherry picked from commit fd1a51a23fa687cf344f3506dff6cde0166faf2c)
2020-01-29 18:28:11 +01:00
Bruno Oliveira 8c41236c66
doc: getting-started.rst: mention "Test" prefix for classes (#6583)
doc: getting-started.rst: mention "Test" prefix for classes
2020-01-29 12:49:49 -03:00
Bruno Oliveira 99b90f45d0
extend the incremental marker for parametrize (#6582)
extend the incremental marker for parametrize
2020-01-29 08:37:33 -03:00
sdementen d848a20563 Extend the incremental marker for parametrize
The incremental marker is adapted to handle properly test classes with parametrize defined at class level.

Fix #3125
2020-01-29 08:25:17 -03:00
Daniel Hahler 3f4b8d3aec test_code: improve coverage 2020-01-29 02:54:12 +01:00
Daniel Hahler a3f482ceba tests: move test_getfslineno
It should be in `test_code` when testing `_pytest._code.getfslineno`,
not to be confused with `_pytest._code.source.getfslineno`.

Adds an extra assert (via https://github.com/pytest-dev/pytest/pull/6590).
2020-01-29 01:26:10 +01:00
Daniel Hahler 8e1d59a8dd
Merge pull request #6579 from blueyed/pytester-makefile-joins-abspath
pytester: test for _makefile joining an absolute path
2020-01-29 00:58:43 +01:00
Daniel Hahler 7eaf98af4b
Merge pull request #6589 from blueyed/ci-less-coverage
ci: GHA: run less jobs with coverage
2020-01-29 00:57:29 +01:00
Bruno Oliveira d282424589
Fix unguarded `==` comparison in fixtures. (#6541)
Fix unguarded `==` comparison in fixtures.
2020-01-28 20:54:14 -03:00
Daniel Hahler 4ff90b1fcf
Merge pull request #6606 from blueyed/typing-monkeypatch-context
typing: MonkeyPatch.context
2020-01-29 00:12:53 +01:00
Daniel Hahler 2d29c3e7d1
Merge pull request #6604 from blueyed/tests-_compute_fixture_value-cover-abs-source_path_str
tests: cover absolute path handling in _compute_fixture_value
2020-01-29 00:11:58 +01:00
Holger Kohr 80d4dd6f0b Replace `==` with `is` for comparison of cache keys
Closes #6497
2020-01-28 18:05:53 -03:00
Daniel Hahler e25d46aae6 typing: MonkeyPatch.context 2020-01-28 21:44:30 +01:00
Daniel Hahler 7c87874277 source_path: py.path.local directly
Via bc7282576.
2020-01-28 19:02:41 +01:00
Daniel Hahler 1cf9e68dbc tests: cover absolute path handling in _compute_fixture_value 2020-01-28 18:53:28 +01:00
Daniel Hahler b2e6f66438 ci: GHA: run less jobs with coverage
This often might be causing for jobs to take longer than 10 minutes,
which is a timeout Codecov uses to wait for successful CI.

Also it is good in general to have CI finish faster, of course.
2020-01-28 17:38:53 +01:00
Daniel Hahler b01e379428 tests: harden test_teardown_many_verbose 2020-01-28 16:37:18 +01:00
Daniel Hahler 18ac7e0b79
Merge pull request #6593 from blueyed/typing-ignore-more-itertools
typing: ignore false positive with more-itertools
2020-01-28 14:24:24 +01:00
Ronny Pfannschmidt c854daa234
Merge pull request #6595 from blueyed/fix-typing-code-path
typing: fix Code.path
2020-01-28 11:23:49 +01:00
Daniel Hahler 12c5a6af64 typing: fix Code.path
Fixes:

> src/_pytest/_code/code.py:83: error: Incompatible types in assignment
>   (expression has type "str", variable has type "local")  [assignment]
2020-01-28 01:49:45 +01:00
Daniel Hahler 35ba053f00 typing: ignore false positive with more-itertools
Fixed in https://github.com/erikrose/more-itertools/pull/374.
2020-01-28 01:23:44 +01:00
Daniel Hahler d0cb16010b
Merge pull request #6580 from blueyed/typing-testdir-init
typing: Testdir.__init__
2020-01-28 00:58:11 +01:00
Daniel Hahler ad0f4f0ac0 tests: cover collect_by_name with non-existing 2020-01-28 00:41:46 +01:00
Daniel Hahler 9c716e4d74 typing: Testdir.plugins 2020-01-28 00:41:46 +01:00
Daniel Hahler 94ac0f7e6b typing: self._mod_collections, collect_by_name 2020-01-28 00:41:46 +01:00
Daniel Hahler 440881d63a typing: Testdir.__init__ 2020-01-28 00:41:46 +01:00
Daniel Hahler aa318e9adf
Merge pull request #6587 from blueyed/mypy-show_error_codes
mypy: show_error_codes=True
2020-01-27 22:58:48 +01:00
Daniel Hahler 20b66e60c0
Merge pull request #6566 from blueyed/rm-encodedfile-writelines
Fix `EncodedFile.writelines`
2020-01-27 22:58:31 +01:00
Daniel Hahler d017b69f38 mypy: show_error_codes=True 2020-01-27 22:18:35 +01:00
ParetoLife cbad319736
Update getting-started.rst
From the description it seemed to me as if just prefixing your methods with ``test_`` was enough, but you also need to prefix your class with ``Test``. Of course, in the reference material this is clearly stated, but I think it makes sense to mention it here as well, since you also mention the part about the methods' prefix.
2020-01-27 10:50:05 +01:00
Zac Hatfield-Dodds a9eab07739
Merge pull request #6576 from blueyed/test_via_exec
tests: add test_via_exec
2020-01-27 17:57:28 +11:00
Daniel Hahler c2980eb80f pytester: test for _makefile joining an absolute path
Ref: https://github.com/pytest-dev/pytest/pull/6578#discussion_r371035867
2020-01-27 01:00:55 +01:00
Daniel Hahler bf5c76359c fixup! typing: tests: tmpfile 2020-01-26 23:14:32 +01:00
Daniel Hahler 40758e86ca tests: add test_via_exec
Via https://github.com/pytest-dev/pytest/issues/6574.
2020-01-26 23:04:18 +01:00
Daniel Hahler d678d380cb typing: tests: tmpfile 2020-01-25 19:21:19 +01:00
Daniel Hahler 3f8f395210 typing: EncodedFile 2020-01-25 19:20:48 +01:00
Daniel Hahler 7c52a37d46
Merge pull request #6572 from blueyed/fix-test_collection_collect_only_live_logging
tests: test_collection_collect_only_live_logging: allow for 1+s
2020-01-25 19:05:37 +01:00
Daniel Hahler 198b1dcffd
Merge pull request #6573 from blueyed/codecov-curl-retry-connrefused
ci: codecov: use `--retry-connrefused` with curl
2020-01-25 19:05:13 +01:00
Daniel Hahler df1f43ee28 ci: codecov: use `--retry-connrefused` with curl
While it might not help with the following, it certainly might happen as
well.

```
+ curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh
curl: (16) Error in the HTTP2 framing layer
```
2020-01-25 18:22:03 +01:00