コード例 #1
0
ファイル: test_menu.py プロジェクト: CyberReboot/vent
def run_menu(test_input):
    """ Actually run the menu and process any input """
    # initialize tutorial
    paths = PathDirs()
    first_time = paths.ensure_file(paths.init_file)
    assert first_time[0] == True

    npyscreen.TEST_SETTINGS['TEST_INPUT'] = test_input

    A = VentApp()
    try:
        A.run(fork=False)
    except npyscreen.ExhaustedTestInput as e:
        pass
コード例 #2
0
def run_menu(test_input):
    """ Actually run the menu and process any input """
    # initialize tutorial
    paths = PathDirs()
    first_time = paths.ensure_file(paths.init_file)
    assert first_time[0] == True

    npyscreen.TEST_SETTINGS['TEST_INPUT'] = test_input

    A = VentApp()
    try:
        A.run(fork=False)
    except npyscreen.ExhaustedTestInput as e:
        pass
コード例 #3
0
ファイル: test_helpers_paths.py プロジェクト: swipswaps/vent
def test_ensure_file():
    """ Test the ensure_file function """
    paths = PathDirs()
    status = paths.ensure_file(paths.init_file)
    assert isinstance(status, tuple)
    assert status[0] == True