Esempio n. 1
0
def get_changed_files(dependencies, changes):
    changed_files = {}
    file_data = flip_dictionary(dependencies)
    for change, remove in changes.items():
        changed_files[change] = []
        for sublist in file_data[change].values():
            for checksum in sublist:
                if checksum not in remove:
                    changed_files[change].append(checksum)
    return changed_files
Esempio n. 2
0
def test_flip():
    node_data = {'X': {'a': [1, 2, 3], 'b': [3, 4, 5]}, 'Y': {'b': [3, 6, 7]}}
    files = flip_dictionary(node_data)
    assert files == {
        'a': {
            'X': [1, 2, 3]
        },
        'b': {
            'X': [3, 4, 5],
            'Y': [3, 6, 7]
        }
    }
Esempio n. 3
0
def test_flipp():
    node_data = {'X': {'a': [1, 2, 3], 'b': [3, 4, 5]}, 'Y': {'b': [3, 6, 7]}}
    files = flip_dictionary(node_data)
    assert files == {'a': {'X': [1, 2, 3]}, 'b': {'X': [3, 4, 5], 'Y': [3, 6, 7]}}