Skip to content

Commit f0606d7

Browse files
committed
Add module entry point test and bump version
1 parent f58e2a6 commit f0606d7

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "slicer-uri-bridge"
7-
version = "0.1.0"
7+
version = "0.1.1"
88
description = "Register slicer URI handlers and bridge slicer links to Bambu Studio."
99
readme = "README.md"
1010
requires-python = ">=3.11"

src/slicer_uri_bridge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
from __future__ import annotations
44

5-
__version__ = "0.1.0"
5+
__version__ = "0.1.1"

tests/test_cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import shutil
44
import subprocess
5+
import sys
56
import unittest
67
import uuid
78
from io import StringIO
@@ -33,6 +34,17 @@ def isatty(self) -> bool:
3334

3435

3536
class InteractiveOnboardingTests(unittest.TestCase):
37+
def test_package_can_run_as_python_module(self) -> None:
38+
completed = subprocess.run(
39+
[sys.executable, "-m", "slicer_uri_bridge", "--version"],
40+
capture_output=True,
41+
text=True,
42+
check=False,
43+
)
44+
45+
self.assertEqual(completed.returncode, 0, completed.stderr)
46+
self.assertIn("slicer-uri-bridge", completed.stdout)
47+
3648
def test_no_args_requires_tty(self) -> None:
3749
class FakePipe:
3850
def isatty(self) -> bool:

0 commit comments

Comments
 (0)