Commit Graph

3 Commits

Author SHA1 Message Date
Peter Wu 0a25bfe647 test: enable parallelism by default for pytest
Consistent with tools like "ninja", enable parallelism by default. It
can be disabled again with `pytest -n0`.

This makes pytest-xdist a dependency when pytest is used as test runner.
This does not affect the unittest-based test runnet (test/test.py).

Change-Id: I4dc905f097c57a869aa39487b15361502b431616
Reviewed-on: https://code.wireshark.org/review/31371
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-05 06:47:25 +00:00
Peter Wu 5dc1e77298 pytest.ini: declare minimum version requirement
pytest 3.0.0 (2016-08-18) or newer is required due to the use of the
yield keyword in fixtures and the use of getfixturevalue. Do not bother
supporting older versions, install newer versions via pip instead.

Change-Id: I35ae787e2abcc706c19251d29a7d5b8513079c15
Reviewed-on: https://code.wireshark.org/review/31373
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-05 06:47:07 +00:00
Peter Wu 2e411dba93 test: allow running pytest without specifying the tests directory
This allows `pytest` to be executed from the top-level source or build
directory (or any other directory below).

Change-Id: Ib7af2ea2aaf01319d6839d2dc67228fbb5a7bc34
Reviewed-on: https://code.wireshark.org/review/31370
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-05 06:46:54 +00:00