Skip to content

Commit

Permalink
Add test_{str,repr} to tests/unit/test_req.py
Browse files Browse the repository at this point in the history
Corrects my failure to include a test with
pypa#2495
  • Loading branch information
msabramo committed Mar 6, 2015
1 parent 5657013 commit 90a7edf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/unit/test_req.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ def test_installed_version_not_installed(self):
req = InstallRequirement.from_line('simple-0.1-py2.py3-none-any.whl')
assert req.installed_version is None

def test_str(self):
req = InstallRequirement.from_line('simple==0.1')
assert str(req) == 'simple==0.1'

def test_repr(self):
req = InstallRequirement.from_line('simple==0.1')
assert repr(req) == '<InstallRequirement object: simple==0.1>'

def test_invalid_wheel_requirement_raises(self):
with pytest.raises(InvalidWheelFilename):
InstallRequirement.from_line('invalid.whl')
Expand Down

0 comments on commit 90a7edf

Please sign in to comment.