Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Nov 10, 2024
1 parent c49badc commit 9a3e127
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions tests/test_bivariate_renderer.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from PyQt5.QtXml import QDomElement
from qgis.core import (QgsVectorLayer, QgsProject, QgsReadWriteContext)
from qgis.core import QgsProject, QgsReadWriteContext, QgsVectorLayer
from qgis.PyQt.QtXml import QDomDocument

from BivariateRenderer.colorramps.color_ramps_register import BivariateColorRampGreenPink
from BivariateRenderer.renderer.bivariate_renderer import BivariateRenderer

from tests import assert_images_equal


Expand All @@ -14,7 +13,7 @@ def test_layer_bivariate_render(nc_layer: QgsVectorLayer, qgs_project: QgsProjec
bivariate_renderer = prepare_bivariate_renderer(nc_layer,
field1="AREA",
field2="PERIMETER",
color_ramps=BivariateColorRampGreenPink())
color_ramp=BivariateColorRampGreenPink())

nc_layer.setRenderer(bivariate_renderer)

Expand All @@ -32,7 +31,7 @@ def test_functions(nc_layer: QgsVectorLayer, prepare_bivariate_renderer):
bivariate_renderer = prepare_bivariate_renderer(nc_layer,
field1="AREA",
field2="PERIMETER",
color_ramps=BivariateColorRampGreenPink())
color_ramp=BivariateColorRampGreenPink())

xml_renderer = """
<!DOCTYPE doc>
Expand Down
5 changes: 2 additions & 3 deletions tests/test_layout_item_legend.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from BivariateRenderer.colorramps.bivariate_color_ramp import BivariateColorRampGreenPink
from BivariateRenderer.layoutitems.layout_item import BivariateRendererLayoutItem

from tests import (assert_images_equal)
from tests import assert_images_equal


def test_generate_legend_in_layout(qgis_countries_layer, qgs_layout, qgs_project, layout_page_a4,
Expand All @@ -10,7 +9,7 @@ def test_generate_legend_in_layout(qgis_countries_layer, qgs_layout, qgs_project
bivariate_renderer = prepare_bivariate_renderer(qgis_countries_layer,
field1="fid",
field2="fid",
color_ramps=BivariateColorRampGreenPink())
color_ramp=BivariateColorRampGreenPink())

qgis_countries_layer.setRenderer(bivariate_renderer)

Expand Down

0 comments on commit 9a3e127

Please sign in to comment.