Hi, I have setup some plugins with unittests using Docker. I have followed the documentation : https://github.com/qgis/QGIS/tree/master/.docker to run them locally or/and on Travis.
This tests is working well using the QGIS 3.4 docker image : class TestEditionDialog(unittest.TestCase): def test_atlas_dialog(self): """Test atlas dialog.""" layer = QgsVectorLayer(plugin_test_data_path('lines.geojson'), 'lines', 'ogr') QgsProject.instance().addMapLayer(layer) self.assertTrue(layer.isValid()) But as soon as I start using a QGIS 3.10 docker image, QGIS crash. test_atlas_dialog (lizmap.test.test_dialog_edition.TestEditionDialog) Test atlas dialog. ... QGIS died on signal 11Test atlas dialog. ... QGIS died on signal 11 Finished running test qgis_plugin_tools.infrastructure.test_runner.test_package (codes: IS_DEAD=0 IS_FAILED=1 IS_PASSED=1). root@1c7939c428c6:/tests_directory/lizmap# By commenting the code, I noticed it's the `QgsProject.instance()` which trigger the crash. It tried quickly to replace by: layer = QgsVectorLayer(plugin_test_data_path('lines.geojson'), 'lines', 'ogr') project = QgsProject() project.addMapLayer(layer) self.assertTrue(layer.isValid()) It's working, the test is OK. But then, all my tests using a QgsMapLayerComboBox are failing because the combobox is empty. Does anyone confirm this kind of behaviour in their tests? Is-it a bug or is-it another way to do tests using this docker image? Regards, Etienne
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer