File: test_vcs_dependency.py

package info (click to toggle)
fades 9.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 9,448 kB
  • sloc: python: 3,924; makefile: 174; sh: 15
file content (29 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Check the VCSDependency."""
from fades import parsing


def test_string_representation():
    """This is particularly tested because it's the interface to be installed."""
    dep = parsing.VCSDependency("testurl")
    assert str(dep), "testurl"


def test_contains():
    """This is particularly tested because it's how fulfilling is tested."""
    dep1 = parsing.VCSDependency("testurl")
    dep2 = parsing.VCSDependency("testurl")
    dep3 = parsing.VCSDependency("otherurl")
    assert dep1 in dep2
    assert dep1 not in dep3


def test_equality():
    dep1 = parsing.VCSDependency("testurl")
    dep2 = parsing.VCSDependency("testurl")
    dep3 = parsing.VCSDependency("otherurl")
    assert dep1 == dep2
    assert not (dep1 == dep3)
    assert not (dep1 != dep2)
    assert dep1 != dep3
    assert not (dep1 == 123)
    assert not (dep1 == "testurl")