qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.03k stars 2.92k forks source link

PyQgsSelectiveMasking testcase fails: FileNotFoundError: [Errno 2] No such file or directory: 'qpdf' #57733

Open strk opened 3 weeks ago

strk commented 3 weeks ago

What is the bug or the crash?

testcase fails, I guess due to missing dependency.

Solution proposed: don't run the test if the dependency is not met, printing a WARNING instead

Steps to reproduce the issue

ctest -R PyQgsSelectiveMasking --output-on-failure

Versions

Current master branch

Supported QGIS version

New profile

Additional context

Traceback (most recent call last): File "/usr/local/src/qgis/qgis/src/master/tests/src/python/test_selective_masking.py", line 1317, in test_vector_random_generator_fill self.check_layout_export("layout_export_random_generator_fill", 0, [layer], extent=extent) File "/usr/local/src/qgis/qgis/src/master/tests/src/python/test_selective_masking.py", line 223, in check_layout_export subprocess.run(["qpdf", "--qdf", "--object-streams=disable", result_filename, result_txt]) File "/usr/lib/python3.10/subprocess.py", line 503, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.10/subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'qpdf'

strk commented 2 weeks ago

CI is also showing errors in that test:

======================================================================
FAIL: test_markerline_masked (__main__.TestSelectiveMaskingGeometryBackend)
Test a layout export where a QgsMarkerLineSymbolLayer is masked
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/QGIS/tests/src/python/test_selective_masking.py", line 1376, in test_markerline_masked
    self.check_layout_export("layout_export_markerline_masked", 0, [self.polys_layer, self.lines_layer])
  File "/root/QGIS/tests/src/python/test_selective_masking.py", line 251, in check_layout_export
    self.assertTrue(res)
AssertionError: False is not true