preset-io / elasticsearch-dbapi

A DBAPI and SQLAlchemy dialect for Elasticsearch
Apache License 2.0
108 stars 51 forks source link

tests: add test case for `test_execute_empty_result` #89

Closed vchrombie closed 2 years ago

vchrombie commented 2 years ago

added a test case where the rowcount returns 0 when there are no results https://github.com/preset-io/elasticsearch-dbapi/blob/7e48e57367c3b745bc640fc84d4aca4833a099ed/es/baseapi.py#L224

https://github.com/preset-io/elasticsearch-dbapi/blob/7e48e57367c3b745bc640fc84d4aca4833a099ed/es/baseapi.py#L220-#L224

codecov-commenter commented 2 years ago

Codecov Report

Merging #89 (8009dcf) into master (8e6aee6) will increase coverage by 0.11%. The diff coverage is 100.00%.

:exclamation: Current head 8009dcf differs from pull request most recent head 5073765. Consider uploading reports for the commit 5073765 to get more accurate results

@@            Coverage Diff             @@
##           master      #89      +/-   ##
==========================================
+ Coverage   94.40%   94.52%   +0.11%     
==========================================
  Files          15       15              
  Lines         966      968       +2     
==========================================
+ Hits          912      915       +3     
+ Misses         54       53       -1     
Flag Coverage Δ
python 94.52% <100.00%> (+0.11%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
es/tests/test_dbapi.py 100.00% <100.00%> (ø)
es/baseapi.py 90.50% <0.00%> (+0.63%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8e6aee6...5073765. Read the comment docs.

dpgaspar commented 2 years ago

Hi @vchrombie,

Thank you for your contribution, more tests are always welcome.

Can you please update your branch with the current master. I've just merged a PR that will fix CI lint step.

vchrombie commented 2 years ago

Can you please update your branch with the current master. I've just merged a PR that will fix CI lint step.

Thank you, I have just updated the branch of the fork.