summaryrefslogtreecommitdiffstats
path: root/bindings/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-10-21 19:20:18 +0200
committerDavid Robillard <d@drobilla.net>2019-10-21 19:20:18 +0200
commit7c4850d2977f80308b0de8274c545123fd2c95ac (patch)
treebc3c68e3c944903a0f8d82bedb2fac0ab73fd22b /bindings/test
parentd959f44bd486b91bf98b689f082713eb795e0be9 (diff)
downloadlilv-7c4850d2977f80308b0de8274c545123fd2c95ac.tar.gz
lilv-7c4850d2977f80308b0de8274c545123fd2c95ac.tar.bz2
lilv-7c4850d2977f80308b0de8274c545123fd2c95ac.zip
Fix memory errors and Python 3.4+ compatibility in Python bindings
Diffstat (limited to 'bindings/test')
-rw-r--r--bindings/test/python/test_api.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bindings/test/python/test_api.py b/bindings/test/python/test_api.py
index ab0a1a4..91cc814 100644
--- a/bindings/test/python/test_api.py
+++ b/bindings/test/python/test_api.py
@@ -158,8 +158,6 @@ class PluginTests(unittest.TestCase):
self.assertEqual(
self.plugin.get_uri(), self.plugin_uri, "URI equality broken"
)
- self.instance = lilv.Instance(self.plugin, 48000, None)
- self.assertIsNotNone(self.instance)
self.lv2_InputPort = self.world.new_uri(lilv.LILV_URI_INPUT_PORT)
self.lv2_OutputPort = self.world.new_uri(lilv.LILV_URI_OUTPUT_PORT)
self.lv2_AudioPort = self.world.new_uri(lilv.LILV_URI_AUDIO_PORT)
@@ -262,10 +260,10 @@ class PluginTests(unittest.TestCase):
def testScalePoints(self):
port = self.plugin.get_port("input")
points = port.get_scale_points()
- self.assertEqual(points[0].get_label(), "off")
- self.assertEqual(points[0].get_value(), 0.0)
- self.assertEqual(points[1].get_label(), "on")
- self.assertEqual(points[1].get_value(), 1.0)
+ point_dict = { float(points[0].get_value()): points[0].get_label(),
+ float(points[1].get_value()): points[1].get_label() }
+
+ self.assertEqual(point_dict, {0.0: "off", 1.0: "on"})
def testPortCount(self):
self.assertEqual(