thermondo / pytest-translations

test translation files with pytest
Other
17 stars 3 forks source link

refactor for pytest 6 compatibility #45

Closed syphar closed 3 years ago

syphar commented 4 years ago

https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent

These are some changes regarding pytest 6 compatibility. We don't stay backwards compatible here, assuming people can upgrade to pytest >= 6

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7227238). Click here to learn what that means. The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #45   +/-   ##
=========================================
  Coverage          ?   94.11%           
=========================================
  Files             ?        6           
  Lines             ?      187           
  Branches          ?        0           
=========================================
  Hits              ?      176           
  Misses            ?       11           
  Partials          ?        0           
Impacted Files Coverage Δ
pytest_translations/po_spelling.py 89.28% <50.00%> (ø)
pytest_translations/mo_files.py 92.68% <66.66%> (ø)
pytest_translations/po_files.py 96.61% <87.50%> (ø)
pytest_translations/__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 7227238...be30a5b. Read the comment docs.

syphar commented 3 years ago

@Ashlett anything we can do here? Or should I reassign?

This blocks the pytest 6 update, so it's kind of FF is it? :)

syphar commented 3 years ago

sorry for taking so long 😔 I had a lot on my plate and this PR sort of fell by the wayside.

no worries :) it wasn't high prio

"We don't stay backwards compatible here, assuming people can upgrade to pytest >= 6" - not sure I understand: does that mean that if we update this package in the backend requirements (after this PR), we have to update pytest at the same time, otherwise our tests will fail? But the build in this PR is running on pytest-5.4.3 and it passed, am I missing something?

I'm not sure right now, let me recheck. Perhaps I'm missing something

syphar commented 3 years ago

@Ashlett I'm not sure why travis still used the old pytest version from some cache, but I just set pytest>=6.1 in requirements-dev.txt to be sure.

You're right, the new code also works with old pytest versions, though IMHO it's fine if we test only with the most recent version for this library