Skip to content

Commit

Permalink
Improve code coverage for indexdigest/cli/script.py
Browse files Browse the repository at this point in the history
  • Loading branch information
macbre committed Jun 11, 2021
1 parent 15ad544 commit 21e46e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion indexdigest/cli/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def filter_reports_by_table(reports, tables=None, skip_tables=None):
return reports


def main():
def main(): # pragma: no cover
""" Main entry point for CLI"""
logger = logging.getLogger(__name__)

Expand Down
Empty file.
8 changes: 8 additions & 0 deletions indexdigest/test/cli/test_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from _pytest.monkeypatch import MonkeyPatch
from indexdigest import VERSION
from indexdigest.cli.script import get_version


def test_get_version(monkeypatch: MonkeyPatch):
monkeypatch.setenv('COMMIT_SHA', '1234567890abc')
assert get_version() == f'{VERSION} (git 1234567)'

0 comments on commit 21e46e3

Please sign in to comment.