@@ -17,12 +17,23 @@ def test_version_format(self):
1717 Version ('1.2-dev0' )
1818 Version ('1.2-dev5' )
1919 Version ('1.2.3-dev2' )
20- with pytest .raises (ValueError ): Version (None )
21- with pytest .raises (ValueError ): Version ('' )
22- with pytest .raises (ValueError ): Version ('1' )
23- with pytest .raises (ValueError ): Version ('1.2a' )
24- with pytest .raises (ValueError ): Version ('a.b.c' )
25- with pytest .raises (ValueError ): Version ('1.2.3-dev' )
20+ with pytest .raises (ValueError ):
21+ Version (None )
22+
23+ with pytest .raises (ValueError ):
24+ Version ('' )
25+
26+ with pytest .raises (ValueError ):
27+ Version ('1' )
28+
29+ with pytest .raises (ValueError ):
30+ Version ('1.2a' )
31+
32+ with pytest .raises (ValueError ):
33+ Version ('a.b.c' )
34+
35+ with pytest .raises (ValueError ):
36+ Version ('1.2.3-dev' )
2637
2738 def test_comparing_versions (self ):
2839 assert Version ('1.2' ) < Version ('1.2.1' )
@@ -46,11 +57,26 @@ def test_version_validation(self):
4657 any (c .validate ('2.5' ) for c in conditions ),
4758 any (c .validate ('3.0' ) for c in conditions ),
4859 not any (c .validate ('3.1' ) for c in conditions )])
49- with pytest .raises (ValueError ): VersionValidator ('2.0.0..' )
50- with pytest .raises (ValueError ): VersionValidator ('..2.0.0' )
51- with pytest .raises (ValueError ): VersionValidator ('1.0.0..2.0.0..3.0.0' )
52- with pytest .raises (ValueError ): VersionValidator ('=>2.0.0' )
53- with pytest .raises (ValueError ): VersionValidator ('2.0.0>' )
54- with pytest .raises (ValueError ): VersionValidator ('2.0.0>1.0.0' )
55- with pytest .raises (ValueError ): VersionValidator ('=>' )
56- with pytest .raises (ValueError ): VersionValidator ('>1' )
60+ with pytest .raises (ValueError ):
61+ VersionValidator ('2.0.0..' )
62+
63+ with pytest .raises (ValueError ):
64+ VersionValidator ('..2.0.0' )
65+
66+ with pytest .raises (ValueError ):
67+ VersionValidator ('1.0.0..2.0.0..3.0.0' )
68+
69+ with pytest .raises (ValueError ):
70+ VersionValidator ('=>2.0.0' )
71+
72+ with pytest .raises (ValueError ):
73+ VersionValidator ('2.0.0>' )
74+
75+ with pytest .raises (ValueError ):
76+ VersionValidator ('2.0.0>1.0.0' )
77+
78+ with pytest .raises (ValueError ):
79+ VersionValidator ('=>' )
80+
81+ with pytest .raises (ValueError ):
82+ VersionValidator ('>1' )
0 commit comments