Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for some Requirement parser regressions. #622

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,42 @@ def test_repr(self):
req = Requirement("name")
assert repr(req) == "<Requirement('name')>"

def test_installer(self):
req = Requirement("installer")
assert repr(req) == "<Requirement('installer')>"

def test_notabene(self):
req = Requirement("notabene")
assert repr(req) == "<Requirement('notabene')>"

def test_andor(self):
req = Requirement("andor")
assert repr(req) == "<Requirement('andor')>"

def test_orator(self):
req = Requirement("orator")
assert repr(req) == "<Requirement('orator')>"

def test_extractor(self):
req = Requirement("extractor")
assert repr(req) == "<Requirement('extractor')>"

def test_a0(self):
req = Requirement("a0")
assert repr(req) == "<Requirement('a0')>"

def test_v1(self):
req = Requirement("v1")
assert repr(req) == "<Requirement('v1')>"

def test_trailing_space(self):
req = Requirement("a ")
assert repr(req) == "<Requirement('a')>"

def test_preceeding_space(self):
req = Requirement(" a")
assert repr(req) == "<Requirement('a')>"

def _assert_requirement(
self, req, name, url=None, extras=[], specifier="", marker=None
):
Expand Down