aragilar / pytest-mpi

Pytest plugin for working with MPI
https://pytest-mpi.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
19 stars 7 forks source link

Compatibility of terminal summary hook with pytest<4.2 #5

Closed prs513rosewood closed 4 years ago

prs513rosewood commented 4 years ago

Hello!

Pytest 4.2 introduced the config argument to pytest_terminal_summary, which is not backwards compatible.

I added a flag that is initialized when the hook pytest_configure is called, which is then used in the pytest_terminal_summary instead of the previous config argument. I tried with versions 3.10.1 and 5.4.2 on a homegrown test and it works. I am unfamiliar with tox, but I think it would be best if several versions of pytest were tested.

Fixes #3

By the way, the version on pypi is out of date with respect to bugfixes on min_size for mpi tests.

Cheers!

codecov[bot] commented 4 years ago

Codecov Report

Merging #5 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          113       116    +3     
=========================================
+ Hits           113       116    +3     
Impacted Files Coverage Δ
pytest_mpi/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a8e7b56...8a5b8ff. Read the comment docs.

prs513rosewood commented 4 years ago

Hi @aragilar,

Just a reminder that this PR exists. I saw that pytest-mpi was in the Debian unstable repositories (cf. here). If this PR is merged, there would be a possibility of having the package in the backports repositories, as this PR makes it compatible with current Debian stable.

aragilar commented 4 years ago

Oops, sorry I missed this, I'll try to get to this later today and release it on PyPI.

aragilar commented 4 years ago

bors r+

bors[bot] commented 4 years ago

Build succeeded: