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

Issue 38: Fix failed test due to CPython str/enum behavior change #42

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

jeremyfell
Copy link
Collaborator

Fixes a test failure that was due to the CyclingStatus end status of an experiment being printed as the enum name (i.e. CyclingStatus.LOW_CAPACITY) instead of the enum's string value (i.e. capacity is less than 1% of initial CLS capacity).

This failure is due to a behavior change between versions 3.10 and 3.11 of CPython, where the __format__ behavior of a class inheriting both str and Enum was changed (from returning the enum value to returning the enum name in 3.11+). See this CPython issue for further details.

This PR also updates the GitHub actions to run the tests using multiple versions of Python. Previously, only 3.10 was tested which is why this failure was not encountered on previous PRs.

This addresses #38, and relates to openjournals/joss-reviews#6537.

@jeremyfell jeremyfell requested a review from ericfell June 11, 2024 06:30
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.90%. Comparing base (f6852fe) to head (8d2fa59).

Files Patch % Lines
src/rfbzero/experiment.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files           4        4           
  Lines         608      608           
=======================================
  Hits          577      577           
  Misses         31       31           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@ericfell ericfell left a comment

Choose a reason for hiding this comment

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

All looks good LGTM

@jeremyfell jeremyfell merged commit d0d22e9 into main Jun 11, 2024
8 of 10 checks passed
@ericfell ericfell deleted the issue-38-str-enum branch June 12, 2024 00:55
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.

2 participants