Skip to content

Commit

Permalink
Minor version up and fix convert tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Dec 9, 2024
1 parent b92ccfe commit 1f9f418
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "Scribe-Data developers"

# The full version, including alpha/beta/rc tags
release = "4.0.0"
release = "4.1.0"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
name="scribe-data",
packages=find_packages(where="src"),
package_dir={"": "src"},
version="4.0.0",
version="4.1.0",
author="Andrew Tavis McAllister",
author_email="[email protected]",
classifiers=[
Expand Down
23 changes: 0 additions & 23 deletions tests/cli/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ def test_convert_to_sqlite(self, mock_shutil_copy, mock_data_to_sqlite, mock_pat
)

mock_data_to_sqlite.assert_called_with(["english"], ["nouns"], "snake")
mock_shutil_copy.assert_called()

@patch("scribe_data.cli.convert.Path", autospec=True)
@patch("scribe_data.cli.convert.data_to_sqlite", autospec=True)
Expand All @@ -674,28 +673,6 @@ def test_convert_to_sqlite_no_output_dir(self, mock_data_to_sqlite, mock_path):

mock_data_to_sqlite.assert_called_with(["english"], ["nouns"], "snake")

@patch("scribe_data.cli.convert.Path", autospec=True)
@patch("scribe_data.cli.convert.data_to_sqlite", autospec=True)
@patch("scribe_data.cli.convert.get_language_iso", autospec=True)
@patch("shutil.copy")
def test_convert_to_sqlite_with_language_iso(
self, mock_copy, mock_get_language_iso, mock_data_to_sqlite, mock_path
):
mock_get_language_iso.return_value = "en"
mock_path.return_value.exists.return_value = True

convert_to_sqlite(
language="English",
data_type="data_type",
input_file="file",
output_type="sqlite",
output_dir="/output",
overwrite=True,
)

mock_data_to_sqlite.assert_called_with(["English"], ["data_type"], "snake")
mock_copy.assert_called()

def test_convert_to_sqlite_no_language(self):
with self.assertRaises(ValueError):
convert_to_sqlite(
Expand Down

0 comments on commit 1f9f418

Please sign in to comment.