Skip to content

Commit c703aaa

Browse files
committed
Tests: remove more unused imports
1 parent 57f7e5f commit c703aaa

18 files changed

+0
-29
lines changed

lib/matplotlib/tests/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import difflib
76
import os
87

98
from matplotlib import cbook
10-
from matplotlib.testing import setup
119

1210

1311
# Check that the test directories exist

lib/matplotlib/tests/test_agg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
unicode_literals)
33

44
import io
5-
from distutils.version import LooseVersion
65

76
import numpy as np
87
from numpy.testing import assert_array_almost_equal

lib/matplotlib/tests/test_animation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

6-
import os
75
import sys
8-
import tempfile
96

107
import numpy as np
118
import pytest

lib/matplotlib/tests/test_cbook.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from weakref import ref
66
import warnings
77

8-
import six
98

109
from datetime import datetime
1110

lib/matplotlib/tests/test_container.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54
import matplotlib.pyplot as plt
65

76

lib/matplotlib/tests/test_contour.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import pytest
1212
import warnings
1313

14-
import re
1514

1615

1716
def test_contour_shape_1d_valid():

lib/matplotlib/tests/test_dates.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from six.moves import map
55

66
import datetime
7-
import warnings
87
import tempfile
98
import pytest
109

lib/matplotlib/tests/test_mathtext.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import io
76
import re

lib/matplotlib/tests/test_mlab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020

2121
try:
22-
from mpl_toolkits.natgrid import _natgrid
2322
HAS_NATGRID = True
2423
except ImportError:
2524
HAS_NATGRID = False

lib/matplotlib/tests/test_png.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import glob
76
import os

lib/matplotlib/tests/test_preprocess_data.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ def test_docstring_addition():
312312
@_preprocess_data()
313313
def funcy(ax, *args, **kwargs):
314314
"""Funcy does nothing"""
315-
pass
316315

317316
assert re.search(r".*All positional and all keyword arguments\.",
318317
funcy.__doc__)
@@ -323,7 +322,6 @@ def funcy(ax, *args, **kwargs):
323322
@_preprocess_data(replace_all_args=True, replace_names=[])
324323
def funcy(ax, x, y, z, bar=None):
325324
"""Funcy does nothing"""
326-
pass
327325

328326
assert re.search(r".*All positional arguments\.",
329327
funcy.__doc__)
@@ -335,7 +333,6 @@ def funcy(ax, x, y, z, bar=None):
335333
@_preprocess_data(replace_all_args=True, replace_names=["bar"])
336334
def funcy(ax, x, y, z, bar=None):
337335
"""Funcy does nothing"""
338-
pass
339336

340337
assert re.search(r".*All positional arguments\.", funcy.__doc__)
341338
assert re.search(r".*All arguments with the following names: 'bar'\.",
@@ -346,7 +343,6 @@ def funcy(ax, x, y, z, bar=None):
346343
@_preprocess_data(replace_names=["x", "bar"])
347344
def funcy(ax, x, y, z, bar=None):
348345
"""Funcy does nothing"""
349-
pass
350346

351347
# lists can print in any order, so test for both x,bar and bar,x
352348
assert re.search(r".*All arguments with the following names: '.*', '.*'\.",

lib/matplotlib/tests/test_rcparams.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import six
55

6-
import io
76
import os
87
import warnings
98
from collections import OrderedDict
@@ -211,7 +210,6 @@ def test_legend_colors(color_type, param_dict, target):
211210
def test_Issue_1713():
212211
utf32_be = os.path.join(os.path.dirname(__file__),
213212
'test_utf32_be_rcparams.rc')
214-
import locale
215213
with mock.patch('locale.getpreferredencoding', return_value='UTF-32-BE'):
216214
rc = mpl.rc_params_from_file(utf32_be, True, False)
217215
assert rc.get('timezone') == 'UTC'

lib/matplotlib/tests/test_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import matplotlib.pyplot as plt
76
import numpy as np

lib/matplotlib/tests/test_text.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54
import warnings
65

76
import numpy as np
87
from numpy.testing import assert_almost_equal
98
import pytest
109

11-
from matplotlib.transforms import Bbox
1210
import matplotlib
1311
import matplotlib.pyplot as plt
1412
from matplotlib.testing.decorators import image_comparison
15-
from matplotlib.figure import Figure
16-
from matplotlib.text import Annotation, Text
17-
from matplotlib.backends.backend_agg import RendererAgg
1813

1914

2015
@image_comparison(baseline_images=['font_styles'])

lib/matplotlib/tests/test_tightlayout.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54
import warnings
65

76
import numpy as np

lib/matplotlib/tests/test_ttconv.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import matplotlib
76
from matplotlib.font_manager import FontProperties

lib/matplotlib/tests/test_type1font.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4-
import six
54

65
import matplotlib.type1font as t1f
76
import os.path

lib/matplotlib/tests/test_usetex.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import matplotlib
77
from matplotlib.testing.decorators import image_comparison
8-
from matplotlib.compat.subprocess import check_output
98
import matplotlib.pyplot as plt
109

1110

0 commit comments

Comments
 (0)