| 1 |
"""Check the VCSDependency.""" |
| 2 |
from fades import parsing |
| 3 |
|
| 4 |
|
| 5 |
def test_string_representation(): |
| 6 |
"""This is particularly tested because it's the interface to be installed.""" |
| 7 |
dep = parsing.VCSDependency("testurl") |
| 8 |
assert str(dep), "testurl" |
| 9 |
|
| 10 |
|
| 11 |
def test_contains(): |
| 12 |
"""This is particularly tested because it's how fulfilling is tested.""" |
| 13 |
dep1 = parsing.VCSDependency("testurl") |
| 14 |
assert dep1.specifier.contains(None) |
| 15 |
assert not dep1.specifier.contains("123") |
| 16 |
|
| 17 |
|
| 18 |
def test_equality(): |
| 19 |
dep1 = parsing.VCSDependency("testurl") |
| 20 |
dep2 = parsing.VCSDependency("testurl") |
| 21 |
dep3 = parsing.VCSDependency("otherurl") |
| 22 |
assert dep1 == dep2 |
| 23 |
assert not (dep1 == dep3) |
| 24 |
assert not (dep1 != dep2) |
| 25 |
assert dep1 != dep3 |
| 26 |
assert not (dep1 == 123) |
| 27 |
assert not (dep1 == "testurl") |