Commit Graph

837 Commits

Author SHA1 Message Date
Daniel Hahler f8f4c16020 TerminalWriter: write "collecting" msg only once every 0.1s
Running `pytest -k doesnotmatch` on pytest's own tests takes ~3s with
Kitty terminal for me, but only ~1s with `-q`.
It also is faster with urxvt, but still takes 2.2s there.

This patch only calls `report_collect` every 0.1s, which is good enough
for reporting collection progress, and improves the time with both Kitty
and urxvt to ~1.2s for me.
2018-10-24 16:48:35 +02:00
Bruno Oliveira 7bb51b8ceb Issue a warning when a fixture named 'request' is collected
Fix #611
2018-10-20 12:09:44 -03:00
Bruno Oliveira b432f1207c
Merge pull request #4190 from nicoddemus/merge-master-into-features
Merge master into features
2018-10-18 19:23:16 -03:00
Sven-Hendrik Haase f694d8d6ad Make --color more colorful 2018-10-18 03:56:58 +02:00
Bruno Oliveira a83ee197c6 Merge remote-tracking branch 'upstream/master' into RonnyPfannschmidt/bump-setuptools 2018-10-17 19:05:52 -03:00
Ronny Pfannschmidt cc335d44a0 fix #4179 - bring back the current testrun symlink 2018-10-17 20:43:27 +02:00
Ronny Pfannschmidt 4f4c91caf5 fix #4177 - pin setuptools>=40.0 2018-10-17 20:08:07 +02:00
Bruno Oliveira ee0a306ee4 Merge remote-tracking branch 'upstream/features' into merge-features-into-master 2018-10-16 17:41:27 -03:00
Ronny Pfannschmidt 253c5786af Preparing release version 3.9.1 2018-10-16 22:16:58 +02:00
Ronny Pfannschmidt c4550bc922 Merge branch 'release-3.9.0' of github.com:nicoddemus/pytest into release-3.9.1 2018-10-16 22:07:38 +02:00
Ankit Goel f858177495
Merge pull request #4167 from vbarbaresi/3533_junit_escape_skipped
Fix #3533: properly escape raw XML object
2018-10-16 21:10:42 +05:30
Bruno Oliveira 54b8ad4554
Merge pull request #4159 from thisch/subclassedfile
Increase required verbosity level for debug output
2018-10-16 10:41:27 -03:00
Vincent Barbaresi d72154acda add changelog for #3533 2018-10-16 15:07:23 +02:00
Bruno Oliveira 2868c31495 Preparing release version 3.9.0 2018-10-15 20:23:30 +00:00
Thomas Hisch e8c220b9bd Increase required verbosity level for debug output
To show the subclassed file in legacy test suits in the runtest output
you have to set the verbosity level to at least "-vv" now.

Closes #3211
2018-10-15 20:38:32 +02:00
Bruno Oliveira 9646a1cd7a Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-15 12:55:28 -03:00
Anthony Sottile 093e19a7d9
Merge pull request #4153 from asottile/syntax_warning_filename
Display the filename when encountering `SyntaxWarning`.
2018-10-15 08:40:51 -07:00
Bruno Oliveira 58b6e8616c
Merge pull request #4149 from RonnyPfannschmidt/modern-build
modernize packaging for setuptools>30.3
2018-10-15 08:13:47 -03:00
Tomer Keren 99d957bd3d Check off PR requirements 2018-10-15 11:36:31 +03:00
Ankit Goel 141c51f0cb
Merge pull request #4145 from labcodes/4098
Add returncode argument to pytest.exit
2018-10-15 11:04:11 +05:30
Ronny Pfannschmidt d65c7658d5 changelog 2018-10-15 07:32:38 +02:00
Anthony Sottile 2e42d937dc Display the filename when encountering `SyntaxWarning`.
```console
$ cd t && rm -rf __pycache__ && pytest t.py -q -c /dev/null; cd ..
.                                                                        [100%]
=============================== warnings summary ===============================
<unknown>:2: DeprecationWarning: invalid escape sequence \.

-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 passed, 1 warnings in 0.01 seconds

```

```console
$ cd t && rm -rf __pycache__ && pytest t.py -q -c /dev/null; cd ..
.                                                                        [100%]
=============================== warnings summary ===============================
/tmp/pytest/t/t.py:2: DeprecationWarning: invalid escape sequence \.
  '\.wat'

-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 passed, 1 warnings in 0.01 seconds
```
2018-10-14 16:11:47 -07:00
Jose Carlos Menezes bbd1cbb0b3 Update changelog to better reading 2018-10-14 18:03:37 -03:00
Ronny Pfannschmidt 1dfa303b1e fix #4135 - handle symlinks in tmp path cleanup 2018-10-14 21:20:34 +02:00
Jose Carlos Menezes a0666354dd Update changelog 2018-10-14 12:29:19 -03:00
Daniel Hahler 3bfaa8ab84
Merge pull request #4132 from blueyed/pdb-internal-dupe
Do not print (duplicate) INTERNALERROR with --pdb.
2018-10-14 11:25:35 +02:00
Bruno Oliveira 9fb305b17b
Merge pull request #4086 from jeffreyrack/4063-exclude-0-durations
Exclude durations that are 0.00 seconds long.
2018-10-13 22:16:04 -03:00
Daniel Hahler 7268462b33 Resolve symlinks for args
This fixes running `pytest tests/test_foo.py::test_bar`, where `tests`
is a symlink to `project/app/tests`: previously
`project/app/conftest.py` would be ignored for fixtures then.
2018-10-13 23:59:05 +02:00
Daniel Hahler 448830e656 Do not print INTERNALERROR with --pdb
This gets printed by the terminal reporter already, and currently
results in the same error being displayed twice, e.g. when raising an
`Exception` manually from `pytest.debugging.pytest_exception_interact`.
2018-10-13 23:56:34 +02:00
Jeffrey Rackauckas 47f5c29002 Update messaging for --durations when not in verbose mode. 2018-10-13 12:51:04 -07:00
Bruno Oliveira 24c83d725a
Merge pull request #4129 from nicoddemus/merge-master-into-features
Merge master into features (prepare for 3.9)
2018-10-13 12:05:54 -03:00
Bruno Oliveira 29d5849519 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-13 08:50:32 -03:00
Bruno Oliveira 8e11fe5304 Improve tracebacks for ImportErrors in conftest.py files
Fix #3332
2018-10-12 10:10:55 -03:00
Jose Carlos Menezes dbaa9464ba Update usefixtures documentation
Clarifying that it can't be used with fixture functions
2018-10-12 09:45:49 -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
Bruno Oliveira e8348a1d12
Merge pull request #4077 from nicoddemus/short-usage-errors
Improve internal error messages
2018-10-12 08:18:07 -03:00
Ronny Pfannschmidt 4736b2bdfb address review comments 2018-10-11 20:48:30 +02:00
Ronny Pfannschmidt ad6f63edda add changelog 2018-10-11 07:15:09 +02:00
Bruno Oliveira c9a85b0e78 Fix linting 2018-10-10 19:54:39 -03:00
Bruno Oliveira bf265a424d Minor adjustments found during code review 2018-10-10 19:35:49 -03: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
Niklas JQ d1322570dd Fix issue 4093 2018-10-10 19:45:07 +02:00
Anthony Sottile e0f6fce9e9 In python2, display previously warned warnings 2018-10-10 09:37:21 -07:00
Anthony Sottile aeb92accb2 Implement pytest.deprecated_call with pytest.warns 2018-10-10 08:03:23 -07:00
Bruno Oliveira 9a3836a0cf Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-09 19:34:04 -03:00
Jeffrey Rackauckas fc11b81005 Exclude durations that are 0.00 seconds long. 2018-10-07 19:19:48 -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
Kyle Altendorf 5ecbb0acba Correct new changelog to have newline at end 2018-10-05 10:22:07 -04:00
Kyle Altendorf ee64f1fb9f Add changelog file for 4073 2018-10-05 10:02:59 -04:00
Bruno Oliveira a1208f5631
Merge pull request #4075 from nicoddemus/dynamic-fixturenames
Fix request.fixturenames to return fixtures created dynamically
2018-10-04 09:21:23 -03:00