File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ def test_cli_fails_on_invalid_setting_with_environ(runner) -> None:
129129
130130
131131if find_spec ("nicegui" ):
132+ # Import module explicitly to ensure it's loaded before monkeypatching with string paths.
133+ # Without this, monkeypatch.setattr("aignostics.utils._gui...") fails in CI because
134+ # pytest-xdist workers may not have aignostics.utils loaded as an attribute yet.
135+ import aignostics .utils ._gui as _utils_gui
132136
133137 @pytest .mark .integration
134138 def test_cli_gui_help (runner : CliRunner ) -> None :
@@ -186,7 +190,7 @@ def mock_app_mount(path, app_instance):
186190
187191 # Apply the mocks
188192 monkeypatch .setattr ("nicegui.ui.run" , mock_ui_run )
189- monkeypatch .setattr ("aignostics.utils._gui. gui_register_pages" , mock_gui_register_pages )
193+ monkeypatch .setattr (_utils_gui , " gui_register_pages" , mock_gui_register_pages )
190194 monkeypatch .setattr ("nicegui.app.mount" , mock_app_mount )
191195
192196 # Create a mock for native_app.find_open_port()
You can’t perform that action at this time.
0 commit comments