Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS UI test script fails #2145

Open
visr opened this issue Mar 11, 2025 · 0 comments
Open

QGIS UI test script fails #2145

visr opened this issue Mar 11, 2025 · 0 comments
Labels
QGIS Ribasim QGIS plugin test Relates to unit testing

Comments

@visr
Copy link
Member

visr commented Mar 11, 2025

There are a few errors here. The QGIS plugin seems to be working fine.

✨ Pixi task (test-ribasim-qgis-ui in default): python ribasim_qgis/scripts/run_qgis_ui_tests.py
-------------------------------------------------------------------------------
pydev debugger: CRITICAL WARNING: This version of python seems to be incorrectly compiled (internal generated filenames are not absolute)
pydev debugger: The debugger may still function, but it will work slower and may miss breakpoints.
pydev debugger: Related bug: http://bugs.python.org/issue1666807
-------------------------------------------------------------------------------
ERROR: Status 2: File C:\ProgramData\DevDrives\repo\ribasim\Ribasim\ribasim_qgis.tests could not be found
QGIS Test Runner Inside - starting the tests ...
QGIS Test Runner - Trying to import ribasim_qgis.tests
QGIS Test Runner Inside - executing function <function run_all at 0x000002B9D9D7A480>
test_get_database_path_from_model_file (ribasim_qgis.tests.core.test_model.TestModel.test_get_database_path_from_model_file)
Tests that get_database_path_from_model_file() can find the input directory and appends the database.gpkg to it. ... ok
test_get_directory_path_from_model_file (ribasim_qgis.tests.core.test_model.TestModel.test_get_directory_path_from_model_file)
Tests that get_directory_path_from_model_file() can resolve paths from a toml file. ... ok
test_plugin (ribasim_qgis.tests.ui.test_load_plugin.TestPlugin.test_plugin)
Triggers Ribasim button and checks that Dock is added. ... ok
test_plugin_is_loaded (ribasim_qgis.tests.ui.test_load_plugin.TestPlugin.test_plugin_is_loaded)
Test plugin is properly loaded and appears in QGIS plugins. ... ok

----------------------------------------------------------------------
Ran 4 tests in 0.344s

OK
ERROR:root:QGIS Test Runner Inside - [FAILED] Exception: [WinError 6] The handle is invalid
Traceback (most recent call last):
  File "<string>", line 121, in __run_test
  File "<string>", line 108, in __exit_qgis
OSError: [WinError 6] The handle is invalid

Traceback (most recent call last):
  File "C:\ProgramData\DevDrives\repo\ribasim\Ribasim\ribasim_qgis\scripts\run_qgis_ui_tests.py", line 20, in <module>
    qgis_process.check_returncode()
  File "C:\ProgramData\DevDrives\repo\ribasim\Ribasim\.pixi\envs\default\Lib\subprocess.py", line 504, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['qgis', '--profiles-path', '.pixi/qgis_env', '--version-migration', '--nologo', '--code', 'ribasim_qgis/scripts/qgis_testrunner.py', 'ribasim_qgis.tests']' returned non-zero exit status 15.
@visr visr added QGIS Ribasim QGIS plugin test Relates to unit testing labels Mar 11, 2025
@github-project-automation github-project-automation bot moved this to To do in Ribasim Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QGIS Ribasim QGIS plugin test Relates to unit testing
Projects
Status: To do
Development

No branches or pull requests

1 participant