Пример #1
0
def test_current_version_renamed():
    config = make_config("[bumpversion]\n" "current_version = 1.0.42")
    assert {"version": "1.0.42"} == config_dump(config)
Пример #2
0
def test_one_file_section():
    config = make_config("[bumpversion:files:./file_one.php]")
    assert {"files": ("./file_one.php",)} == config_dump(config)
Пример #3
0
def test_two_file_sections():
    config = make_config(
        "[bumpversion:files:./file_one.php]\n" "[bumpversion:files:./file_two.php]"
    )
    assert {"files": ("./file_one.php", "./file_two.php")} == config_dump(config)
Пример #4
0
def test_one_section_no_values():
    config = make_config("[bumpversion]")
    assert {} == config_dump(config)
Пример #5
0
def test_one_section_simple_value():
    config = make_config("[bumpversion]\n" "cheese = cheddar")
    assert {"cheese": "cheddar"} == config_dump(config)
Пример #6
0
def test_current_version_renamed():
    config = make_config('[bumpversion]\n' 'current_version = 1.0.42')
    assert {'version': '1.0.42'} == config_dump(config)
Пример #7
0
def test_empty_config():
    config = make_config("")
    assert {} == config_dump(config)
Пример #8
0
def test_two_file_sections():
    config = make_config('[bumpversion:files:./file_one.php]\n'
                         '[bumpversion:files:./file_two.php]')
    assert {
        'files': ('./file_one.php', './file_two.php')
    } == config_dump(config)
Пример #9
0
def test_one_file_section():
    config = make_config('[bumpversion:files:./file_one.php]')
    assert {'files': ('./file_one.php', )} == config_dump(config)
Пример #10
0
def test_one_section_simple_value():
    config = make_config('[bumpversion]\n' 'cheese = cheddar')
    assert {'cheese': 'cheddar'} == config_dump(config)
Пример #11
0
def test_one_section_no_values():
    config = make_config('[bumpversion]')
    assert {} == config_dump(config)
Пример #12
0
def test_empty_config():
    config = make_config('')
    assert {} == config_dump(config)