Skip to content

Commit 63c52f8

Browse files
committed
STY/TST: pep8 fixes for test_dates
1 parent 34230a7 commit 63c52f8

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/matplotlib/tests/test_coding_standards.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
'*/matplotlib/tri/triinterpolate.py',
9797
'*/matplotlib/tests/test_axes.py',
9898
'*/matplotlib/tests/test_bbox_tight.py',
99-
'*/matplotlib/tests/test_dates.py',
10099
'*/matplotlib/tests/test_delaunay.py',
101100
'*/matplotlib/tests/test_dviread.py',
102101
'*/matplotlib/tests/test_image.py',

lib/matplotlib/tests/test_dates.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ def test_DateFormatter():
162162
def test_date_formatter_callable():
163163
scale = -11
164164
locator = mock.Mock(_get_unit=mock.Mock(return_value=scale))
165-
callable_formatting_function = lambda dates, _: \
166-
[dt.strftime('%d-%m//%Y') for dt in dates]
167-
165+
callable_formatting_function = (lambda dates, _:
166+
[dt.strftime('%d-%m//%Y') for dt in dates])
167+
168168
formatter = mdates.AutoDateFormatter(locator)
169169
formatter.scaled[-10] = callable_formatting_function
170170
assert_equal(formatter([datetime.datetime(2014, 12, 25)]),
@@ -223,7 +223,8 @@ def test_auto_date_locator():
223223
def _create_auto_date_locator(date1, date2):
224224
locator = mdates.AutoDateLocator()
225225
locator.create_dummy_axis()
226-
locator.set_view_interval(mdates.date2num(date1), mdates.date2num(date2))
226+
locator.set_view_interval(mdates.date2num(date1),
227+
mdates.date2num(date2))
227228
return locator
228229

229230
d1 = datetime.datetime(1990, 1, 1)
@@ -275,8 +276,10 @@ def _create_auto_date_locator(date1, date2):
275276
'1990-01-01 00:00:40+00:00']
276277
],
277278
[datetime.timedelta(microseconds=1500),
278-
['1989-12-31 23:59:59.999507+00:00', '1990-01-01 00:00:00+00:00',
279-
'1990-01-01 00:00:00.000502+00:00', '1990-01-01 00:00:00.001005+00:00',
279+
['1989-12-31 23:59:59.999507+00:00',
280+
'1990-01-01 00:00:00+00:00',
281+
'1990-01-01 00:00:00.000502+00:00',
282+
'1990-01-01 00:00:00.001005+00:00',
280283
'1990-01-01 00:00:00.001508+00:00']
281284
],
282285
)

0 commit comments

Comments
 (0)