

def test_nested_constraints_file(self, monkeypatch):
    line = '-c another_file'
    req = InstallRequirement.from_line('SomeProject')
    import pip.req.req_file

    def stub_parse_requirements(req_url, finder, comes_from, options, session, wheel_cache, constraint):
        return [(req, constraint)]
    parse_requirements_stub = stub(call=stub_parse_requirements)
    parse_requirements_stub.setattr(pip.req.req_file, 'parse_requirements', parse_requirements_stub.call)
    assert (list(process_line(line, 'filename', 1)) == [(req, True)])

dataset/ETHPy150Open pypa/pip/tests/unit/test_req_file.py TestProcessLine.test_nested_constraints_file/VarMisuse@72/105 `monkeypatch`->`parse_requirements_stub`