Changeset - 9bdc25ed5df5
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 20 months ago 2023-05-30 02:37:11
drewp@bigasterisk.com
fix tests
2 files changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
light9/effect/sequencer/eval_faders_test.py
Show inline comments
 
@@ -46,9 +46,9 @@ NOTE_GRAPH = PREFIXES + '''
 
            :fade1
 
                a :Fader;
 
                :effect effect:effect1;
 
                :setting :fs1;
 
                :value 0.6 .
 
                :setting :fs1 .
 
            :fs1 
 
                :value 0.6 ;
 
                :effectAttr :strength .
 

	
 
        '''
light9/effect/settings_test.py
Show inline comments
 
@@ -10,6 +10,9 @@ from light9.namespaces import DEV, L9
 
from light9.newtypes import DeviceAttr, DeviceUri, HexColor, VTUnion
 

	
 

	
 
def decimalLiteral(value):
 
    return Literal(value, datatype='http://www.w3.org/2001/XMLSchema#decimal')
 

	
 
class TestDeviceSettings(unittest.TestCase):
 

	
 
    def setUp(self):
 
@@ -47,11 +50,11 @@ class TestDeviceSettings(unittest.TestCa
 
                (L9['foo'], L9['setting'], L9['foo_set0'], ctx),
 
                (L9['foo_set0'], L9['device'], L9['light1'], ctx),
 
                (L9['foo_set0'], L9['deviceAttr'], L9['brightness'], ctx),
 
                (L9['foo_set0'], L9['value'], Literal(0.1), ctx),
 
                (L9['foo_set0'], L9['value'], decimalLiteral(0.1), ctx),
 
                (L9['foo'], L9['setting'], L9['foo_set1'], ctx),
 
                (L9['foo_set1'], L9['device'], L9['light1'], ctx),
 
                (L9['foo_set1'], L9['deviceAttr'], L9['speed'], ctx),
 
                (L9['foo_set1'], L9['scaledValue'], Literal(0.2), ctx),
 
                (L9['foo_set1'], L9['scaledValue'], decimalLiteral(0.2), ctx),
 
            ]))
 
        s = DeviceSettings.fromResource(self.graph, DeviceUri(L9['foo']))
 

	
0 comments (0 inline, 0 general)