Skip to content

Commit 43b37f2

Browse files
committed
Put variable first in tests to improve readability, per @coderabbitai
1 parent 20a9f8d commit 43b37f2

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tests/test_date.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,27 +123,27 @@ def test_contains(self):
123123
def test_gt(self):
124124
ten_twelve = UnInt(10, 12)
125125
# compare with integer
126-
assert 13 > ten_twelve
127-
assert not 12 > ten_twelve
128-
assert not 9 > ten_twelve
126+
assert ten_twelve > 9
127+
assert not ten_twelve > 12
128+
assert not ten_twelve > 15
129129
# compare with unint
130-
assert UnInt(13, 23) > ten_twelve
131-
assert not UnInt(12, 24) > ten_twelve
132-
assert not UnInt(2, 4) > ten_twelve
130+
assert ten_twelve > UnInt(2, 4)
131+
assert not ten_twelve > UnInt(12, 24)
132+
assert not ten_twelve > UnInt(13, 23)
133133
# unsupported type
134134
with pytest.raises(TypeError):
135135
ten_twelve > "three"
136136

137137
def test_lt(self):
138138
ten_twelve = UnInt(10, 12)
139139
# compare with integer
140-
assert 9 < ten_twelve
141-
assert not 12 < ten_twelve
142-
assert not 13 < ten_twelve
140+
assert ten_twelve < 13
141+
assert not ten_twelve < 12
142+
assert not ten_twelve < 9
143143
# compare with unint
144-
assert UnInt(2, 4) < ten_twelve
145-
assert not UnInt(12, 24) < ten_twelve
146-
assert not UnInt(13, 23) < ten_twelve
144+
assert ten_twelve < UnInt(13, 23)
145+
assert not ten_twelve < UnInt(12, 24)
146+
assert not ten_twelve < UnInt(2, 4)
147147
# unsupported type
148148
with pytest.raises(TypeError):
149149
ten_twelve < "three"

0 commit comments

Comments
 (0)