

def test_add(self, tmpdir, monkeypatch):
    monkeypatch.setattr(pip.req.req_uninstall, 'is_local', mock_is_local)
    file_extant = os.path.normcase(os.path.join(tmpdir, 'foo'))
    file_nonexistant = os.path.normcase(os.path.join(tmpdir, 'nonexistant'))
    with open(file_extant, 'w'):
        pass
    ups = UninstallPathSet(dist=Mock())
    assert (ups.paths == set())
    ups.add(file_extant)
    assert (ups.paths == set([file_extant]))
    ups.add(file_nonexistant)
    assert (ups.paths == set([file_extant]))

dataset/ETHPy150Open pypa/pip/tests/unit/test_req_uninstall.py TestUninstallPathSet.test_add/original