Exemple #1
0
def test_dependency_tracker_add_resources_with_deduplication():
    dep = ps.DependencyTracker('res1')
    dep.add('res1', 'res2', 'res1')
    assert sorted(dep) == ['res1', 'res2']
Exemple #2
0
def test_dependency_tracker_insertion_order():
    dep = ps.DependencyTracker('A', 'C')
    dep.add('D')
    dep.add('B')
    assert list(dep) == ['A', 'C', 'D', 'B']
Exemple #3
0
def test_dependency_tracker_retrieve_resources():
    dep = ps.DependencyTracker('res1', 'res2', 'res1')
    assert set(dep) == {'res1', 'res2'}
Exemple #4
0
def test_dependency_tracker_add_resources_wit_deduplication():
    dep = ps.DependencyTracker()
    dep.add('res1', 'res2', 'res1')
    assert set(dep) == {'res1', 'res2'}