Skip to content

Enable tests with QGIS 4 #757

@suricactus

Description

@suricactus

What is the bug or the crash? What were your expectations and what actually happened?

Unfortunately the tests with QGIS 4 are causing a crash. For now we temporarily disabled them.

The crash seems to be right after tests are finished, see:

https://github.com/opengisch/qfieldsync/actions/runs/24213903160/job/70689553012

#13 writing image sha256:56f9d1ec29c9a59fc965c5a531adbefcda55357573f86e85448c85af39fe7f79 done
#13 naming to docker.io/library/docker-qgis done
#13 DONE 5.5s

#14 resolving provenance for metadata file
#14 DONE 0.0s
/usr/src /
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.3.5, pluggy-1.5.0
rootdir: /usr/src
configfile: pyproject.toml
collected 7 items

qfieldsync/setting_manager/test/test_dialog.py .                         [ 14%]
qfieldsync/setting_manager/test/test_setting.py .                        [ 28%]
qfieldsync/tests/test_export.py ..                                       [ 57%]
qfieldsync/tests/test_package_dialog.py .                                [ 71%]
qfieldsync/tests/test_project_configuration_dialog.py .                  [ 85%]
qfieldsync/tests/test_synchronize_dialog.py .                            [100%]

=============================== warnings summary ===============================
qfieldsync/setting_manager/test/test_dialog.py::TestDialog::test_dialog
  /usr/lib/python3.13/unittest/case.py:707: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDialog.test_dialog of <qfieldsync.setting_manager.test.test_dialog.TestDialog testMethod=test_dialog>>)
    return self.run(*args, **kwds)

qfieldsync/setting_manager/test/test_setting.py::TestSetting::test_settings
  /usr/lib/python3.13/unittest/case.py:707: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestSetting.test_settings of <qfieldsync.setting_manager.test.test_setting.TestSetting testMethod=test_settings>>)
    return self.run(*args, **kwds)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 7 passed, 2 warnings in 2.16s =========================
Segmentation fault (core dumped)

Error: Process completed with exit code 139.

So far I have very unfortunate experience with stability around QGIS 4, either using the QGIS image, or installing it from the Ubuntu repositories. Python functions causing core dumped should not be Python's fault.

Steps to reproduce the issue

Run the tests in qgis/qgis:stable image.

QGIS version

4.0.0

QFieldSync Version

any

Operating system name

Linux

Operating system version

Ubuntu 25.10

Reinstall QFieldSync

  • I have a fresh install of the latest QFieldSync version on a new QGIS profile, but the problem persists.
  • Problem can be reliably reproduced, doesn't happen randomly.
  • Problem happens with all files and projects, not only some files or projects.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions