Skip to content

Compatibility of terminal summary hook with pytest<4.2#5

Merged
bors[bot] merged 2 commits intoaragilar:masterfrom
prs513rosewood:feature/pytest_retrocompatibility
May 27, 2020
Merged

Compatibility of terminal summary hook with pytest<4.2#5
bors[bot] merged 2 commits intoaragilar:masterfrom
prs513rosewood:feature/pytest_retrocompatibility

Conversation

@prs513rosewood
Copy link
Contributor

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!

Pytest 4.2 introduced the config argument to
pytest_terminal_summary, which is not backwards compatible
@codecov
Copy link

codecov bot commented May 10, 2020

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 prs513rosewood changed the title compatibility of terminal summary hook with pytest<4.2 Compatibility of terminal summary hook with pytest<4.2 May 11, 2020
@prs513rosewood
Copy link
Contributor Author

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
Copy link
Owner

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

@aragilar
Copy link
Owner

bors r+

@bors
Copy link
Contributor

bors bot commented May 27, 2020

Build succeeded:

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 31b4fce into aragilar:master May 27, 2020
@prs513rosewood prs513rosewood deleted the feature/pytest_retrocompatibility branch May 27, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal Error when Calling with pytest 3.4.1

2 participants

Comments