jquast / blessed

Blessed is an easy, practical library for making python terminal apps
http://pypi.python.org/pypi/blessed
MIT License
1.18k stars 71 forks source link

Fix tests and minor updates #244

Closed avylove closed 1 year ago

avylove commented 1 year ago

Deprecated pytest-xdist option

Most of the tests are currently broken because pytest-xdist deprecated looponfail without an alternative. Since we have filterwarnings = error this causes the deprecation warning to be treated as a failure. Rather than pin pytest-xdist or figure out how to filter the deprecation, I thought it was easier to remove it.

https://github.com/pytest-dev/pytest-xdist/issues/826


Test Updates

While I was in there, I moved the main test version to 3.10 and added 3.11 and 3.12-dev. 3.12-dev isn't currently available in the pipelines since 3.12 alpha 1 was released 2 days ago, but should be soon. It's tagged as optional.

The optional test syntax also seems to have changed, so I had to add continue-on-error. It's buggy in that it will show a success in the Actions view when a optional test fails, but the commit view still shows an X.


SupportsIndex

After some back and forth with the Pylint team, I realized using int(width) instead of width__index__() for the formatting methods was actually wrong. The latest Pylint handles this correctly and I added a commit to revert to the previous behavior. Also noticed one of the typing files was using int instead of SupportsIndex, so updated that too.


Other Also made a handful of code tweaks, nothing significant.

codecov[bot] commented 1 year ago

Codecov Report

Base: 95.35% // Head: 95.15% // Decreases project coverage by -0.19% :warning:

Coverage data is based on head (204a443) compared to base (df28567). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #244 +/- ## ========================================== - Coverage 95.35% 95.15% -0.20% ========================================== Files 9 9 Lines 1011 1011 Branches 176 215 +39 ========================================== - Hits 964 962 -2 - Misses 43 45 +2 Partials 4 4 ``` | [Impacted Files](https://codecov.io/gh/jquast/blessed/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+Quast) | Coverage Δ | | |---|---|---| | [blessed/sequences.py](https://codecov.io/gh/jquast/blessed/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+Quast#diff-Ymxlc3NlZC9zZXF1ZW5jZXMucHk=) | `100.00% <100.00%> (ø)` | | | [blessed/terminal.py](https://codecov.io/gh/jquast/blessed/pull/244?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+Quast#diff-Ymxlc3NlZC90ZXJtaW5hbC5weQ==) | `97.81% <0.00%> (-0.44%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+Quast). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+Quast)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

avylove commented 1 year ago

3.12-dev is available now, currently alpha1, and it looks like we're passing.

avylove commented 1 year ago

@jquast Can you approve this or give me access to approve my own PRs? The CI tests have been broken for the last couple months and it would be good to see them green again.