Minor pytest maintenance (#702)

* Add `pytest.ini` config file and set default options there instead of
  in `CMakeLists.txt` (command line arguments).

* Change all output capture from `capfd` (filedescriptors) to `capsys`
  (Python's `sys.stdout` and `sys.stderr`). This avoids capturing
  low-level C errors, e.g. from the debug build of Python.

* Set pytest minimum version to 3.0 to make it easier to use new
  features. Removed conditional use of `excinfo.match()`.

* Clean up some leftover function-level `@pytest.requires_numpy`.
This commit is contained in:
Dean Moldovan
2017-03-10 15:42:42 +01:00
committed by Wenzel Jakob
parent 303ee29d9f
commit d47febcb17
5 changed files with 23 additions and 14 deletions

View File

@@ -103,9 +103,9 @@ class Capture(object):
@pytest.fixture
def capture(capfd):
"""Extended `capfd` with context manager and custom equality operators"""
return Capture(capfd)
def capture(capsys):
"""Extended `capsys` with context manager and custom equality operators"""
return Capture(capsys)
class SanitizedString(object):