Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f5ff2b

Browse files
committed
remove unnecessary try block in test_RRuleLocator_dayrange
1 parent f2bb218 commit 7f5ff2b

1 file changed

Lines changed: 5 additions & 14 deletions

File tree

lib/matplotlib/tests/test_dates.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,11 @@ def test_RRuleLocator():
129129

130130

131131
def test_RRuleLocator_dayrange():
132-
ret = 0
133-
134-
try:
135-
loc = mdates.DayLocator()
136-
x1 = datetime.datetime(year=1, month=1, day=1)
137-
y1 = datetime.datetime(year=1, month=1, day=16)
138-
loc.tick_values(x1, y1)
139-
except OverflowError:
140-
# On success, no overflow error shall be thrown
141-
ret = 1
142-
except:
143-
pass
144-
145-
assert ret == 0
132+
loc = mdates.DayLocator()
133+
x1 = datetime.datetime(year=1, month=1, day=1)
134+
y1 = datetime.datetime(year=1, month=1, day=16)
135+
loc.tick_values(x1, y1)
136+
# On success, no overflow error shall be thrown
146137

147138

148139
@image_comparison(baseline_images=['DateFormatter_fractionalSeconds'],

0 commit comments

Comments
 (0)