Skip to content

Commit

Permalink
Minor formatting and fixing usage of renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Aug 25, 2024
1 parent dcf61cf commit 5a02908
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/scribe_data/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from scribe_data.cli.interactive import start_interactive_mode
from scribe_data.cli.list import list_wrapper
from scribe_data.cli.total import get_total_lexemes
from scribe_data.cli.upgrade import upgrade
from scribe_data.cli.upgrade import upgrade_cli
from scribe_data.cli.version import get_version_message

LIST_DESCRIPTION = "List languages, data types and combinations of each that Scribe-Data can be used for."
Expand Down Expand Up @@ -196,7 +196,7 @@ def main() -> None:
args = parser.parse_args()

if args.upgrade:
upgrade()
upgrade_cli()
return

if not args.command:
Expand Down
11 changes: 6 additions & 5 deletions tests/cli/test_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Tests for the version file functions.
Tests for the CLI version functionality.
.. raw:: html
<!--
Expand All @@ -22,12 +22,13 @@

import unittest
from unittest.mock import patch

import pkg_resources
from scribe_data.cli.version import (
get_local_version,
get_latest_version,
get_local_version,
get_version_message,
)
import pkg_resources


class TestVersionFunctions(unittest.TestCase):
Expand Down Expand Up @@ -60,7 +61,7 @@ def test_get_version_message_up_to_date(
self, mock_latest_version, mock_local_version
):
"""
Tests the scenario where the local version is up to date with the latest version
Tests the scenario where the local version is up to date with the latest version.
"""
expected_message = "Scribe-Data v1.0.0"
self.assertEqual(get_version_message(), expected_message)
Expand All @@ -73,7 +74,7 @@ def test_get_version_message_update_available(
self, mock_latest_version, mock_local_version
):
"""
Tests the scenario where a newer version is available, suggesting an update
Tests the scenario where a newer version is available, suggesting an update.
"""
expected_message = "Scribe-Data v1.0.0 (Upgrade available: Scribe-Data v1.0.1)\nTo update: pip scribe-data --upgrade"
self.assertEqual(get_version_message(), expected_message)

0 comments on commit 5a02908

Please sign in to comment.