From 10ab800bd4872d057a71812ce37e23923e47a310 Mon Sep 17 00:00:00 2001 From: Jos Verlinde Date: Wed, 11 Dec 2024 09:08:20 +0100 Subject: [PATCH] refactor: change default production flag to False and fix typo in test assertion Signed-off-by: Jos Verlinde --- src/stubber/commands/publish_cmd.py | 2 +- tests/publish/test_publish.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stubber/commands/publish_cmd.py b/src/stubber/commands/publish_cmd.py index 2cb29eda..8072ff3f 100644 --- a/src/stubber/commands/publish_cmd.py +++ b/src/stubber/commands/publish_cmd.py @@ -82,7 +82,7 @@ def cli_publish( versions: Union[str, List[str]], ports: Union[str, List[str]], boards: Union[str, List[str]], - production: bool = True, + production: bool = False, build: bool = False, force: bool = False, dry_run: bool = False, diff --git a/tests/publish/test_publish.py b/tests/publish/test_publish.py index 88347652..1ec71f64 100644 --- a/tests/publish/test_publish.py +++ b/tests/publish/test_publish.py @@ -150,7 +150,7 @@ def test_publish_package( assert len(list(dist_path.glob("*.whl"))) == 1, "should be one wheel in the dist path" assert len(list(dist_path.glob("*.gz"))) == 1, "should be one tarball in the dist path" - assert not pkg.is_changed(), "should show as un changed after publish" + assert not pkg.is_changed(), "should show as unchanged after publish" # Check if the has been published assert m_publish.called, "should call poetry publish" @@ -161,7 +161,6 @@ def test_publish_package( "SELECT * FROM packages where name = ? AND mpy_version = ? ORDER by pkg_version DESC", (pkg.package_name, pkg.mpy_version), ) - cursor.row_factory = sqlite3.Row # to get dict like access recs = cursor.fetchall() row = recs[0]