tests: Fix meson configure with pycairo disabled
Running the configuration with the meson option -Dpycairo=disabled
breaks a lot of tests. This MR make it available to run tests correctly when the pycairo option is disabled.
Running the configuration with the meson option -Dpycairo=disabled
breaks a lot of tests. This MR make it available to run tests correctly when the pycairo option is disabled.