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

Fix asyncio warnings/markers. #574

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

dblock
Copy link
Member

@dblock dblock commented Nov 10, 2023

Description

Fixes

test_opensearchpy/test_async/test_http_connection.py::TestAsyncHttpConnection::test_auth_as_tuple
  test_opensearchpy/test_async/test_http_connection.py:44: PytestWarning: The test <Function test_auth_as_tuple> is marked with '@pytest.mark.asyncio' but it is not an async function. Please remove asyncio marker. If the test is not marked explicitly, check for global markers applied via 'pytestmark'.
    def test_auth_as_tuple(self) -> None:

and

test_opensearchpy/test_async/test_plugins_client.py::TestPluginsClient::test_plugins_client
  /Users/dblock/.pyenv/versions/3.9.16/lib/python3.9/unittest/case.py:550: RuntimeWarning: coroutine 'TestPluginsClient.test_plugins_client' was never awaited
    method()
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

I also added a codecov threshold of 0.1% to allow some minor coverage changes. In this PR there's no change in coverage, yet codecov seems to think otherwise because of some code line changes. No need to fail the build on such minor changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #574 (ad33580) into main (d8dc547) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #574      +/-   ##
==========================================
+ Coverage   71.69%   71.70%   +0.01%     
==========================================
  Files          87       87              
  Lines        7886     7886              
==========================================
+ Hits         5654     5655       +1     
+ Misses       2232     2231       -1     

see 1 file with indirect coverage changes

@VachaShah VachaShah merged commit 55d0e0d into opensearch-project:main Nov 10, 2023
54 checks passed
@dblock dblock deleted the fix-asyncio-markers branch November 10, 2023 18:55
roma2023 pushed a commit to roma2023/opensearch-py that referenced this pull request Dec 28, 2023
* Fix asyncio warnings/markers.

Signed-off-by: dblock <[email protected]>

* Allow some flexibility in codecov.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
Signed-off-by: roma2023 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants