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

testing enum generation #99

Merged
merged 4 commits into from
Jun 5, 2024
Merged

testing enum generation #99

merged 4 commits into from
Jun 5, 2024

Conversation

shubhras01
Copy link
Contributor

@shubhras01 shubhras01 commented Jun 4, 2024

🚀 This description was created by Ellipsis for commit 497f48d

Summary:

Introduces unit tests for various enums in composio.client.enums to validate their properties and values, including a correction in the App enum value test.

Key points:

  • Adds tests/test_cli/test_enum.py for testing enum classes: Tag, App, Action, Trigger.
  • Implements unit tests using unittest framework.
  • Each enum class has specific tests for its properties and values.
  • Corrects assertion method in App enum value test.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 356de10 in 1 minute and 3 seconds

More details
  • Looked at 58 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_ofJsAqVZMKZ5pgFI


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

2 days left in your free trial, upgrade for $20/seat/month or contact us.

class TestAppEnum(unittest.TestCase):
def test_app_enum_values(self):
# Test for specific expected enum values
self.assertTrue(App.GITHUB.value, "github")
Copy link
Contributor

Choose a reason for hiding this comment

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

The use of assertTrue here is incorrect for checking the enum value. It should be replaced with assertEqual to properly compare the enum value to the expected string 'github'.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 866693c in 1 minute and 43 seconds

More details
  • Looked at 43 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_CXaQTXCl3tbTbuzP


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

2 days left in your free trial, upgrade for $20/seat/month or contact us.

def test_tag_enum_values(self):
# Test for specific expected enum values
self.assertEqual(Tag.IMPORTANT.value, ("default", "important"))
self.assertEqual(Tag.IMPORTANT.value, ("default", "important"))
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is a duplicate of the previous line and should be removed to avoid redundancy.

tests/test_cli/test_enum.py Show resolved Hide resolved
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 125ba40 in 1 minute and 33 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. tests/test_cli/test_enum.py:35
  • Draft comment:
    The test case test_tag_enum_name_property is redundant as it tests the same property as test_tag_enum_names for Tag.IMPORTANT. Consider removing it to streamline the test suite.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_TBrc2J6NyaRdhrtM


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

2 days left in your free trial, upgrade for $20/seat/month or contact us.

@shubhras01 shubhras01 merged commit 68dfb1f into master Jun 5, 2024
1 of 2 checks passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Incremental review on 497f48d in 1 minute and 56 seconds

More details
  • Looked at 25 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_LMpUBdKJbKVAHRn4


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

2 days left in your free trial, upgrade for $20/seat/month or contact us.

def test_tag_enum_values(self):
# Test for specific expected enum values
self.assertEqual(Tag.IMPORTANT.value, ("default", "important"))
self.assertEqual(Tag.ASANA_GOAL_RELATIONSHIPS.value, ("asana", "Goal relationships"))
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is a duplicate of the previous assertion for Tag.IMPORTANT.value. It should be removed to avoid redundancy.

@angrybayblade angrybayblade deleted the shubhra/enum-tests branch October 14, 2024 07:59
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