Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 30, 2024
1 parent ce89af0 commit 12d90ae
Showing 1 changed file with 42 additions and 21 deletions.
63 changes: 42 additions & 21 deletions felt/test/test_fsl_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def test_simple_line_to_fsl(self):

line.setPenJoinStyle(Qt.MiterJoin)
self.assertEqual(
FslConverter.simple_line_to_fsl(line, conversion_context, symbol_opacity=0.5),
FslConverter.simple_line_to_fsl(line, conversion_context,
symbol_opacity=0.5),
[{
'color': 'rgb(0, 255, 0)',
'size': 3,
Expand Down Expand Up @@ -351,7 +352,8 @@ def test_simple_fill_to_fsl(self):

fill.setPenJoinStyle(Qt.MiterJoin)
self.assertEqual(
FslConverter.simple_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.simple_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(0, 255, 0)',
'lineJoin': 'miter',
'opacity': 0.5,
Expand All @@ -369,7 +371,8 @@ def test_simple_fill_to_fsl(self):
'strokeWidth': 3.0}]
)
self.assertEqual(
FslConverter.simple_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.simple_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(0, 255, 0)',
'dashArray': [2.5, 2],
'lineJoin': 'miter',
Expand Down Expand Up @@ -415,7 +418,8 @@ def test_shapeburst_fill_to_fsl(self):
)

self.assertEqual(
FslConverter.shapeburst_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.shapeburst_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(255, 255, 0)',
'opacity': 0.5,
'strokeColor': 'rgba(0, 0, 0, 0)'}]
Expand Down Expand Up @@ -458,7 +462,8 @@ def test_gradient_fill_to_fsl(self):
)

self.assertEqual(
FslConverter.gradient_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.gradient_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(255, 255, 0)',
'opacity': 0.5,
'strokeColor': 'rgba(0, 0, 0, 0)'}]
Expand Down Expand Up @@ -500,7 +505,8 @@ def test_line_pattern_fill_to_fsl(self):
)

self.assertEqual(
FslConverter.line_pattern_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.line_pattern_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(255, 0, 255)',
'opacity': 0.5,
'strokeColor': 'rgba(0, 0, 0, 0)'}]
Expand All @@ -527,7 +533,8 @@ def test_svg_fill_to_fsl(self):
)

self.assertEqual(
FslConverter.svg_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.svg_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(255, 0, 255)',
'opacity': 0.5,
'strokeColor': 'rgba(0, 0, 0, 0)'}]
Expand Down Expand Up @@ -566,7 +573,8 @@ def test_simple_marker_to_fsl(self):
)

self.assertEqual(
FslConverter.simple_marker_to_fsl(marker, conversion_context, symbol_opacity=0.5),
FslConverter.simple_marker_to_fsl(marker, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 19,
'opacity': 0.5,
Expand Down Expand Up @@ -631,7 +639,8 @@ def test_ellipse_marker_to_fsl(self):
)

self.assertEqual(
FslConverter.ellipse_marker_to_fsl(marker, conversion_context, symbol_opacity=0.5),
FslConverter.ellipse_marker_to_fsl(marker, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 19,
'opacity': 0.5,
Expand Down Expand Up @@ -701,7 +710,8 @@ def test_svg_marker_to_fsl(self):
)

self.assertEqual(
FslConverter.svg_marker_to_fsl(marker, conversion_context, symbol_opacity=0.5),
FslConverter.svg_marker_to_fsl(marker, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 19,
'opacity': 0.5,
Expand Down Expand Up @@ -759,7 +769,8 @@ def test_font_marker_to_fsl(self):
)

self.assertEqual(
FslConverter.font_marker_to_fsl(marker, conversion_context, symbol_opacity=0.5),
FslConverter.font_marker_to_fsl(marker, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 19,
'opacity': 0.5,
Expand Down Expand Up @@ -841,7 +852,8 @@ def test_filled_marker(self):
)

self.assertEqual(
FslConverter.filled_marker_to_fsl(marker, conversion_context, symbol_opacity=0.5),
FslConverter.filled_marker_to_fsl(marker, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(0, 255, 0)',
'size': 8,
'strokeColor': 'rgb(35, 35, 35)',
Expand Down Expand Up @@ -894,11 +906,13 @@ def test_point_pattern_fill_to_fsl(self):

self.assertEqual(
FslConverter.point_pattern_fill_to_fsl(fill, conversion_context),
[{'color': 'rgb(120, 130, 140)', 'strokeColor': 'rgba(0, 0, 0, 0)'}]
[{'color': 'rgb(120, 130, 140)',
'strokeColor': 'rgba(0, 0, 0, 0)'}]
)

self.assertEqual(
FslConverter.point_pattern_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.point_pattern_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'opacity': 0.5, 'strokeColor': 'rgba(0, 0, 0, 0)'}]
)
Expand Down Expand Up @@ -938,11 +952,13 @@ def test_centroid_fill_to_fsl(self):

self.assertEqual(
FslConverter.centroid_fill_to_fsl(fill, conversion_context),
[{'color': 'rgb(120, 130, 140)', 'strokeColor': 'rgba(0, 0, 0, 0)'}]
[{'color': 'rgb(120, 130, 140)',
'strokeColor': 'rgba(0, 0, 0, 0)'}]
)

self.assertEqual(
FslConverter.centroid_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.centroid_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'opacity': 0.5, 'strokeColor': 'rgba(0, 0, 0, 0)'}]
)
Expand Down Expand Up @@ -982,11 +998,13 @@ def test_random_marker_fill_to_fsl(self):

self.assertEqual(
FslConverter.random_marker_fill_to_fsl(fill, conversion_context),
[{'color': 'rgb(120, 130, 140)', 'strokeColor': 'rgba(0, 0, 0, 0)'}]
[{'color': 'rgb(120, 130, 140)',
'strokeColor': 'rgba(0, 0, 0, 0)'}]
)

self.assertEqual(
FslConverter.random_marker_fill_to_fsl(fill, conversion_context, symbol_opacity=0.5),
FslConverter.random_marker_fill_to_fsl(fill, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'opacity': 0.5, 'strokeColor': 'rgba(0, 0, 0, 0)'}]
)
Expand Down Expand Up @@ -1032,7 +1050,8 @@ def test_marker_line_to_fsl(self):
)

self.assertEqual(
FslConverter.marker_line_to_fsl(line, conversion_context, symbol_opacity=0.5),
FslConverter.marker_line_to_fsl(line, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 2,
'opacity': 0.5}]
Expand Down Expand Up @@ -1091,7 +1110,8 @@ def test_hashed_line_to_fsl(self):
)

self.assertEqual(
FslConverter.hashed_line_to_fsl(line, conversion_context, symbol_opacity=0.5),
FslConverter.hashed_line_to_fsl(line, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 1,
'opacity': 0.5}]
Expand Down Expand Up @@ -1149,7 +1169,8 @@ def test_arrow_to_fsl(self):
)

self.assertEqual(
FslConverter.arrow_to_fsl(line, conversion_context, symbol_opacity=0.5),
FslConverter.arrow_to_fsl(line, conversion_context,
symbol_opacity=0.5),
[{'color': 'rgb(120, 130, 140)',
'size': 18,
'opacity': 0.5}]
Expand Down

0 comments on commit 12d90ae

Please sign in to comment.