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

Tracking Issue for Pytest migration. #4156

Closed
prady0t opened this issue Jun 9, 2024 · 10 comments
Closed

Tracking Issue for Pytest migration. #4156

prady0t opened this issue Jun 9, 2024 · 10 comments
Assignees
Labels
priority: medium To be resolved if time allows

Comments

@prady0t
Copy link
Contributor

prady0t commented Jun 9, 2024

This is a tracking issue to keep track of all the files that have been successfully migrated to pytest.

Integration Tests

Unit Tests

Note :

  • Use setup_method instead of fixtures everywhere.
  • test_citations.py : This is an example of a file that contains a lot of boilerplate and can be reduced by fixtures and parametrizing the test cases
  • Parameterize tests/unit/test_parameters/test_process_parameter_data.py
@kratman
Copy link
Contributor

kratman commented Jun 9, 2024

@prady0t Can you summarize what is not covered in #3617 so that we can close the older issue?

@agriyakhetarpal
Copy link
Member

I closed the older issue, just the updates to the Contributing Guide and the removal of the run-tests.py file remain, which are being tracked through weekly updates.

@prady0t
Copy link
Contributor Author

prady0t commented Sep 13, 2024

there are still 14 files left. I should open a new PR concluding everything or should I cover them in pt-7?

@agriyakhetarpal
Copy link
Member

A new PR would be better. Part 6 and Part 7 are ready to merge, I approved them

@prady0t
Copy link
Contributor Author

prady0t commented Sep 13, 2024

Correction : 9 files

@agriyakhetarpal
Copy link
Member

Almost there with completing them all!

@agriyakhetarpal
Copy link
Member

@prady0t, after #4443, it looks like 8 files are still left:

❯ rg unittest
tests/testcase.py
4:import unittest
7:class TestCase(unittest.TestCase):

tests/integration/test_models/test_submodels/test_interface/test_butler_volmer.py
8:import unittest
12:class TestButlerVolmer(unittest.TestCase):
387:    unittest.main()

tests/unit/test_expression_tree/test_concatenations.py
5:import unittest.mock as mock

tests/unit/test_parameters/test_parameter_sets/test_Ecker2015.py
6:import unittest
9:class TestEcker2015(unittest.TestCase):
55:    unittest.main()

tests/unit/test_expression_tree/test_functions.py
6:import unittest.mock as mock

tests/unit/test_expression_tree/test_input_parameter.py
7:import unittest.mock as mock

tests/unit/test_expression_tree/test_operations/test_evaluate_python.py
9:import unittest
758:    unittest.main()

tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_compare_outputs.py
7:import unittest
11:class TestCompareOutputs(unittest.TestCase):
153:    unittest.main()

Could you migrate these files, too? Also, please check for any additional files that were missed.

@prady0t
Copy link
Contributor Author

prady0t commented Sep 28, 2024

Thanks for pointing out! Check #4472

@kratman
Copy link
Contributor

kratman commented Nov 13, 2024

@prady0t Is this done now?

@prady0t
Copy link
Contributor Author

prady0t commented Nov 15, 2024

Yes, I think this can be closed.

@prady0t prady0t closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium To be resolved if time allows
Projects
None yet
Development

No branches or pull requests

3 participants