def map_input(): cwd = npython.psel() npython.sel("/sys/servers/input") npython.set("beginmap") npython.set("map", "keyb0:shift.pressed", "dolly") npython.set("map", "keyb0:ctrl.pressed", "orbit") npython.set("map", "mouse0:btn0.pressed", "pan") npython.set("map", "mouse0:btn1.pressed", "orbit") npython.set("map", "mouse0:btn2.pressed", "dolly") npython.set("map", "keyb0:space.down", "script:orig()") npython.set("map", "keyb0:j.down", "script:janaview()") npython.set("map", "keyb0:esc.down", "script:npython.set('/sys/servers/console.toggle')") npython.set("endmap") npython.sel(cwd)
def testUpSelCommand(self): # Returns an opaque 'Nebula Object' result = npython.sel('..') # TODO: Test result object itself path = npython.psel() assert path == '/'
def testPselCommand(self): result = npython.psel() assert result == '/'