Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_init_requirement():
req = utils.init_requirement("requests[security]")
assert req.name == "requests"
assert req.extras == ("security",)
req = utils.init_requirement("requests[security,insecurity]")
assert sorted(req.extras) == ["insecurity", "security"]
req = utils.init_requirement("requests[security,insecurity]>=2.19.1")
assert req.specifier
assert req.revision is None
assert req.vcs is None
assert req.path is None
def test_init_requirement():
req = utils.init_requirement("requests[security]")
assert req.name == "requests"
assert req.extras == ("security",)
req = utils.init_requirement("requests[security,insecurity]")
assert sorted(req.extras) == ["insecurity", "security"]
req = utils.init_requirement("requests[security,insecurity]>=2.19.1")
assert req.specifier
assert req.revision is None
assert req.vcs is None
assert req.path is None
def test_init_requirement():
req = utils.init_requirement("requests[security]")
assert req.name == "requests"
assert req.extras == ("security",)
req = utils.init_requirement("requests[security,insecurity]")
assert sorted(req.extras) == ["insecurity", "security"]
req = utils.init_requirement("requests[security,insecurity]>=2.19.1")
assert req.specifier
assert req.revision is None
assert req.vcs is None
assert req.path is None