コード例 #1
0
ファイル: test_patch.py プロジェクト: drewp/light9
def test():
    assert Patch.get_channel_name(1) == "frontLeft"
    assert Patch.get_channel_name("1") == "frontLeft"
    assert Patch.get_channel_name("frontLeft") == "frontLeft"
    
    assert Patch.get_dmx_channel(1) == 1
    assert Patch.get_dmx_channel("1") == 1
    assert Patch.get_dmx_channel("frontLeft") == 1
    
    assert Patch.get_channel_name("b1") == "frontLeft"
    assert Patch.get_dmx_channel("b1") == 1
    assert Patch.resolve_name("b1") == "frontLeft"
    assert Patch.resolve_name("frontLeft") == "frontLeft"

    assert Patch.get_channel_uri("frontLeft") == L9['theater/skyline/channel/frontLeft']
コード例 #2
0
ファイル: subterm.py プロジェクト: shakaran/light9
 def chan(name):
     return Submaster.Submaster(
         leveldict={Patch.get_dmx_channel(name) : 1.0},
         temporary=True)