Beispiel #1
0
 def test_normal_expression(self):
     e = ">=2.10.1"
     p, v = version_parser(e)
     assert p == ">="
     assert v == "2.10.1"
Beispiel #2
0
 def test_no_punctuation(self):
     e = "2.10.1"
     p, v = version_parser(e)
     assert p is None
     assert v == "2.10.1"
Beispiel #3
0
 def test_expression_with_blank(self):
     e = " >=\t2.10.1"
     p, v = version_parser(e)
     assert p == ">="
     assert v == "2.10.1"
Beispiel #4
0
 def test_fault_revision(self):
     e = "==a.b.c"
     p, v = version_parser(e)
     assert p is None
     assert v is None
Beispiel #5
0
 def test_short_revision(self):
     e = ">=2"
     p, v = version_parser(e)
     assert p == ">="
     assert v == "2"
Beispiel #6
0
 def test_more_than(self):
     e = ">2.10.1"
     p, v = version_parser(e)
     assert p == ">"
     assert v == "2.10.1"
Beispiel #7
0
 def test_less_than(self):
     e = "<2.10.1"
     p, v = version_parser(e)
     assert p == "<"
     assert v == "2.10.1"
Beispiel #8
0
 def test_empty_expression(self):
     e = ""
     p, v = version_parser(e)
     assert p is None
     assert v is None
Beispiel #9
0
 def test_no_revision(self):
     e = ">="
     p, v = version_parser(e)
     assert p is None
     assert v is None