Пример #1
0
def test_run_command_creation():  # pylint: disable=unused-argument
    """
    Tests command creation.
    """
    command = ['python train.py --alpha 0.5 --l1-ratio 0.1']
    command = kb._get_run_command(command)
    assert ['python', 'train.py', '--alpha', '0.5', '--l1-ratio',
            '0.1'] == command
Пример #2
0
def test_run_command_creation():  # pylint: disable=unused-argument
    """
    Tests command creation.
    """
    command = [
        'python train.py --alpha 0.5 --l1-ratio 0.1', '--comment \'foo bar\'',
        '--comment-bis "bar foo"'
    ]
    command = kb._get_run_command(command)
    assert [
        'python', 'train.py', '--alpha', '0.5', '--l1-ratio', '0.1',
        '--comment', "'foo bar'", '--comment-bis', "'bar foo'"
    ] == command
Пример #3
0
def test_run_command_creation():  # pylint: disable=unused-argument
    """
    Tests command creation.
    """
    command = [
        "python train.py --alpha 0.5 --l1-ratio 0.1",
        "--comment 'foo bar'",
        '--comment-bis "bar foo"',
    ]
    command = kb._get_run_command(command)
    assert [
        "python",
        "train.py",
        "--alpha",
        "0.5",
        "--l1-ratio",
        "0.1",
        "--comment",
        "'foo bar'",
        "--comment-bis",
        "'bar foo'",
    ] == command