feat: 采样点透明度范围可在图层行设置
This commit is contained in:
@@ -33,6 +33,12 @@ class SampleOpacityTests(unittest.TestCase):
|
||||
def test_single_total_is_the_darkest(self):
|
||||
self.assertEqual(opacity_by_total([4, 4]), {4: 70})
|
||||
|
||||
def test_custom_range_keeps_the_ends(self):
|
||||
mapping = opacity_by_total([1, 3, 9], 20, 80)
|
||||
self.assertEqual(mapping[1], 20)
|
||||
self.assertEqual(mapping[9], 80)
|
||||
self.assertEqual(mapping[3], 50)
|
||||
|
||||
def test_style_is_solid_red_using_opacity_percent(self):
|
||||
qml = (Path(__file__).resolve().parents[1] / "marketgrid" / "styles" / "sample_points.qml").read_text(encoding="utf-8")
|
||||
self.assertIn('value="solid"', qml)
|
||||
|
||||
Reference in New Issue
Block a user