diff --git a/pyproject.toml b/pyproject.toml index e86970a..b9b41f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "dx-productivity" -version = "1.1.0" +version = "1.1.1" requires-python = ">=3.12,<3.13" dependencies = ["PySide6>=6.7,<7", "pywin32>=306", "pywinauto>=0.6.9,<1", "openpyxl>=3.1,<4"] diff --git a/src/dx_productivity/trial_task_center/application.py b/src/dx_productivity/trial_task_center/application.py index 5a44e3c..83a29b9 100644 --- a/src/dx_productivity/trial_task_center/application.py +++ b/src/dx_productivity/trial_task_center/application.py @@ -97,7 +97,7 @@ def main(argv: Sequence[str] | None = None) -> int: if arguments.private_cad_action: if arguments.private_cad_evidence is None or arguments.private_cad_pid is None: return 2 - from .isolated_cad import native_action + from dx_productivity.trial_task_center.isolated_cad import native_action return native_action(arguments.private_cad_action, arguments.private_cad_evidence, arguments.private_cad_pid) if arguments.native_helper: if arguments.snapshot is None: diff --git a/src/dx_productivity/trial_task_center/version.py b/src/dx_productivity/trial_task_center/version.py index 2a3eb2f..ca638cf 100644 --- a/src/dx_productivity/trial_task_center/version.py +++ b/src/dx_productivity/trial_task_center/version.py @@ -1 +1 @@ -VERSION = "1.1.0" +VERSION = "1.1.1" diff --git a/tests/v1_1/test_isolated_cad.py b/tests/v1_1/test_isolated_cad.py index 0d8dc43..c1697d5 100644 --- a/tests/v1_1/test_isolated_cad.py +++ b/tests/v1_1/test_isolated_cad.py @@ -80,6 +80,21 @@ def test_hidden_private_action_dispatches_without_opening_gui(monkeypatch, tmp_p assert application.main(['--private-cad-action', 'probe']) == 2 +def test_private_helper_works_when_application_is_the_executable_entry_script(monkeypatch, tmp_path): + import runpy + import sys + from dx_productivity.trial_task_center import application + calls = [] + monkeypatch.setattr(runtime, 'native_action', lambda *args: calls.append(args) or 0) + evidence = tmp_path / 'binding.json' + monkeypatch.setattr(sys, 'argv', [application.__file__, '--private-cad-action', 'probe', + '--private-cad-evidence', str(evidence), '--private-cad-pid', '123']) + with pytest.raises(SystemExit) as result: + runpy.run_path(application.__file__, run_name='__main__') + assert result.value.code == 0 + assert calls == [('probe', evidence, 123)] + + def test_startup_cancellation_releases_without_waiting_for_com_timeout(monkeypatch, tmp_path): abort = Event() events, _ = fake_desktop(monkeypatch, tmp_path, abort=abort) diff --git a/tests/v1_1/test_project_task_ui.py b/tests/v1_1/test_project_task_ui.py index 0cb50f1..d3d332c 100644 --- a/tests/v1_1/test_project_task_ui.py +++ b/tests/v1_1/test_project_task_ui.py @@ -52,7 +52,7 @@ def test_original_window_edits_target_plan_and_nc_without_export(qtbot, tmp_path qtbot.addWidget(window) window.open_task(task.task_id) qtbot.waitUntil(lambda: not window._loading and not window._context_query.busy) - assert '1.1.0' in window.windowTitle() + assert '1.1.1' in window.windowTitle() table = window.plan_panel.table table.item(0, 0).setCheckState(Qt.CheckState.Checked) table.item(0, 9).setCheckState(Qt.CheckState.Unchecked)