1
1
from datetime import date
2
2
3
- from pytest import mark
4
3
from infinity import inf
4
+ from pytest import mark
5
+
5
6
from intervals import DateInterval , FloatInterval , IntInterval
6
7
7
8
@@ -18,7 +19,7 @@ class TestComparisonOperators(object):
18
19
DateInterval ([date (2011 , 1 , 1 ), date (2011 , 1 , 1 )]),
19
20
False
20
21
),
21
- (IntInterval .from_string ('(,)' ) == None , False )
22
+ (IntInterval .from_string ('(,)' ) == None , False ) # noqa
22
23
))
23
24
def test_eq_operator (self , comparison , result ):
24
25
assert comparison is result
@@ -30,7 +31,7 @@ def test_eq_operator(self, comparison, result):
30
31
(IntInterval ([3 , 3 ]) != 3 , False ),
31
32
(IntInterval ([3 , 3 ]) != 5 , True ),
32
33
(IntInterval ([3 , 3 ]) != 'something' , True ),
33
- (IntInterval .from_string ('(,)' ) != None , True )
34
+ (IntInterval .from_string ('(,)' ) != None , True ) # noqa
34
35
))
35
36
def test_ne_operator (self , comparison , result ):
36
37
assert comparison is result
@@ -113,7 +114,12 @@ def test_contains_operator_for_non_inclusive_interval(self, value):
113
114
(IntInterval ((0 , 2 )), IntInterval ([0 , 1 ]), False ),
114
115
(IntInterval ((0 , 2 )), FloatInterval ((0 , 1 )), False ),
115
116
))
116
- def test_hash_operator_with_interval_attributes (self , interval1 , interval2 , expected ):
117
+ def test_hash_operator_with_interval_attributes (
118
+ self ,
119
+ interval1 ,
120
+ interval2 ,
121
+ expected
122
+ ):
117
123
actual = (interval1 .__hash__ () == interval2 .__hash__ ())
118
124
assert actual == expected
119
125
@@ -191,4 +197,3 @@ def test_and_operator_for_half_open_intervals_with_empty_results(
191
197
IntInterval .from_string (interval1 ) &
192
198
IntInterval .from_string (interval2 )
193
199
).empty == empty
194
-
0 commit comments