-
Notifications
You must be signed in to change notification settings - Fork 5
Feedback testing #13
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
base: main
Are you sure you want to change the base?
Feedback testing #13
Conversation
| logging.basicConfig(level=logging.INFO) | ||
| logger = logging.getLogger(__name__) | ||
|
|
||
| PROFILE_NAME = "PYSAI_TEST_FEEDBACK_PROFILE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use uuid just be safe because Github Actions runs tests concurrently and that can create concurrency issues accessing the profile. We run the testcases for multiple different Python versions in parallel.
Make sure the profile name is unique. We can use test suite id e.g. 1500 and a unique identifier.
import uuid
PROFILE_NAME = f"PYSAI_1500_{uuid.uuid4().hex.upper()}"| ), | ||
| ), | ||
| ) | ||
| with select_ai.cursor() as cr: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use existing fixture for cursor. It is module level fixture.
https://github.com/oracle/python-select-ai/blob/main/tests/conftest.py#L128-L131
def profile(oci_credential, oci_compartment_id, test_env, cursor)
cursor.execute(...)| response = "SELECT p1.name, g1.total_points FROM people p1 JOIN gymnast g1 ON p1.id = g1.id ORDER BY g1.total_points DESC" # Valid SQL on your tables | ||
| feedback_content = "print in descending order of total_points" | ||
| success = False | ||
| try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove try..except..else block.
In case of an unknown exception, pytest will fail the testcase. And we need the full traceback for any unknown exception.
Description
Feedback tests for select ai python package . It includes positive, negative, delete feedback API tests
How Has This Been Tested?
It is a test only transaction