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

Moving a bunch of unit tests to pytest. #4264

Merged
merged 15 commits into from
Jul 16, 2024

Conversation

prady0t
Copy link
Contributor

@prady0t prady0t commented Jul 14, 2024

Description

Related to #4156

Total 52 small unit test files with minimal changes required are converted to pytest.

prady0t and others added 2 commits July 14, 2024 12:01
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
@prady0t
Copy link
Contributor Author

prady0t commented Jul 14, 2024

This PR got a bit bigger than I expected I should have broken it down as 2 separate PR's. I can revert changes from files but since all of them are in one single commit, I'll have do it manually. Do let me know if it's difficult to review, I'll revert then.

prady0t added 2 commits July 14, 2024 12:12
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.45%. Comparing base (6c1a559) to head (b0a0510).
Report is 220 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4264      +/-   ##
===========================================
- Coverage    99.56%   99.45%   -0.11%     
===========================================
  Files          288      288              
  Lines        22086    22086              
===========================================
- Hits         21989    21966      -23     
- Misses          97      120      +23     

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

Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Thanks for going through all these files, @prady0t! Please update #4156 with your older migrations in #4238 and these ones, even if the PR(s) remain open and not yet merged.

prady0t and others added 7 commits July 15, 2024 02:17
…on/test_mpm_half_cell.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
…on/test_spm.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
…on/test_spme.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Almost there!

tests/unit/test_plotting/test_plot.py Outdated Show resolved Hide resolved
prady0t and others added 2 commits July 15, 2024 14:56
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

This looks all great to me, thanks for updating so many files here, @prady0t! Thanks for updating the files tracker as well. I'll approve the workflow and trigger a CI run, will merge in a day or so if there are no objections.

@agriyakhetarpal agriyakhetarpal merged commit 4796ba9 into pybamm-team:develop Jul 16, 2024
22 of 24 checks passed
js1tr3 pushed a commit to js1tr3/PyBaMM that referenced this pull request Aug 12, 2024
* Moving a bunch of unit tests to pytest

Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>

* style: pre-commit fixes

* style fix

Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>

* Update tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_mpm_half_cell.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Update tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spm.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Update tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_spme.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Update tests/unit/test_parameters/test_parameter_sets_class.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Update tests/unit/test_parameters/test_parameter_sets_class.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* Update tests/unit/test_plotting/test_plot.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* adding skips

Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>

* Update tests/unit/test_plotting/test_plot.py

Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>

* adding reason for skips

Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>

---------

Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
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