Skip to content

modified tests for integration#1732

Closed
chrissieacodes wants to merge 2 commits into
mainfrom
feat/python-conversational-analytics
Closed

modified tests for integration#1732
chrissieacodes wants to merge 2 commits into
mainfrom
feat/python-conversational-analytics

Conversation

@chrissieacodes

Copy link
Copy Markdown
Contributor

👋👋 Thank you for contributing to Looker sdk-codegen (⚡️🍣)

  • 👆 Make sure your pull request title follows Pull Request Title Guidelines from our Contribution guide
  • 👉 Don't forget to replace these instructions with your ✨awesome✨ description of what this change actually does. Additionally, it's great to include context on how it works and why the change was needed.
  • 👇 Edit "Developer Checklist" to reflect items relevant to this PR (and try to make sure to check everything off before asking for review)

Developer Checklist ℹ️

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@chrissieacodes chrissieacodes requested a review from a team as a code owner July 6, 2026 20:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the test_conversational_analytics integration test to gracefully handle cases where Conversational Analytics is not enabled by catching error.SDKError and skipping the test. However, the error module is not imported in the test file, which will cause a NameError if an exception is thrown. An inline import of error from looker_sdk is recommended to resolve this issue.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +690 to +699
try:
agent = sdk.create_agent(
body=ml.WriteAgent(
name="Temp SDK Test Agent",
category="conversation",
description="Temporary agent created for SDK integration tests",
sources=[ml.Source(model="thelook",explore="products")]
)
)
)
except error.SDKError as e:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The error module is not imported in this test file, which will cause a NameError when attempting to catch error.SDKError if an exception is raised. To resolve this, we can import error from looker_sdk inline within the try block so it is available when the except clause is evaluated.

        try:
            from looker_sdk import error
            agent = sdk.create_agent(
                body=ml.WriteAgent(
                    name="Temp SDK Test Agent",
                    category="conversation",
                    description="Temporary agent created for SDK integration tests",
                    sources=[ml.Source(model="thelook",explore="products")]
                )
            )
        except error.SDKError as e:

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Python Tests

  7 files   -  1    7 suites   - 1   24s ⏱️ -19s
141 tests ± 0  136 ✅ ± 0   4 💤 ±0  1 ❌ ±0 
721 runs   - 25  701 ✅  - 23  19 💤  - 1  1 ❌  - 1 

For more details on these failures, see this check.

Results for commit 2a0c4ce. ± Comparison against base commit ac92db1.

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.

1 participant