Skip to content

Update test cases to cover main.py file - #1927

Merged
gsheni merged 14 commits into
mainfrom
test_cover_main_py
Mar 2, 2022
Merged

Update test cases to cover main.py file#1927
gsheni merged 14 commits into
mainfrom
test_cover_main_py

Conversation

@mingdavidqi

@mingdavidqi mingdavidqi commented Mar 1, 2022

Copy link
Copy Markdown
Contributor

ASAIK, pytest normally avoids main.py files because the name main.py doesn't match the test_*.py or *_test.py patterns wich pytest is looking for.

No idea why it's covered (42.86%) before and why it's gone now.

Tried to write some test cases to cover main.py file and updated codecov-action @ v2 beacause of https://github.com/marketplace/actions/codecov

Fixes #1885

@thehomebrewnerd

Copy link
Copy Markdown
Contributor

@mingdavidqi I just realized something. I think you might just need to add an __init__.py file to the cli_tests folder. I think we ran into a similar issue a while back with Woodwork. I don't recall the details now, but I think there was some issue with tests not being used for coverage if they were in a folder without an __init__.py file.

Not completely sure this is it, but maybe something to look into.

@gsheni gsheni changed the title Update test cases to cover main.py file. Issue #1885 Update test cases to cover main.py file Mar 1, 2022
@codecov

codecov Bot commented Mar 1, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1927 (2fbf301) into main (3ab6880) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1927      +/-   ##
==========================================
+ Coverage   98.78%   98.99%   +0.21%     
==========================================
  Files         149      150       +1     
  Lines       16438    16456      +18     
==========================================
+ Hits        16238    16291      +53     
+ Misses        200      165      -35     
Impacted Files Coverage Δ
featuretools/tests/cli_tests/test_cli.py 100.00% <100.00%> (ø)
featuretools/utils/cli_utils.py 91.66% <0.00%> (+37.49%) ⬆️
featuretools/__main__.py 60.71% <0.00%> (+60.71%) ⬆️

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 3ab6880...2fbf301. Read the comment docs.

@mingdavidqi
mingdavidqi requested a review from a team March 1, 2022 21:53
Comment thread test-requirements.txt Outdated
@mingdavidqi
mingdavidqi requested a review from a team March 2, 2022 17:04
Comment thread docs/source/release_notes.rst Outdated

@thehomebrewnerd thehomebrewnerd 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.

LGTM!

@gsheni
gsheni merged commit 068887e into main Mar 2, 2022
@gsheni
gsheni deleted the test_cover_main_py branch March 2, 2022 21:46
@thehomebrewnerd thehomebrewnerd mentioned this pull request Mar 15, 2022
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.

No code coverage on __main__.py

3 participants