From b48e40ae1bcd7a6dd343564732cd30e4a7fefd66 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Wed, 21 Oct 2015 22:46:12 +0700 Subject: [PATCH] Accidentally changed submodule code. --- .../mplexporter/tests/test_basic.py | 34 +++++-------------- .../mplexporter/tests/test_utils.py | 11 ++---- 2 files changed, 11 insertions(+), 34 deletions(-) diff --git a/plotly/matplotlylib/mplexporter/tests/test_basic.py b/plotly/matplotlylib/mplexporter/tests/test_basic.py index bc6dc65f20c..25099ae77c2 100644 --- a/plotly/matplotlylib/mplexporter/tests/test_basic.py +++ b/plotly/matplotlylib/mplexporter/tests/test_basic.py @@ -1,20 +1,14 @@ -# TODO: matplotlib-build-wip -from nose.plugins.attrib import attr -from plotly.tools import _matplotlylib_imported +from ..exporter import Exporter +from ..renderers import FakeRenderer, FullFakeRenderer -if _matplotlylib_imported: - from ..exporter import Exporter - from ..renderers import FakeRenderer, FullFakeRenderer +import matplotlib +matplotlib.use('Agg') +import matplotlib.pyplot as plt - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt +import numpy as np +from numpy.testing import assert_warns - import numpy as np - from numpy.testing import assert_warns - -@attr('matplotlib') def fake_renderer_output(fig, Renderer): renderer = Renderer() exporter = Exporter(renderer) @@ -22,13 +16,11 @@ def fake_renderer_output(fig, Renderer): return renderer.output -@attr('matplotlib') def _assert_output_equal(text1, text2): for line1, line2 in zip(text1.strip().split(), text2.strip().split()): assert line1 == line2 -@attr('matplotlib') def test_lines(): fig, ax = plt.subplots() ax.plot(range(20), '-k') @@ -52,7 +44,6 @@ def test_lines(): """) -@attr('matplotlib') def test_markers(): fig, ax = plt.subplots() ax.plot(range(2), 'ok') @@ -77,7 +68,6 @@ def test_markers(): """) -@attr('matplotlib') def test_path_collection(): fig, ax = plt.subplots() ax.scatter(range(3), range(3)) @@ -103,7 +93,6 @@ def test_path_collection(): """) -@attr('matplotlib') def test_text(): fig, ax = plt.subplots() ax.set_xlabel("my x label") @@ -124,7 +113,6 @@ def test_text(): """) -@attr('matplotlib') def test_path(): fig, ax = plt.subplots() ax.add_patch(plt.Circle((0, 0), 1)) @@ -141,7 +129,6 @@ def test_path(): """) -@attr('matplotlib') def test_multiaxes(): fig, ax = plt.subplots(2) ax[0].plot(range(4)) @@ -160,7 +147,6 @@ def test_multiaxes(): """) -@attr('matplotlib') def test_image(): np.random.seed(0) # image size depends on the seed fig, ax = plt.subplots() @@ -177,7 +163,6 @@ def test_image(): """) -@attr('matplotlib') def test_legend(): fig, ax = plt.subplots() ax.plot([1,2,3], label='label') @@ -193,8 +178,6 @@ def test_legend(): closing figure """) - -@attr('matplotlib') def test_legend_dots(): fig, ax = plt.subplots() ax.plot([1,2,3], label='label') @@ -217,9 +200,8 @@ def test_legend_dots(): closing figure """) - -@attr('matplotlib') def test_blended(): fig, ax = plt.subplots() ax.axvline(0) assert_warns(UserWarning, fake_renderer_output, fig, FakeRenderer) + diff --git a/plotly/matplotlylib/mplexporter/tests/test_utils.py b/plotly/matplotlylib/mplexporter/tests/test_utils.py index 9105f3cc0db..20b7aaf5ed1 100644 --- a/plotly/matplotlylib/mplexporter/tests/test_utils.py +++ b/plotly/matplotlylib/mplexporter/tests/test_utils.py @@ -1,13 +1,8 @@ -# TODO: matplotlib-build-wip -from nose.plugins.attrib import attr -from plotly.tools import _matplotlylib_imported +from numpy.testing import assert_allclose, assert_equal +import matplotlib.pyplot as plt +from .. import utils -if _matplotlylib_imported: - from numpy.testing import assert_allclose, assert_equal - import matplotlib.pyplot as plt - from .. import utils -@attr('matplotlib') def test_path_data(): circle = plt.Circle((0, 0), 1) vertices, codes = utils.SVG_path(circle.get_path())