From 936315cc8fc9901e97e25f921ed407964252953a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 31 Jan 2017 22:52:03 +0000 Subject: [PATCH 1/2] Fix broken backported test --- lib/matplotlib/__init__.py | 1 + lib/matplotlib/tests/test_marker.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 4cf18d50b980..82d0f5cc4580 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1502,6 +1502,7 @@ def tk_window_focus(): 'matplotlib.tests.test_image', 'matplotlib.tests.test_legend', 'matplotlib.tests.test_lines', + 'matplotlib.tests.test_marker', 'matplotlib.tests.test_mathtext', 'matplotlib.tests.test_mlab', 'matplotlib.tests.test_offsetbox', diff --git a/lib/matplotlib/tests/test_marker.py b/lib/matplotlib/tests/test_marker.py index e2290f029dcc..fbcc2242951f 100644 --- a/lib/matplotlib/tests/test_marker.py +++ b/lib/matplotlib/tests/test_marker.py @@ -1,8 +1,6 @@ import numpy as np from matplotlib import markers - -import pytest - +from nose.tools import assert_raises def test_markers_valid(): marker_style = markers.MarkerStyle() @@ -16,5 +14,5 @@ def test_markers_invalid(): marker_style = markers.MarkerStyle() mrk_array = np.array([[-0.5, 0, 1, 2, 3]]) # Checking this does fail. - with pytest.raises(ValueError): + with assert_raises(ValueError): marker_style.set_marker(mrk_array) From 6b2e116e77b1a69363c0beb96cce06a0f07f359f Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 31 Jan 2017 23:04:25 +0000 Subject: [PATCH 2/2] PEP8 --- lib/matplotlib/tests/test_marker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_marker.py b/lib/matplotlib/tests/test_marker.py index fbcc2242951f..42790f7b9d7c 100644 --- a/lib/matplotlib/tests/test_marker.py +++ b/lib/matplotlib/tests/test_marker.py @@ -2,6 +2,7 @@ from matplotlib import markers from nose.tools import assert_raises + def test_markers_valid(): marker_style = markers.MarkerStyle() mrk_array = np.array([[-0.5, 0], @@ -12,7 +13,7 @@ def test_markers_valid(): def test_markers_invalid(): marker_style = markers.MarkerStyle() - mrk_array = np.array([[-0.5, 0, 1, 2, 3]]) + mrk_array = np.array([[-0.5, 0, 1, 2, 3]]) # Checking this does fail. with assert_raises(ValueError): marker_style.set_marker(mrk_array)