Пример #1
0
def test_option_name_to_variable_name_conversions():
    test_cases = [('--ec2-user', 'ec2_user'), ('--provider', 'provider'),
                  ('--spark-git-commit', 'spark_git_commit')]

    for option_name, variable_name in test_cases:
        assert option_name_to_variable_name(option_name) == variable_name
        assert variable_name_to_option_name(variable_name) == option_name
        assert option_name == variable_name_to_option_name(
            option_name_to_variable_name(option_name))
        assert variable_name == option_name_to_variable_name(
            variable_name_to_option_name(variable_name))
Пример #2
0
def test_option_name_to_variable_name_conversions():
    test_cases = [
        ('--ec2-user', 'ec2_user'),
        ('--provider', 'provider'),
        ('--spark-git-commit', 'spark_git_commit')
    ]

    for option_name, variable_name in test_cases:
        assert option_name_to_variable_name(option_name) == variable_name
        assert variable_name_to_option_name(variable_name) == option_name
        assert option_name == variable_name_to_option_name(
            option_name_to_variable_name(option_name))
        assert variable_name == option_name_to_variable_name(
            variable_name_to_option_name(variable_name))