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

Added gen and format information to AbstractBattle #558

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

caymansimpson
Copy link
Contributor

@caymansimpson caymansimpson commented Jun 6, 2024

I did a couple of things here:

  1. _format was an internal variable that wasn't used, and recorded the generation of the AbstractBattle, so I changed _format to hold the format of the battle, aligning with Showdown protocol via the python equivalent to Showdown's parsing
  2. Stored generational info (the int) in _gen
  3. Added gen and format as properties of AbstractBattle
  4. Added a RunTime check to ensure that AbstractBattle is initiated with the right gen
  5. Added to fixture_data official showdown logs for easier parse_message testing
  6. Added testing for battle.format and battle.gen

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.05%. Comparing base (f458350) to head (aa0f974).
Report is 50 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
+ Coverage   83.38%   85.05%   +1.67%     
==========================================
  Files          39       42       +3     
  Lines        3918     4189     +271     
==========================================
+ Hits         3267     3563     +296     
+ Misses        651      626      -25     

Copy link
Owner

@hsahovic hsahovic left a comment

Choose a reason for hiding this comment

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

Great change!

@hsahovic hsahovic merged commit aa39726 into hsahovic:master Jun 10, 2024
8 checks passed
@caymansimpson caymansimpson deleted the fix_battle_format branch June 11, 2024 01:45
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