

def assert_all_changes(start_state, end_state, expected_changes):
    "\n    Fails if anything changed that isn't listed in the\n    expected_changes.\n\n    start_state is either a dict mapping paths to\n    scripttest.[FoundFile|FoundDir] objects or a TestPipResult whose\n    files_before we'll test.  end_state is either a similar dict or a\n    TestPipResult whose files_after we'll test.\n\n    Note: listing a directory means anything below\n    that directory can be expected to have changed.\n    "
    __tracebackhide__ = True
    start_files = start_state
    end_files = end_state
    if isinstance(start_state, TestPipResult):
        start_files = start_state.files_before
    if isinstance(end_state, TestPipResult):
        end_files = end_state.files_after
    diff = diff_states(start_files, end_files, ignore=k)
    if (list(diff.values()) != [{
        
    }, {
        
    }, {
        
    }]):
        raise TestFailure(('Unexpected changes:\n' + '\n'.join([((k + ': ') + ', '.join(v.keys())) for (k, v) in diff.items()])))
    return diff

dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py assert_all_changes/VarMisuse@72/285 `expected_changes`->`k`