11from __future__ import print_function
22from matplotlib .testing .compare import compare_images
33from matplotlib .testing .decorators import _image_directories
4+ import nose .tools
45import os
56import shutil
67
@@ -18,8 +19,6 @@ def image_comparison_expect_rms(im1, im2, tol, expect_rms):
1819 succeed if compare_images succeeds. Otherwise, the test will succeed if
1920 compare_images fails and returns an RMS error almost equal to this value.
2021 """
21- from nose .tools import assert_almost_equal
22- from nose .tools import assert_is_none , assert_is_not_none
2322 im1 = os .path .join (baseline_dir , im1 )
2423 im2_src = os .path .join (baseline_dir , im2 )
2524 im2 = os .path .join (result_dir , im2 )
@@ -30,10 +29,10 @@ def image_comparison_expect_rms(im1, im2, tol, expect_rms):
3029 results = compare_images (im1 , im2 , tol = tol , in_decorator = True )
3130
3231 if expect_rms is None :
33- assert_is_none (results )
32+ nose . tools . assert_is_none (results )
3433 else :
35- assert_is_not_none (results )
36- assert_almost_equal (expect_rms , results ['rms' ], places = 4 )
34+ nose . tools . assert_is_not_none (results )
35+ nose . tools . assert_almost_equal (expect_rms , results ['rms' ], places = 4 )
3736
3837def test_image_compare_basic ():
3938 """Test comparison of an image and the same image with minor differences."""
0 commit comments