Exemple #1
0
def test_values_basedir_infinite_loop_2(fixtures_dir):
    start = os.getcwd()
    os.chdir(str(fixtures_dir))
    try:
        Values.from_files("./values_data")
    finally:
        os.chdir(start)
Exemple #2
0
def test_values(fixtures_dir):
    v = Values.from_files(fixtures_dir / 'values_data' / 'top' / 'bottom')
    expected = {
        'shared': 'set at bottom',
        'bottom_only': 'set at bottom',
        'top_only': 'set at top'
    }
    assert expected == v.values
Exemple #3
0
def test_values_inexistent_basedir(fixtures_dir):
    with pytest.raises(FileNotFoundError):
        Values.from_files(fixtures_dir / 'values_data' / 'top' /
                          'does-not-exist')
Exemple #4
0
def test_values_basedir_infinite_loop_1():
    Values.from_files(".")