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

✨ Setup initial unit tests for conductor #329

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

rsashti
Copy link

@rsashti rsashti commented Feb 8, 2024

Summary:

Adds a very simple unit test for the resolve_template method in the Conductor class using the unittest Python library

Motivation:

Intending to add more complex unit tests for various methods/classes across the repo in the future, starting with something simple for the Conductor class

References (optional):

Test Plan:

  • Unit test runs successfully using command: python3 -m unittest test.test_conductor.TestConductor.test_resolve_template.

…Spec in pros/conductor/conductor.py:194 and pros/conductor/templates/base_template.py:33
@ayushuk ayushuk changed the title ✨Add a unit test for a Conductor class method ✨ Setup initial unit tests for conductor Feb 8, 2024
Copy link
Member

@ayushuk ayushuk left a comment

Choose a reason for hiding this comment

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

The test failed for me
Screenshot 2024-02-08 at 2 26 59 PM

…lass, replaced '==' with '>=' in the unit test
@rsashti
Copy link
Author

rsashti commented Feb 14, 2024

The test failed for me Screenshot 2024-02-08 at 2 26 59 PM

I think this could be due to a version difference for the okapilib template. It is unrealistic to have the unit test try for an exact version number over time, so I added a greater than or equal to method in the BaseTemplate class (ge). The unit test now uses this to compare templates, this should pass.
f0bc43c25a5c0e944a1f8c2489ee082c

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