예제 #1
0
 def test_run(self):
     from pecan.commands import CommandRunner
     runner = CommandRunner()
     self.assertRaises(
         RuntimeError,
         runner.run,
         ['serve', 'missing_file.py']
     )
예제 #2
0
 def test_commands(self):
     from pecan.commands import (
         ServeCommand, ShellCommand, CreateCommand, CommandRunner
     )
     runner = CommandRunner()
     assert runner.commands['serve'] == ServeCommand
     assert runner.commands['shell'] == ShellCommand
     assert runner.commands['create'] == CreateCommand
예제 #3
0
from pecan.commands import CommandRunner

runner = CommandRunner()
runner.run(['serve', 'config.py'])
예제 #4
0
파일: app.py 프로젝트: RaigaX9/ranger
def main():
    dir_name = os.path.dirname(__file__)
    drive, path_and_file = os.path.splitdrive(dir_name)
    path, filename = os.path.split(path_and_file)
    runner = CommandRunner()
    runner.run(['serve', path + '/config.py'])