Commit Graph

131 Commits

Author SHA1 Message Date
Bruno Oliveira 16d636391b Propagate internal errors to the master node
This should help users diagnose internal errors in workers like
exceptions from hooks or in pytest itself.
2020-12-13 20:05:31 -03:00
Bruno Oliveira b3a1bf3c2e Fix test_warning_captured_deprecated_in_pytest_6
The test was failing because *other* warnings were being triggered on the
master node. This makes the test more reliable by checking only that
the warning from the worker node is not emitted.

Fix #601
2020-12-12 11:58:41 -03:00
Zac-HD d153e0a4c4 Remove compat for pytest < 6 2020-08-06 15:48:33 +10:00
Sylvain Marié ba8398478e
New methods `is_xdist_worker`, `is_xdist_master`, `get_xdist_worker_id`. (#505)
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2020-08-05 20:41:54 -03:00
Bruno Oliveira 047816f33a Drop features from old pytest versions 2020-08-05 19:55:56 -03:00
Bruno Oliveira 55838a126d Remove unnecessary skipif and changelog 2020-08-05 19:24:53 -03:00
Michał Górny 94bdd18a03 Fix skipping test_config_initialization for pytest<5
Fix test_config_initialization to be correctly skipped on pytest<5,
by explicitly checking pytest version (idea copied from
test_looponfail_removed_test).  The current conditions are insufficient
-- the outer check wrongly assumes pytest>=5 will always be used
on Python 3 (which is not true if you need the same version to support
both Python 2 and Python 3), and the inner condition apparently
wrongly assuming that invocation_params attribute is not present
in pytest-4.
2020-08-05 19:20:14 -03:00
Hugo 62bc333e3e Fix tests 2020-08-03 22:52:35 +10:00
Hugo 9decca0023 Drop support for EOL Python 2 2020-08-03 22:52:03 +10:00
Zac-HD de3e54fd27 Finish removal of "slave" terminology
See issue #234.  It's time.
2020-08-03 22:51:42 +10:00
Daniel Hahler 467ac33d0b
tests: check that PYTEST_ADDOPTS is not processed twice 2020-07-24 19:04:16 -03:00
Bruno Oliveira fac0c14e28
Merge pull request #531 from mgorny/timeout 2020-07-24 15:47:20 -03:00
Bruno Oliveira 18b18870a8 Do not trigger pytest_warning_captured in pytest 6.0+
Fix #562
2020-07-24 15:19:07 -03:00
Bruno Oliveira 443dc21061 Fix rsyncdirs usage with pytest 6.0
Fix pytest-dev/pytest#7487
2020-07-13 12:09:02 -03:00
Michał Górny 27519e8018 Increase pexpect timeouts to prevent tests from failing 2020-05-03 11:24:03 +02:00
Sven-Hendrik Haase f56596bcdc Merge branch 'master' into 524-add-global-session-uuid 2020-05-01 16:56:23 +02:00
Sven-Hendrik Haase 8714a99d51 Ignore Python 3.8 specific failure in pytest for now 2020-04-30 21:08:21 +02:00
Sven-Hendrik Haase 2183d741bb Add global session uuid (fixes #524) 2020-04-30 19:43:16 +02:00
Ionel Cristian Mărieș 038a59eebc Fix regression with custom arguments being dropped in non-local… (#491)
* No idea what I'm doing.

* Extend integration test to cover ac3f6a78c7.

* Remove useless output to stop failing other tests.

* Reformat.

* Upgrade virtualenv to see if it fixes py34 builds

* Add CHANGELOG entry

* Make foobarplugin part of the test only

* Fix language_version in pre-commit for rst

* Fix test in Python 2

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2019-12-19 21:00:02 -03:00
Bruno Oliveira 0c53761e95 Fix tests for pytest features branch 2019-11-04 16:21:13 -03:00
Bruno Oliveira ddc52f1e1a Ensure pytest ends successfully in test_without_terminal_plugin 2019-09-13 09:17:28 -03:00
Tom Boshoven 8cbbbe1a2a Add another no:terminal fix and add a test. 2019-09-12 10:32:20 -04:00
Bruno Oliveira 953a3f0b4d Use Config.invocation_params for consistent worker initialization
Decided to keep the old way still working for now.

Fix #6
Fix #445
2019-07-10 19:59:12 -03:00
Bruno Oliveira 956c79700f Do not show internal error when running out of workers
Also show the reason of the session being interrupted
in the warnings summary

Fix #435
2019-06-07 09:35:22 -03:00
Mickaël Schoentgen f6ecaa9b7f Fix ResourceWarning: unclosed file in setup.py
Also uniformize the usage of the 'with' context manager.

Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-14 22:59:36 +01:00
Bruno Oliveira b9423d894c Fix linting 2019-01-10 19:19:34 -02:00
Alex Adamson 242c009866 Remove trailing whitespace 2019-01-10 15:50:25 -05:00
Alex Adamson 0ee219dc48 Address comments 2019-01-10 15:45:48 -05:00
Alex Adamson ac2bf10fe2 Disable unserialized arguments check for py2 2019-01-08 15:17:03 -05:00
Alex Adamson fa85371c73 Add test for #379 2019-01-08 15:17:03 -05:00
Bruno Oliveira 261d4189f0 Skip config.warn tests in pytest 4.1 2019-01-08 10:57:14 -02:00
Bruno Oliveira 5f0abe3cb8 Merge remote-tracking branch 'upstream/master' into ethanhs/silencenodes 2018-12-11 14:35:25 -02:00
Bruno Oliveira 3332c99e1e Improve verbosity test 2018-12-11 14:35:16 -02:00
Ethan Smith 49c09117ed
Fix lint 2018-11-29 00:55:33 -08:00
Ethan Smith 566480fdd3
Add test and silence completely 2018-11-29 00:25:30 -08:00
Bruno Oliveira 50b27d2735 Skip test which needs pytest_namespace(), removed recently 2018-11-21 19:57:24 -02:00
Bruno Oliveira c4b365b082 Update test that used deprecated cached_setup function 2018-11-16 12:50:15 -02:00
Bruno Oliveira f9a13fe53b Drop support to old pytest versions and test with python 3.7 2018-11-11 11:27:30 -02:00
Bruno Oliveira b151e56fbd Handle unserializable warning arguments
Fix #349
2018-10-30 09:44:13 -03:00
Bruno Oliveira 70688b7986 Refactor warning acceptance tests into a class 2018-10-29 18:38:01 -03:00
Jan Kasiak fe06f27b8b Issue node shutdown on empty workload
Remote pytest_runtestloop requires at least 2 tests, or a test
and a shutdown command. In case of inter test locking, for
example using a file lock, the tests could deadlock, since the
shutdown command would not be enqueued, and the last test of a
worker would never finish, and would not allow another worker
to make progress.
2018-09-30 15:39:04 -04:00
Bruno Oliveira b176b37606 Add a test which reproduces #344 and fix the handling code
Fix #344
2018-09-27 22:18:52 -03:00
Brandon Hoffman 571d08fb8b remove unneeded lines 2018-09-26 21:05:30 -05:00
Brandon Hoffman 36c28ee154 add test case for invalid warning handeling 2018-09-26 20:44:01 -05:00
Bruno Oliveira 78030e3d32 Fix warnings transfer between workers and master node with pytest >= 3.8
Fix #341
2018-09-25 10:01:20 -03:00
Bruno Oliveira fced1645cb Run pre-commit: black, whitespaces, rst 2018-07-27 17:50:55 -03:00
Anthony Sottile 78fcf725cf Factor out py.std 2018-07-05 15:35:39 -07:00
Bruno Oliveira 1be8a463ff Add docstring to tests for #277 2018-02-16 20:14:47 -02:00
lmtierney bd3c7dba8b Ensure loadscope and loadfile work when the first scope has one work unit 2018-02-08 19:51:42 -06:00
Bruno Oliveira ee2a1b4f4d Add an explicit test for backward compatibility with "config.slaveinput"
Related to #234
2018-01-30 19:13:14 -02:00