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