Commit Graph

11737 Commits

Author SHA1 Message Date
Daniel Hahler 0ee007ca33
Fix CI (Travis) (#6704) 2020-02-10 20:52:21 +01:00
Daniel Hahler 449290406c test_argcomplete: remove usage of `distutils.spawn` (#6703)
Fixes collection error with Python 3.5.3 (Travis):

    testing/test_parseopt.py:2: in <module>
        import distutils.spawn
    .tox/py35-coverage/lib/python3.5/distutils/__init__.py:4: in <module>
        import imp
    .tox/py35-coverage/lib/python3.5/imp.py:33: in <module>
        PendingDeprecationWarning, stacklevel=2)
    E   PendingDeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

Build log: https://travis-ci.org/blueyed/pytest/builds/648305304
2020-02-10 11:52:19 +01:00
Daniel Hahler 12824e6279 ci: Travis: remove non-py35 jobs 2020-02-10 10:59:28 +01:00
Daniel Hahler a62d9a40e7 ci: Travis: 3.5.1: upgrade pip, setuptools, virtualenv
Ref: https://github.com/jaraco/zipp/issues/40
2020-02-10 10:53:42 +01:00
Daniel Hahler 30cb598e9c
Typing around/from types in docs (#6699) 2020-02-09 11:42:07 +01:00
Daniel Hahler a8fc056aad
Handle `Exit` exception in `pytest_sessionfinish` (#6660) 2020-02-07 00:40:10 +01:00
Minuddin Ahmed Rana ef437ea448
Remove incorrect choices comment (#6677) 2020-02-05 20:45:21 +01:00
Daniel Hahler cdc7e13067
pytester: clarify _makefile signature (#6675) 2020-02-05 20:42:57 +01:00
Daniel Hahler 632800add5
internal: clean up getfslineno (#6656) 2020-02-04 22:46:00 +01:00
Daniel Hahler bc494661ad
Remove testing/test_modimport.py (#6666) 2020-02-04 08:26:40 +01:00
Daniel Hahler 4316fe8a92
testing/conftest.py: testdir: set PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 (#6655)
Fixes https://github.com/pytest-dev/pytest/pull/4518.
2020-02-04 02:59:20 +01:00
Daniel Hahler aa0328782f
assertion: save/restore hooks on item (#6646) 2020-02-04 02:56:23 +01:00
Daniel Hahler 9c7f1d9b32 Remove compat.getfslineno 2020-02-04 02:40:59 +01:00
Daniel Hahler dab90ef726 typing: fix getfslineno
Closes https://github.com/pytest-dev/pytest/pull/6590.
2020-02-03 19:09:08 +01:00
Daniel Hahler 61f2a26675 Code/getfslineno: keep empty co_filename
Previously this would be turned via `py.path.local("")` into the current
working directory.

This appears to be what `fspath = fn and py.path.local(fn) or None`
tries to avoid in `getfslineno`'s `TypeError` handling already, if
`Code` would raise it.
2020-02-03 19:09:08 +01:00
Daniel Hahler b0d45267c5 internal: clean up getfslineno
Everything was using `_pytest.compat.getfslineno` basically, which
wrapped `_pytest._code.source.getfslineno`.

This moves the extra code from there into it directly, and uses the
latter everywhere.

This helps to eventually remove the one in compat eventually, and also
causes less cyclic imports.
2020-02-03 19:09:08 +01:00
Bruno Oliveira 1480aa31a7
Explicitly state on the PR template that we can squash commits (#6662)
* Explicitly state on the PR template that we can squash commits

This way we don't need to ask every time, and users who for some reason
would not like us to squash their commits can explicitly state so.
2020-02-03 14:35:50 -03:00
Daniel Hahler abffd16ce6 Keep (revisited) comment from https://github.com/pytest-dev/pytest/commit/4d31ea831 2020-02-03 14:04:16 +01:00
Daniel Hahler fb289667e3 Remove testing/test_modimport.py
testing/test_meta.py ensures this already as a side effect
(+ tests a few more (`__init__.py` files) and should have been
combined with it right away [1].

1: https://github.com/pytest-dev/pytest/pull/4510#discussion_r289123446

Ref: https://github.com/pytest-dev/pytest/commit/eaa05531e
Ref: https://github.com/pytest-dev/pytest/commit/4d31ea831
2020-02-03 13:58:32 +01:00
rebecca-palmer c55bf23cbe
doc: s/pytest_mark/pytestmark (#6661) 2020-02-03 08:56:37 +01:00
Daniel Hahler 99d162e44a Handle `Exit` exception in `pytest_sessionfinish`
Similar to a7268aa (https://github.com/pytest-dev/pytest/pull/6258).
2020-02-02 23:13:23 +01:00
Ran Benita 8bd612b367 typing: wrap_session
Pulled out of https://github.com/pytest-dev/pytest/pull/6556.
2020-02-02 23:12:48 +01:00
Daniel Hahler a9c5d31806
PyCollector._genfunctions: use already created fixtureinfo (#6636)
`Function` creates a `_fixtureinfo` already:
https://github.com/pytest-dev/pytest/blob/fed535694/src/_pytest/python.py#L1392-L1395
2020-02-01 06:27:41 +01:00
Hugo van Kemenade c9eeafade5
Fix favicon for Chrome and Opera (#6639)
* Fix favicon for Chrome and Opera

* Delete pytest1favi.ico

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-01-31 20:56:45 -03:00
Daniel Hahler 3645ba3072
Merge pull request #6638 from blueyed/rfEX
tests: use `-rfEX`
2020-01-31 01:06:32 +01:00
Daniel Hahler 8301993e5e tests: use `-rfEX`
`-fE` is the default in `features` now [1], but the idea is to add `X`
also to it in the long run, so let's dogfood it ourselves.

1: https://github.com/pytest-dev/pytest/pull/6524
2: https://github.com/pytest-dev/pytest/pull/6524#issuecomment-577650703
2020-01-31 00:18:51 +01:00
Daniel Hahler 1dc265e34a
Merge pull request #6633 from blueyed/async_warn
python: factor out async_warn
2020-01-30 23:39:06 +01:00
Daniel Hahler e7a833635d
Merge pull request #6635 from blueyed/fix-todo
minor: doc: getfuncargnames: move TODO out of docstring
2020-01-30 23:37:41 +01:00
Daniel Hahler fed5356941
Merge pull request #6634 from blueyed/fixtures-move-import
fixtures: move import of ParameterSet to top level
2020-01-30 23:22:39 +01:00
Daniel Hahler 5b81bd862c minor: doc: getfuncargnames: move TODO out of docstring 2020-01-30 23:22:10 +01:00
Daniel Hahler 2902c7263c fixtures: move import of ParameterSet to top level
This gets typically used always (via `getfixtureinfo`).
2020-01-30 23:03:02 +01:00
Daniel Hahler 442dccef65 python: factor out async_warn 2020-01-30 22:55:23 +01:00
Daniel Hahler e830432592
Merge pull request #6601 from blueyed/typing-pytest_collection
typing: pytest_collection
2020-01-30 20:47:06 +01:00
Daniel Hahler ae788997f2
Merge pull request #6630 from blueyed/revert-curl
Revert "ci: codecov: use `--retry-connrefused` with curl"
2020-01-30 20:46:46 +01:00
Daniel Hahler 88b800355a typing: pytest_collection 2020-01-30 19:58:43 +01:00
Daniel Hahler 864338de71 Revert "ci: codecov: use `--retry-connrefused` with curl"
Not known with `curl` on Travis at least.

Reverts https://github.com/pytest-dev/pytest/pull/6573.

This reverts commit df1f43ee28.
2020-01-30 19:56:25 +01:00
Bruno Oliveira eb5e651d7e
Fix typo (#6629)
Fix typo
2020-01-30 13:41:47 -03:00
Hugo van Kemenade 55bffb7c15
Fix typo 2020-01-30 18:30:51 +02:00
Bruno Oliveira be18f85a6e
Reword fixture docs for clarity (#6627)
Reword fixture docs for clarity
2020-01-30 12:56:45 -03:00
Daniel Hahler 28b8f3ca3a
Merge pull request #6461 from blueyed/test-package-upstream
Package: typing, cleanup
2020-01-30 16:41:47 +01:00
Daniel Arndt d91459fc75 Reword fixture docs for clarity 2020-01-30 09:32:54 -04:00
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