-
Notifications
You must be signed in to change notification settings - Fork 89
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
added possible Tuple timeout for Config #897
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #897 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 752 748 -4
=========================================
- Hits 752 748 -4 ☔ View full report in Codecov by Sentry. |
Thank you @LGXerxes for your PR @sanders41 if you have the time to review (never an emergency). Looks too python-oriented for me 😅 |
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.
This same change will also need to be made to the timeout
in the __init__
of the Client
class. Additionally the doc string for the Client
class should be updated to explain the Tuple
options.
There is a test in tests/client/test_client.py
called test_client_timeout_set
that should be updated to verify all these options work. That test can be parametrized to cover the options:
@pytest.mark.parametrize("timeout", (5, 5.0, (5, 5), (5.0, 5.0)))
def test_client_timeout_set(timeout):
client = meilisearch.Client(BASE_URL, MASTER_KEY, timeout=timeout)
response = client.health()
assert client.config.timeout == timeout
assert response["status"] == "available"
Co-authored-by: Paul Sanders <psanders1@gmail.com>
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.
This change looks good. We still need the same change to be made to the timeout
in the __init__
of the Client
class, and the doc string for the Client
class should be updated to explain the Tuple
options. Additionally the test update is still needed.
Closing this for lack of activity. Feel free to re-open of course |
No description provided.