]> git.parisson.com Git - timeside.git/commitdiff
Fix test test_graphers_render_analyzers.py
authorThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 12:29:52 +0000 (13:29 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 12:29:52 +0000 (13:29 +0100)
tests/test_graphers_render_analyzers.py
timeside/core/grapher.py

index 7390e015ead95189a08e62f29b1cb1eb52d9c56f..48d10ea8bf12448fcf737c5c8c5e9bed75ffc8f3 100755 (executable)
@@ -51,9 +51,10 @@ def _tests_factory(grapher_analyzers):
         setattr(Test_graphers_analyzers, test_func_name, test_func)
 
 list_graphers = timeside.core.processor.processors(timeside.core.api.IGrapher)
-module = 'timeside.plugins.grapher.render_analyzers'
+from timeside.core.grapher import DisplayAnalyzer
 grapher_analyzers = [grapher for grapher in list_graphers
-                     if grapher.__module__ == module]
+                     if grapher.__base__ == DisplayAnalyzer]
+
 _tests_factory(grapher_analyzers)
 
 if __name__ == '__main__':
index 03277e83ede0b752dafa51bf8abd2c07c8d945fc..940e18fc401baccec04400d6211b5e7b4ce4eb44 100644 (file)
@@ -369,6 +369,9 @@ class DisplayAnalyzer(Grapher):
                grapher_id=None, grapher_name=None,
                background=None, staging=False):
 
+        if analyzer_parameters is None:
+            analyzer_parameters = {}
+
         class NewGrapher(cls):
 
             _id = grapher_id
@@ -413,7 +416,7 @@ class DisplayAnalyzer(Grapher):
 
             __doc__ = """Image representing """ + grapher_name
 
-        NewGrapher.__name__ = 'Display' + '.' + result_id
+        NewGrapher.__name__ = grapher_name
 
         return NewGrapher