Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release pin on pytest #2633

Merged
merged 5 commits into from May 3, 2023
Merged

release pin on pytest #2633

merged 5 commits into from May 3, 2023

Conversation

k-dominik
Copy link
Contributor

@k-dominik k-dominik commented Nov 15, 2022

Final blocking thing preventing us from updating Python was pytest. This updates pytest from 3.x pin to 7.2.0 (latest, not pinned)

There were some small real issues

  • tmp_path magic that would resolve symlinks vs tempfile.mk* not doing it.
  • in one of the tests, we use pytester, which is supposed to run tests in a more isolated manner (guess that was the motivation for using it, from the docs I take it is used to test pytest itself). Behavior of pytester testdir fixture seems to have changed - since pytest 3.x. I didn't dig into the pytest source code, but somehow invoking run seems to alter the environment for subsequent calls to run in the same test function. Splitting those functions means better reporting anyway. (In addition we could think about dropping the use of pytester here - I'm not sure it's supposed to be used outside the context of testing pytest itself).

while debugging I simplified appveyor.yml a bit - but these changes are unrelated and I can also remove them.

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.47 ⚠️

Comparison is base (e093db4) 54.37% compared to head (9bfddc8) 52.91%.

❗ Current head 9bfddc8 differs from pull request most recent head 055b2c4. Consider uploading reports for the commit 055b2c4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2633      +/-   ##
==========================================
- Coverage   54.37%   52.91%   -1.47%     
==========================================
  Files         519      511       -8     
  Lines       60862    60265     -597     
  Branches     8398     8260     -138     
==========================================
- Hits        33095    31889    -1206     
- Misses      26094    26766     +672     
+ Partials     1673     1610      -63     
Impacted Files Coverage Δ
ilastik/ilastik_logging/default_config.py 76.27% <100.00%> (+3.38%) ⬆️

... and 87 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@k-dominik k-dominik marked this pull request as ready for review April 27, 2023 13:58
@k-dominik k-dominik requested a review from btbest April 27, 2023 14:07
@k-dominik k-dominik marked this pull request as draft April 27, 2023 14:40
use the same fixture for empty project file everywhere

on osx tmp_path fixture resolves the symlink from /var to /private/var, while
`tempfile.mkstemp` does not - relative path check would fail.
@k-dominik k-dominik force-pushed the pytest-update branch 5 times, most recently from c7c4997 to 9de54ab Compare May 2, 2023 13:13
using `pytester` here - test failures on windows with multiple
`run` invocations per test functions somehow modify the environment.
@k-dominik k-dominik marked this pull request as ready for review May 2, 2023 15:34
@k-dominik k-dominik mentioned this pull request May 3, 2023
1 task
Copy link
Contributor

@btbest btbest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like everything runs, and some neat improvements in the tests 👍

@k-dominik
Copy link
Contributor Author

thank you for the review @btbest !

@k-dominik k-dominik merged commit 2812e2b into ilastik:main May 3, 2023
14 checks passed
@k-dominik k-dominik deleted the pytest-update branch May 3, 2023 11:30
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.

None yet

2 participants