<p dir="auto">Hello,<br>
i'm reporting here the errors produced by the test suite when running on debian amd64:</p>
<p dir="auto">python 2.7.15:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="=================================== FAILURES ===================================
_____________________________ test_log_scales[png] _____________________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13fab3e410&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_log_scales[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_log_scales[png]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_log_scales[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        &quot;&quot;&quot;
        Compare two &quot;image&quot; files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = &quot;./baseline/plot.png&quot;
        img2 = &quot;./output/plot.png&quot;
        compare_images( img1, img2, 0.001 ):
    
        &quot;&quot;&quot;
        if not os.path.exists(actual):
            raise Exception(&quot;Output image %s does not exist.&quot; % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception(&quot;Output image file %s is empty.&quot; % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
        rms = calculate_rms(expectedImage, actualImage)
    
        if rms &lt;= tol:
            return None
    
&gt;       save_diff_image(expected, actual, diff_image)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
output = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-failed-diff.png'

    def save_diff_image(expected, actual, output):
        expectedImage = _png.read_png(expected)
        actualImage = _png.read_png(actual)
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
        expectedImage = np.array(expectedImage).astype(float)
        actualImage = np.array(actualImage).astype(float)
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                &quot;Image sizes do not match expected size: {0} &quot;
&gt;               &quot;actual size {1}&quot;.format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:471: ImageComparisonFailure
__________________ test_bbox_inches_tight_suptile_legend[png] __________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13f9af5ed8&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        &quot;&quot;&quot;
        Compare two &quot;image&quot; files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = &quot;./baseline/plot.png&quot;
        img2 = &quot;./output/plot.png&quot;
        compare_images( img1, img2, 0.001 ):
    
        &quot;&quot;&quot;
        if not os.path.exists(actual):
            raise Exception(&quot;Output image %s does not exist.&quot; % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception(&quot;Output image file %s is empty.&quot; % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
&gt;       rms = calculate_rms(expectedImage, actualImage)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:439: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expectedImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)
actualImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)

    def calculate_rms(expectedImage, actualImage):
        &quot;Calculate the per-pixel errors, then compute the root mean square error.&quot;
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                &quot;Image sizes do not match expected size: {0} &quot;
&gt;               &quot;actual size {1}&quot;.format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:369: ImageComparisonFailure
__________________ test_nose_image_comparison[failing figure] __________________

self = &lt;CallInfo when='call' exception: assert '...' == 'FFF'
  - ...
  + FFF&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13fa2209b0&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
kwargs = {'baseline_images': ['simple'], 'extensions': ['png', 'png', 'png']}
errors = []
failures = [(&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exc...onFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close')]
dots = 'FFF'
monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch instance at 0x7f13fb26e128&gt;

    @pytest.mark.parametrize(
        'func, kwargs, errors, failures, dots',
        [
            (nosetest_empty, {'baseline_images': []}, [], [], ''),
            (nosetest_empty, {'baseline_images': ['foo']},
             [(AssertionError,
               'Test generated 0 images but there are 1 baseline images')],
             [],
             'E'),
            (nosetest_simple_figure,
             {'baseline_images': ['basn3p02'], 'extensions': ['png'],
              'remove_text': True},
             [],
             [(ImageComparisonFailure, 'Image sizes do not match expected size:')],
             'F'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple']},
             [],
             [(ImageComparisonFailure, 'images not close')] * 3,
             'FFF'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple'], 'remove_text': True},
             [],
             [],
             '...'),
            (nosetest_manual_text_removal,
             {'baseline_images': ['simple']},
             [],
             [],
             '...'),
        ],
        ids=[
            'empty',
            'extra baselines',
            'incorrect shape',
            'failing figure',
            'passing figure',
            'manual text removal',
        ])
    def test_nose_image_comparison(func, kwargs, errors, failures, dots,
                                   monkeypatch):
        nose = pytest.importorskip('nose')
        monkeypatch.setattr('matplotlib._called_from_pytest', False)
    
        class TestResultVerifier(nose.result.TextTestResult):
            def __init__(self, *args, **kwargs):
                super(TestResultVerifier, self).__init__(*args, **kwargs)
                self.error_count = 0
                self.failure_count = 0
    
            def addError(self, test, err):
                super(TestResultVerifier, self).addError(test, err)
    
                if self.error_count &lt; len(errors):
                    assert err[0] is errors[self.error_count][0]
                    assert errors[self.error_count][1] in str(err[1])
                else:
                    raise err[1]
                self.error_count += 1
    
            def addFailure(self, test, err):
                super(TestResultVerifier, self).addFailure(test, err)
    
                assert self.failure_count &lt; len(failures), err[1]
                assert err[0] is failures[self.failure_count][0]
                assert failures[self.failure_count][1] in str(err[1])
                self.failure_count += 1
    
        # Make sure that multiple extensions work, but don't require LaTeX or
        # Inkscape to do so.
        kwargs.setdefault('extensions', ['png', 'png', 'png'])
    
        func = image_comparison(**kwargs)(func)
        loader = nose.loader.TestLoader()
        suite = loader.loadTestsFromGenerator(
            func,
            'matplotlib.tests.test_compare_images')
        if six.PY2:
            output = io.BytesIO()
        else:
            output = io.StringIO()
        result = TestResultVerifier(stream=output, descriptions=True, verbosity=1)
        with warnings.catch_warnings():
            # Nose uses deprecated stuff; we don't care about it.
            warnings.simplefilter('ignore', DeprecationWarning)
            suite.run(result=result)
    
&gt;       assert output.getvalue() == dots
E       AssertionError: assert '...' == 'FFF'
E         - ...
E         + FFF

build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py:199: AssertionError
----------------------------- Captured stdout call -----------------------------
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
------------------------------ Captured log call -------------------------------
importer.py                143 DEBUG    Add path /build/matplotlib-2.2.2
suite.py                   418 DEBUG    Create suite for &lt;function generate at 0x7f13fb0b9398&gt;
suite.py                   420 DEBUG    tests &lt;function generate at 0x7f13fb0b9398&gt; context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   148 DEBUG    Context suite for &lt;function generate at 0x7f13fb0b9398&gt; (&lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;) (139723701656336)
suite.py                   481 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has context nosetest_simple_figure
suite.py                   435 DEBUG    get ancestry &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib', 'tests', 'test_compare_images']
util.py                    311 DEBUG    __import__ matplotlib.tests.test_compare_images
util.py                    320 DEBUG    resolve: ['tests', 'test_compare_images'], matplotlib.tests.test_compare_images, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests.test_compare_images
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib', 'tests']
util.py                    311 DEBUG    __import__ matplotlib.tests
util.py                    320 DEBUG    resolve: ['tests'], matplotlib.tests, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib']
util.py                    311 DEBUG    __import__ matplotlib
util.py                    320 DEBUG    resolve: [], matplotlib, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib
suite.py                   201 DEBUG    suite 139723701656336 (&lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt;) run called, tests: &lt;generator object _get_wrapped_tests at 0x7f13f9f8eaf0&gt;
suite.py                   269 DEBUG    suite 139723701656336 setUp called, tests: &lt;generator object _get_wrapped_tests at 0x7f13fa3ce4b0&gt;
suite.py                    79 DEBUG    tests in 139723701656336?
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
util.py                    470 DEBUG    call fixture &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;.setup
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;.setup
suite.py                   298 DEBUG    completed suite setup
suite.py                    94 DEBUG    precache is [matplotlib.tests.test_compare_images.nosetest_simple_figure(0, 'simple', 'png')]
suite.py                   323 DEBUG    context teardown
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;.teardown
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need teardown
suite.py                   346 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; already torn down
=============================== warnings summary ===============================
build/lib.linux-x86_64-2.7/matplotlib/tests/test_axes.py::test_fill_units[png]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/axes/_base.py:2504: RuntimeWarning: invalid value encountered in double_scalars
    delta = (x1t - x0t) * margin

build/lib.linux-x86_64-2.7/matplotlib/tests/test_axes.py::test_pyplot_axes
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Using pyplot.axes(ax) with ax an Axes argument is deprecated. Please use pyplot.sca(ax) instead.
    warnings.warn(message, mplDeprecation, stacklevel=1)

build/lib.linux-x86_64-2.7/matplotlib/tests/test_image.py::test_empty_imshow[make_norm2]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/colors.py:1133: RuntimeWarning: invalid value encountered in greater
    masked = np.abs(a) &gt; self.linthresh

build/lib.linux-x86_64-2.7/matplotlib/tests/test_image.py::test_full_invalid
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:405: UserWarning: Warning: converting a masked element to nan.
    dv = (np.float64(self.norm.vmax) -
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:406: UserWarning: Warning: converting a masked element to nan.
    np.float64(self.norm.vmin))
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:412: UserWarning: Warning: converting a masked element to nan.
    a_min = np.float64(newmin)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:417: UserWarning: Warning: converting a masked element to nan.
    a_max = np.float64(newmax)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/colors.py:916: UserWarning: Warning: converting a masked element to nan.
    dtype = np.min_scalar_type(value)
  /usr/lib/python2.7/dist-packages/numpy/ma/core.py:716: UserWarning: Warning: converting a masked element to nan.
    data = np.array(a, copy=False, subok=subok)

-- Docs: http://doc.pytest.org/en/latest/warnings.html"><pre class="notranslate"><code class="notranslate">=================================== FAILURES ===================================
_____________________________ test_log_scales[png] _____________________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13fab3e410&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_log_scales[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_log_scales[png]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_log_scales[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        """
        Compare two "image" files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = "./baseline/plot.png"
        img2 = "./output/plot.png"
        compare_images( img1, img2, 0.001 ):
    
        """
        if not os.path.exists(actual):
            raise Exception("Output image %s does not exist." % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception("Output image file %s is empty." % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
        rms = calculate_rms(expectedImage, actualImage)
    
        if rms &lt;= tol:
            return None
    
&gt;       save_diff_image(expected, actual, diff_image)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
output = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-failed-diff.png'

    def save_diff_image(expected, actual, output):
        expectedImage = _png.read_png(expected)
        actualImage = _png.read_png(actual)
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
        expectedImage = np.array(expectedImage).astype(float)
        actualImage = np.array(actualImage).astype(float)
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                "Image sizes do not match expected size: {0} "
&gt;               "actual size {1}".format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:471: ImageComparisonFailure
__________________ test_bbox_inches_tight_suptile_legend[png] __________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13f9af5ed8&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        """
        Compare two "image" files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = "./baseline/plot.png"
        img2 = "./output/plot.png"
        compare_images( img1, img2, 0.001 ):
    
        """
        if not os.path.exists(actual):
            raise Exception("Output image %s does not exist." % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception("Output image file %s is empty." % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
&gt;       rms = calculate_rms(expectedImage, actualImage)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:439: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expectedImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)
actualImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)

    def calculate_rms(expectedImage, actualImage):
        "Calculate the per-pixel errors, then compute the root mean square error."
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                "Image sizes do not match expected size: {0} "
&gt;               "actual size {1}".format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)

build/lib.linux-x86_64-2.7/matplotlib/testing/compare.py:369: ImageComparisonFailure
__________________ test_nose_image_comparison[failing figure] __________________

self = &lt;CallInfo when='call' exception: assert '...' == 'FFF'
  - ...
  + FFF&gt;
func = &lt;function &lt;lambda&gt; at 0x7f13fa2209b0&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a075a10&gt;, &lt;pluggy.HookImpl object at 0x7f1409fb5ad0&gt;, &lt;pluggy.HookImpl object at 0x7f1409fc27d0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f140b120f50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f140a086090&gt;, &lt;pluggy.HookImpl object at 0x7f140a028090&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
kwargs = {'baseline_images': ['simple'], 'extensions': ['png', 'png', 'png']}
errors = []
failures = [(&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exc...onFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close')]
dots = 'FFF'
monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch instance at 0x7f13fb26e128&gt;

    @pytest.mark.parametrize(
        'func, kwargs, errors, failures, dots',
        [
            (nosetest_empty, {'baseline_images': []}, [], [], ''),
            (nosetest_empty, {'baseline_images': ['foo']},
             [(AssertionError,
               'Test generated 0 images but there are 1 baseline images')],
             [],
             'E'),
            (nosetest_simple_figure,
             {'baseline_images': ['basn3p02'], 'extensions': ['png'],
              'remove_text': True},
             [],
             [(ImageComparisonFailure, 'Image sizes do not match expected size:')],
             'F'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple']},
             [],
             [(ImageComparisonFailure, 'images not close')] * 3,
             'FFF'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple'], 'remove_text': True},
             [],
             [],
             '...'),
            (nosetest_manual_text_removal,
             {'baseline_images': ['simple']},
             [],
             [],
             '...'),
        ],
        ids=[
            'empty',
            'extra baselines',
            'incorrect shape',
            'failing figure',
            'passing figure',
            'manual text removal',
        ])
    def test_nose_image_comparison(func, kwargs, errors, failures, dots,
                                   monkeypatch):
        nose = pytest.importorskip('nose')
        monkeypatch.setattr('matplotlib._called_from_pytest', False)
    
        class TestResultVerifier(nose.result.TextTestResult):
            def __init__(self, *args, **kwargs):
                super(TestResultVerifier, self).__init__(*args, **kwargs)
                self.error_count = 0
                self.failure_count = 0
    
            def addError(self, test, err):
                super(TestResultVerifier, self).addError(test, err)
    
                if self.error_count &lt; len(errors):
                    assert err[0] is errors[self.error_count][0]
                    assert errors[self.error_count][1] in str(err[1])
                else:
                    raise err[1]
                self.error_count += 1
    
            def addFailure(self, test, err):
                super(TestResultVerifier, self).addFailure(test, err)
    
                assert self.failure_count &lt; len(failures), err[1]
                assert err[0] is failures[self.failure_count][0]
                assert failures[self.failure_count][1] in str(err[1])
                self.failure_count += 1
    
        # Make sure that multiple extensions work, but don't require LaTeX or
        # Inkscape to do so.
        kwargs.setdefault('extensions', ['png', 'png', 'png'])
    
        func = image_comparison(**kwargs)(func)
        loader = nose.loader.TestLoader()
        suite = loader.loadTestsFromGenerator(
            func,
            'matplotlib.tests.test_compare_images')
        if six.PY2:
            output = io.BytesIO()
        else:
            output = io.StringIO()
        result = TestResultVerifier(stream=output, descriptions=True, verbosity=1)
        with warnings.catch_warnings():
            # Nose uses deprecated stuff; we don't care about it.
            warnings.simplefilter('ignore', DeprecationWarning)
            suite.run(result=result)
    
&gt;       assert output.getvalue() == dots
E       AssertionError: assert '...' == 'FFF'
E         - ...
E         + FFF

build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py:199: AssertionError
----------------------------- Captured stdout call -----------------------------
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
------------------------------ Captured log call -------------------------------
importer.py                143 DEBUG    Add path /build/matplotlib-2.2.2
suite.py                   418 DEBUG    Create suite for &lt;function generate at 0x7f13fb0b9398&gt;
suite.py                   420 DEBUG    tests &lt;function generate at 0x7f13fb0b9398&gt; context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   148 DEBUG    Context suite for &lt;function generate at 0x7f13fb0b9398&gt; (&lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;) (139723701656336)
suite.py                   481 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has context nosetest_simple_figure
suite.py                   435 DEBUG    get ancestry &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib', 'tests', 'test_compare_images']
util.py                    311 DEBUG    __import__ matplotlib.tests.test_compare_images
util.py                    320 DEBUG    resolve: ['tests', 'test_compare_images'], matplotlib.tests.test_compare_images, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests.test_compare_images
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib', 'tests']
util.py                    311 DEBUG    __import__ matplotlib.tests
util.py                    320 DEBUG    resolve: ['tests'], matplotlib.tests, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; ancestors ['matplotlib']
util.py                    311 DEBUG    __import__ matplotlib
util.py                    320 DEBUG    resolve: [], matplotlib, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib
suite.py                   201 DEBUG    suite 139723701656336 (&lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt;) run called, tests: &lt;generator object _get_wrapped_tests at 0x7f13f9f8eaf0&gt;
suite.py                   269 DEBUG    suite 139723701656336 setUp called, tests: &lt;generator object _get_wrapped_tests at 0x7f13fa3ce4b0&gt;
suite.py                    79 DEBUG    tests in 139723701656336?
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
util.py                    470 DEBUG    call fixture &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;.setup
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;.setup
suite.py                   298 DEBUG    completed suite setup
suite.py                    94 DEBUG    precache is [matplotlib.tests.test_compare_images.nosetest_simple_figure(0, 'simple', 'png')]
suite.py                   323 DEBUG    context teardown
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt;.teardown
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/tests/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; may need teardown
suite.py                   346 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f13fa4bc938&gt; already torn down
=============================== warnings summary ===============================
build/lib.linux-x86_64-2.7/matplotlib/tests/test_axes.py::test_fill_units[png]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/axes/_base.py:2504: RuntimeWarning: invalid value encountered in double_scalars
    delta = (x1t - x0t) * margin

build/lib.linux-x86_64-2.7/matplotlib/tests/test_axes.py::test_pyplot_axes
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Using pyplot.axes(ax) with ax an Axes argument is deprecated. Please use pyplot.sca(ax) instead.
    warnings.warn(message, mplDeprecation, stacklevel=1)

build/lib.linux-x86_64-2.7/matplotlib/tests/test_image.py::test_empty_imshow[make_norm2]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/colors.py:1133: RuntimeWarning: invalid value encountered in greater
    masked = np.abs(a) &gt; self.linthresh

build/lib.linux-x86_64-2.7/matplotlib/tests/test_image.py::test_full_invalid
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:405: UserWarning: Warning: converting a masked element to nan.
    dv = (np.float64(self.norm.vmax) -
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:406: UserWarning: Warning: converting a masked element to nan.
    np.float64(self.norm.vmin))
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:412: UserWarning: Warning: converting a masked element to nan.
    a_min = np.float64(newmin)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/image.py:417: UserWarning: Warning: converting a masked element to nan.
    a_max = np.float64(newmax)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7/matplotlib/colors.py:916: UserWarning: Warning: converting a masked element to nan.
    dtype = np.min_scalar_type(value)
  /usr/lib/python2.7/dist-packages/numpy/ma/core.py:716: UserWarning: Warning: converting a masked element to nan.
    data = np.array(a, copy=False, subok=subok)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
</code></pre></div>
<p dir="auto">python 2.7.15 debug flavor:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="=================================== FAILURES ===================================
_______________ test_save_animation_smoketest[pillow-movie.gif] ________________

self = &lt;CallInfo when='call' exception: list index out of range&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd42b1e28&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tmpdir = local('/tmp/pytest-of-pbuilder/pytest-1/test_save_animation_smoketest_6')
writer = 'pillow', output = 'movie.gif'

    @pytest.mark.parametrize('writer, output', WRITER_OUTPUT)
    def test_save_animation_smoketest(tmpdir, writer, output):
        try:
            # for ImageMagick the rcparams must be patched to account for
            # 'convert' being a built in MS tool, not the imagemagick
            # tool.
            writer._init_from_registry()
        except AttributeError:
            pass
        if not animation.writers.is_available(writer):
            pytest.skip(&quot;writer '%s' not available on this system&quot; % writer)
        fig, ax = plt.subplots()
        line, = ax.plot([], [])
    
        ax.set_xlim(0, 10)
        ax.set_ylim(-1, 1)
    
        dpi = None
        codec = None
        if writer == 'ffmpeg':
            # Issue #8253
            fig.set_size_inches((10.85, 9.21))
            dpi = 100.
            codec = 'h264'
    
        def init():
            line.set_data([], [])
            return line,
    
        def animate(i):
            x = np.linspace(0, 10, 100)
            y = np.sin(x + i)
            line.set_data(x, y)
            return line,
    
        # Use temporary directory for the file-based writers, which produce a file
        # per frame with known names.
        with tmpdir.as_cwd():
            anim = animation.FuncAnimation(fig, animate, init_func=init, frames=5)
            try:
                anim.save(output, fps=30, writer=writer, bitrate=500, dpi=dpi,
&gt;                         codec=codec)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_animation.py:174: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.FuncAnimation object at 0x7f4fcf6047d0&gt;
filename = 'movie.gif'
writer = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;, fps = 30
dpi = 100.0, codec = 'mpeg4', bitrate = 500, extra_args = None, metadata = None
extra_anim = None, savefig_kwargs = {}

    def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
             bitrate=None, extra_args=None, metadata=None, extra_anim=None,
             savefig_kwargs=None):
        '''Saves a movie file by drawing every frame.
    
            Parameters
            ----------
    
            filename : str
                The output filename, e.g., :file:`mymovie.mp4`.
    
            writer : :class:`MovieWriter` or str, optional
                A `MovieWriter` instance to use or a key that identifies a
                class to use, such as 'ffmpeg'. If ``None``, defaults to
                :rc:`animation.writer`.
    
            fps : number, optional
               Frames per second in the movie. Defaults to ``None``, which will use
               the animation's specified interval to set the frames per second.
    
            dpi : number, optional
               Controls the dots per inch for the movie frames.  This combined with
               the figure's size in inches controls the size of the movie.  If
               ``None``, defaults to :rc:`savefig.dpi`.
    
            codec : str, optional
               The video codec to be used. Not all codecs are supported
               by a given :class:`MovieWriter`. If ``None``, default to
               :rc:`animation.codec`.
    
            bitrate : number, optional
               Specifies the number of bits used per second in the compressed
               movie, in kilobits per second. A higher number means a higher
               quality movie, but at the cost of increased file size. If ``None``,
               defaults to :rc:`animation.bitrate`.
    
            extra_args : list, optional
               List of extra string arguments to be passed to the underlying movie
               utility. If ``None``, defaults to :rc:`animation.extra_args`.
    
            metadata : Dict[str, str], optional
               Dictionary of keys and values for metadata to include in
               the output file. Some keys that may be of use include:
               title, artist, genre, subject, copyright, srcform, comment.
    
            extra_anim : list, optional
               Additional `Animation` objects that should be included
               in the saved movie file. These need to be from the same
               `matplotlib.figure.Figure` instance. Also, animation frames will
               just be simply combined, so there should be a 1:1 correspondence
               between the frames from the different animations.
    
            savefig_kwargs : dict, optional
               Is a dictionary containing keyword arguments to be passed
               on to the `savefig` command which is called repeatedly to
               save the individual frames.
    
            Notes
            -----
            fps, codec, bitrate, extra_args, metadata are used to
            construct a :class:`MovieWriter` instance and can only be
            passed if `writer` is a string.  If they are passed as
            non-`None` and ``writer`` is a :class:`MovieWriter`, a
            `RuntimeError` will be raised.
    
            '''
        # If the writer is None, use the rc param to find the name of the one
        # to use
        if writer is None:
            writer = rcParams['animation.writer']
        elif (not isinstance(writer, six.string_types) and
                any(arg is not None
                    for arg in (fps, codec, bitrate, extra_args, metadata))):
            raise RuntimeError('Passing in values for arguments '
                               'fps, codec, bitrate, extra_args, or metadata '
                               'is not supported when writer is an existing '
                               'MovieWriter instance. These should instead be '
                               'passed as arguments when creating the '
                               'MovieWriter instance.')
    
        if savefig_kwargs is None:
            savefig_kwargs = {}
    
        # Need to disconnect the first draw callback, since we'll be doing
        # draws. Otherwise, we'll end up starting the animation.
        if self._first_draw_id is not None:
            self._fig.canvas.mpl_disconnect(self._first_draw_id)
            reconnect_first_draw = True
        else:
            reconnect_first_draw = False
    
        if fps is None and hasattr(self, '_interval'):
            # Convert interval in ms to frames per second
            fps = 1000. / self._interval
    
        # Re-use the savefig DPI for ours if none is given
        if dpi is None:
            dpi = rcParams['savefig.dpi']
        if dpi == 'figure':
            dpi = self._fig.dpi
    
        if codec is None:
            codec = rcParams['animation.codec']
    
        if bitrate is None:
            bitrate = rcParams['animation.bitrate']
    
        all_anim = [self]
        if extra_anim is not None:
            all_anim.extend(anim
                            for anim
                            in extra_anim if anim._fig is self._fig)
    
        # If we have the name of a writer, instantiate an instance of the
        # registered class.
        if isinstance(writer, six.string_types):
            if writer in writers.avail:
                writer = writers[writer](fps, codec, bitrate,
                                         extra_args=extra_args,
                                         metadata=metadata)
            else:
                _log.warning(&quot;MovieWriter %s unavailable.&quot;, writer)
    
                try:
                    writer = writers[writers.list()[0]](fps, codec, bitrate,
                                                        extra_args=extra_args,
                                                        metadata=metadata)
                except IndexError:
                    raise ValueError(&quot;Cannot save animation: no writers are &quot;
                                     &quot;available. Please install ffmpeg to &quot;
                                     &quot;save animations.&quot;)
        _log.info('Animation.save using %s', type(writer))
    
        if 'bbox_inches' in savefig_kwargs:
            _log.warning(&quot;Warning: discarding the 'bbox_inches' argument in &quot;
                         &quot;'savefig_kwargs' as it may cause frame size &quot;
                         &quot;to vary, which is inappropriate for animation.&quot;)
            savefig_kwargs.pop('bbox_inches')
    
        # Create a new sequence of frames for saved data. This is different
        # from new_frame_seq() to give the ability to save 'live' generated
        # frame information to be saved later.
        # TODO: Right now, after closing the figure, saving a movie won't work
        # since GUI widgets are gone. Either need to remove extra code to
        # allow for this non-existent use case or find a way to make it work.
        with rc_context():
            if rcParams['savefig.bbox'] == 'tight':
                _log.info(&quot;Disabling savefig.bbox = 'tight', as it may cause &quot;
                          &quot;frame size to vary, which is inappropriate for &quot;
                          &quot;animation.&quot;)
                rcParams['savefig.bbox'] = None
            with writer.saving(self._fig, filename, dpi):
                for anim in all_anim:
                    # Clear the initial frame
                    anim._init_draw()
                for data in zip(*[a.new_saved_frame_seq() for a in all_anim]):
                    for anim, d in zip(all_anim, data):
                        # TODO: See if turning off blit is really necessary
                        anim._draw_next_frame(d, blit=False)
&gt;                   writer.grab_frame(**savefig_kwargs)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:1200: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;contextlib.GeneratorContextManager object at 0x7f4fcf604ca0&gt;
type = &lt;type 'exceptions.ImportError'&gt;
value = ImportError('/usr/lib/python2.7/dist-packages/PIL/_imaging.x86_64-linux-gnu.so: undefined symbol: Py_InitModule4_64',)
traceback = &lt;traceback object at 0x7f4fcf4b8588&gt;

    def __exit__(self, type, value, traceback):
        if type is None:
            try:
                self.gen.next()
            except StopIteration:
                return
            else:
                raise RuntimeError(&quot;generator didn't stop&quot;)
        else:
            if value is None:
                # Need to force instantiation so we can reliably
                # tell if we get the same exception back
                value = type()
            try:
&gt;               self.gen.throw(type, value, traceback)

/usr/lib/python2.7/contextlib.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;
fig = &lt;Figure size 640x480 with 1 Axes&gt;, outfile = 'movie.gif', dpi = 100.0
args = (), kwargs = {}

    @contextlib.contextmanager
    def saving(self, fig, outfile, dpi, *args, **kwargs):
        '''
            Context manager to facilitate writing the movie file.
    
            ``*args, **kw`` are any parameters that should be passed to `setup`.
            '''
        # This particular sequence is what contextlib.contextmanager wants
        self.setup(fig, outfile, dpi, *args, **kwargs)
        try:
            yield self
        finally:
&gt;           self.finish()

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:241: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;

    def finish(self):
&gt;       self._frames[0].save(
            self._outfile, save_all=True, append_images=self._frames[1:],
            duration=int(1000 / self.fps))
E       IndexError: list index out of range

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:610: IndexError
------------------------------ Captured log call -------------------------------
animation.py              1172 INFO     Animation.save using &lt;class 'matplotlib.animation.PillowWriter'&gt;
_____________________________ test_log_scales[png] _____________________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd446c258&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_log_scales[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_log_scales[png]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_log_scales[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        &quot;&quot;&quot;
        Compare two &quot;image&quot; files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = &quot;./baseline/plot.png&quot;
        img2 = &quot;./output/plot.png&quot;
        compare_images( img1, img2, 0.001 ):
    
        &quot;&quot;&quot;
        if not os.path.exists(actual):
            raise Exception(&quot;Output image %s does not exist.&quot; % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception(&quot;Output image file %s is empty.&quot; % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
        rms = calculate_rms(expectedImage, actualImage)
    
        if rms &lt;= tol:
            return None
    
&gt;       save_diff_image(expected, actual, diff_image)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
output = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-failed-diff.png'

    def save_diff_image(expected, actual, output):
        expectedImage = _png.read_png(expected)
        actualImage = _png.read_png(actual)
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
        expectedImage = np.array(expectedImage).astype(float)
        actualImage = np.array(actualImage).astype(float)
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                &quot;Image sizes do not match expected size: {0} &quot;
&gt;               &quot;actual size {1}&quot;.format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:471: ImageComparisonFailure
__________________ test_bbox_inches_tight_suptile_legend[png] __________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd3bdf1b0&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        &quot;&quot;&quot;
        Compare two &quot;image&quot; files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = &quot;./baseline/plot.png&quot;
        img2 = &quot;./output/plot.png&quot;
        compare_images( img1, img2, 0.001 ):
    
        &quot;&quot;&quot;
        if not os.path.exists(actual):
            raise Exception(&quot;Output image %s does not exist.&quot; % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception(&quot;Output image file %s is empty.&quot; % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
&gt;       rms = calculate_rms(expectedImage, actualImage)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:439: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expectedImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)
actualImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)

    def calculate_rms(expectedImage, actualImage):
        &quot;Calculate the per-pixel errors, then compute the root mean square error.&quot;
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                &quot;Image sizes do not match expected size: {0} &quot;
&gt;               &quot;actual size {1}&quot;.format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:369: ImageComparisonFailure
__________________ test_nose_image_comparison[failing figure] __________________

self = &lt;CallInfo when='call' exception: assert '...' == 'FFF'
  - ...
  + FFF&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd45b0a38&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of &quot;setup&quot;, &quot;call&quot;,
        #: &quot;teardown&quot;, &quot;memocollect&quot;
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def runtest(self):
        &quot;&quot;&quot; execute the underlying test function. &quot;&quot;&quot;
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError(&quot;hook calling supports only keyword arguments&quot;)
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    &quot;Argument(s) {} which are declared in the hookspec &quot;
                    &quot;can not be found in this hook call&quot;
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
kwargs = {'baseline_images': ['simple'], 'extensions': ['png', 'png', 'png']}
errors = []
failures = [(&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exc...onFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close')]
dots = 'FFF'
monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch instance at 0x7f4fd5651420&gt;

    @pytest.mark.parametrize(
        'func, kwargs, errors, failures, dots',
        [
            (nosetest_empty, {'baseline_images': []}, [], [], ''),
            (nosetest_empty, {'baseline_images': ['foo']},
             [(AssertionError,
               'Test generated 0 images but there are 1 baseline images')],
             [],
             'E'),
            (nosetest_simple_figure,
             {'baseline_images': ['basn3p02'], 'extensions': ['png'],
              'remove_text': True},
             [],
             [(ImageComparisonFailure, 'Image sizes do not match expected size:')],
             'F'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple']},
             [],
             [(ImageComparisonFailure, 'images not close')] * 3,
             'FFF'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple'], 'remove_text': True},
             [],
             [],
             '...'),
            (nosetest_manual_text_removal,
             {'baseline_images': ['simple']},
             [],
             [],
             '...'),
        ],
        ids=[
            'empty',
            'extra baselines',
            'incorrect shape',
            'failing figure',
            'passing figure',
            'manual text removal',
        ])
    def test_nose_image_comparison(func, kwargs, errors, failures, dots,
                                   monkeypatch):
        nose = pytest.importorskip('nose')
        monkeypatch.setattr('matplotlib._called_from_pytest', False)
    
        class TestResultVerifier(nose.result.TextTestResult):
            def __init__(self, *args, **kwargs):
                super(TestResultVerifier, self).__init__(*args, **kwargs)
                self.error_count = 0
                self.failure_count = 0
    
            def addError(self, test, err):
                super(TestResultVerifier, self).addError(test, err)
    
                if self.error_count &lt; len(errors):
                    assert err[0] is errors[self.error_count][0]
                    assert errors[self.error_count][1] in str(err[1])
                else:
                    raise err[1]
                self.error_count += 1
    
            def addFailure(self, test, err):
                super(TestResultVerifier, self).addFailure(test, err)
    
                assert self.failure_count &lt; len(failures), err[1]
                assert err[0] is failures[self.failure_count][0]
                assert failures[self.failure_count][1] in str(err[1])
                self.failure_count += 1
    
        # Make sure that multiple extensions work, but don't require LaTeX or
        # Inkscape to do so.
        kwargs.setdefault('extensions', ['png', 'png', 'png'])
    
        func = image_comparison(**kwargs)(func)
        loader = nose.loader.TestLoader()
        suite = loader.loadTestsFromGenerator(
            func,
            'matplotlib.tests.test_compare_images')
        if six.PY2:
            output = io.BytesIO()
        else:
            output = io.StringIO()
        result = TestResultVerifier(stream=output, descriptions=True, verbosity=1)
        with warnings.catch_warnings():
            # Nose uses deprecated stuff; we don't care about it.
            warnings.simplefilter('ignore', DeprecationWarning)
            suite.run(result=result)
    
&gt;       assert output.getvalue() == dots
E       AssertionError: assert '...' == 'FFF'
E         - ...
E         + FFF

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py:199: AssertionError
----------------------------- Captured stdout call -----------------------------
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
------------------------------ Captured log call -------------------------------
importer.py                143 DEBUG    Add path /build/matplotlib-2.2.2
suite.py                   418 DEBUG    Create suite for &lt;function generate at 0x7f4fd49e3d80&gt;
suite.py                   420 DEBUG    tests &lt;function generate at 0x7f4fd49e3d80&gt; context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   148 DEBUG    Context suite for &lt;function generate at 0x7f4fd49e3d80&gt; (&lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;) (139980834420128)
suite.py                   481 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has context nosetest_simple_figure
suite.py                   435 DEBUG    get ancestry &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib', 'tests', 'test_compare_images']
util.py                    311 DEBUG    __import__ matplotlib.tests.test_compare_images
util.py                    320 DEBUG    resolve: ['tests', 'test_compare_images'], matplotlib.tests.test_compare_images, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests.test_compare_images
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib', 'tests']
util.py                    311 DEBUG    __import__ matplotlib.tests
util.py                    320 DEBUG    resolve: ['tests'], matplotlib.tests, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib']
util.py                    311 DEBUG    __import__ matplotlib
util.py                    320 DEBUG    resolve: [], matplotlib, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib
suite.py                   201 DEBUG    suite 139980834420128 (&lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt;) run called, tests: &lt;generator object _get_wrapped_tests at 0x7f4fd5629ce0&gt;
suite.py                   269 DEBUG    suite 139980834420128 setUp called, tests: &lt;generator object _get_wrapped_tests at 0x7f4fd3a837e0&gt;
suite.py                    79 DEBUG    tests in 139980834420128?
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
util.py                    470 DEBUG    call fixture &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;.setup
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;.setup
suite.py                   298 DEBUG    completed suite setup
suite.py                    94 DEBUG    precache is [matplotlib.tests.test_compare_images.nosetest_simple_figure(0, 'simple', 'png')]
suite.py                   323 DEBUG    context teardown
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;.teardown
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need teardown
suite.py                   346 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; already torn down
=============================== warnings summary ===============================
build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_axes.py::test_fill_units[png]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/axes/_base.py:2504: RuntimeWarning: invalid value encountered in double_scalars
    delta = (x1t - x0t) * margin

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_axes.py::test_pyplot_axes
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Using pyplot.axes(ax) with ax an Axes argument is deprecated. Please use pyplot.sca(ax) instead.
    warnings.warn(message, mplDeprecation, stacklevel=1)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_image.py::test_empty_imshow[make_norm2]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/colors.py:1133: RuntimeWarning: invalid value encountered in greater
    masked = np.abs(a) &gt; self.linthresh

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_image.py::test_full_invalid
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:405: UserWarning: Warning: converting a masked element to nan.
    dv = (np.float64(self.norm.vmax) -
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:406: UserWarning: Warning: converting a masked element to nan.
    np.float64(self.norm.vmin))
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:412: UserWarning: Warning: converting a masked element to nan.
    a_min = np.float64(newmin)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:417: UserWarning: Warning: converting a masked element to nan.
    a_max = np.float64(newmax)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/colors.py:916: UserWarning: Warning: converting a masked element to nan.
    dtype = np.min_scalar_type(value)
  /usr/lib/python2.7/dist-packages/numpy/ma/core.py:716: UserWarning: Warning: converting a masked element to nan.
    data = np.array(a, copy=False, subok=subok)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
"><pre class="notranslate"><code class="notranslate">=================================== FAILURES ===================================
_______________ test_save_animation_smoketest[pillow-movie.gif] ________________

self = &lt;CallInfo when='call' exception: list index out of range&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd42b1e28&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_save_animation_smoketest[pillow-movie.gif]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

tmpdir = local('/tmp/pytest-of-pbuilder/pytest-1/test_save_animation_smoketest_6')
writer = 'pillow', output = 'movie.gif'

    @pytest.mark.parametrize('writer, output', WRITER_OUTPUT)
    def test_save_animation_smoketest(tmpdir, writer, output):
        try:
            # for ImageMagick the rcparams must be patched to account for
            # 'convert' being a built in MS tool, not the imagemagick
            # tool.
            writer._init_from_registry()
        except AttributeError:
            pass
        if not animation.writers.is_available(writer):
            pytest.skip("writer '%s' not available on this system" % writer)
        fig, ax = plt.subplots()
        line, = ax.plot([], [])
    
        ax.set_xlim(0, 10)
        ax.set_ylim(-1, 1)
    
        dpi = None
        codec = None
        if writer == 'ffmpeg':
            # Issue #8253
            fig.set_size_inches((10.85, 9.21))
            dpi = 100.
            codec = 'h264'
    
        def init():
            line.set_data([], [])
            return line,
    
        def animate(i):
            x = np.linspace(0, 10, 100)
            y = np.sin(x + i)
            line.set_data(x, y)
            return line,
    
        # Use temporary directory for the file-based writers, which produce a file
        # per frame with known names.
        with tmpdir.as_cwd():
            anim = animation.FuncAnimation(fig, animate, init_func=init, frames=5)
            try:
                anim.save(output, fps=30, writer=writer, bitrate=500, dpi=dpi,
&gt;                         codec=codec)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_animation.py:174: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.FuncAnimation object at 0x7f4fcf6047d0&gt;
filename = 'movie.gif'
writer = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;, fps = 30
dpi = 100.0, codec = 'mpeg4', bitrate = 500, extra_args = None, metadata = None
extra_anim = None, savefig_kwargs = {}

    def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
             bitrate=None, extra_args=None, metadata=None, extra_anim=None,
             savefig_kwargs=None):
        '''Saves a movie file by drawing every frame.
    
            Parameters
            ----------
    
            filename : str
                The output filename, e.g., :file:`mymovie.mp4`.
    
            writer : :class:`MovieWriter` or str, optional
                A `MovieWriter` instance to use or a key that identifies a
                class to use, such as 'ffmpeg'. If ``None``, defaults to
                :rc:`animation.writer`.
    
            fps : number, optional
               Frames per second in the movie. Defaults to ``None``, which will use
               the animation's specified interval to set the frames per second.
    
            dpi : number, optional
               Controls the dots per inch for the movie frames.  This combined with
               the figure's size in inches controls the size of the movie.  If
               ``None``, defaults to :rc:`savefig.dpi`.
    
            codec : str, optional
               The video codec to be used. Not all codecs are supported
               by a given :class:`MovieWriter`. If ``None``, default to
               :rc:`animation.codec`.
    
            bitrate : number, optional
               Specifies the number of bits used per second in the compressed
               movie, in kilobits per second. A higher number means a higher
               quality movie, but at the cost of increased file size. If ``None``,
               defaults to :rc:`animation.bitrate`.
    
            extra_args : list, optional
               List of extra string arguments to be passed to the underlying movie
               utility. If ``None``, defaults to :rc:`animation.extra_args`.
    
            metadata : Dict[str, str], optional
               Dictionary of keys and values for metadata to include in
               the output file. Some keys that may be of use include:
               title, artist, genre, subject, copyright, srcform, comment.
    
            extra_anim : list, optional
               Additional `Animation` objects that should be included
               in the saved movie file. These need to be from the same
               `matplotlib.figure.Figure` instance. Also, animation frames will
               just be simply combined, so there should be a 1:1 correspondence
               between the frames from the different animations.
    
            savefig_kwargs : dict, optional
               Is a dictionary containing keyword arguments to be passed
               on to the `savefig` command which is called repeatedly to
               save the individual frames.
    
            Notes
            -----
            fps, codec, bitrate, extra_args, metadata are used to
            construct a :class:`MovieWriter` instance and can only be
            passed if `writer` is a string.  If they are passed as
            non-`None` and ``writer`` is a :class:`MovieWriter`, a
            `RuntimeError` will be raised.
    
            '''
        # If the writer is None, use the rc param to find the name of the one
        # to use
        if writer is None:
            writer = rcParams['animation.writer']
        elif (not isinstance(writer, six.string_types) and
                any(arg is not None
                    for arg in (fps, codec, bitrate, extra_args, metadata))):
            raise RuntimeError('Passing in values for arguments '
                               'fps, codec, bitrate, extra_args, or metadata '
                               'is not supported when writer is an existing '
                               'MovieWriter instance. These should instead be '
                               'passed as arguments when creating the '
                               'MovieWriter instance.')
    
        if savefig_kwargs is None:
            savefig_kwargs = {}
    
        # Need to disconnect the first draw callback, since we'll be doing
        # draws. Otherwise, we'll end up starting the animation.
        if self._first_draw_id is not None:
            self._fig.canvas.mpl_disconnect(self._first_draw_id)
            reconnect_first_draw = True
        else:
            reconnect_first_draw = False
    
        if fps is None and hasattr(self, '_interval'):
            # Convert interval in ms to frames per second
            fps = 1000. / self._interval
    
        # Re-use the savefig DPI for ours if none is given
        if dpi is None:
            dpi = rcParams['savefig.dpi']
        if dpi == 'figure':
            dpi = self._fig.dpi
    
        if codec is None:
            codec = rcParams['animation.codec']
    
        if bitrate is None:
            bitrate = rcParams['animation.bitrate']
    
        all_anim = [self]
        if extra_anim is not None:
            all_anim.extend(anim
                            for anim
                            in extra_anim if anim._fig is self._fig)
    
        # If we have the name of a writer, instantiate an instance of the
        # registered class.
        if isinstance(writer, six.string_types):
            if writer in writers.avail:
                writer = writers[writer](fps, codec, bitrate,
                                         extra_args=extra_args,
                                         metadata=metadata)
            else:
                _log.warning("MovieWriter %s unavailable.", writer)
    
                try:
                    writer = writers[writers.list()[0]](fps, codec, bitrate,
                                                        extra_args=extra_args,
                                                        metadata=metadata)
                except IndexError:
                    raise ValueError("Cannot save animation: no writers are "
                                     "available. Please install ffmpeg to "
                                     "save animations.")
        _log.info('Animation.save using %s', type(writer))
    
        if 'bbox_inches' in savefig_kwargs:
            _log.warning("Warning: discarding the 'bbox_inches' argument in "
                         "'savefig_kwargs' as it may cause frame size "
                         "to vary, which is inappropriate for animation.")
            savefig_kwargs.pop('bbox_inches')
    
        # Create a new sequence of frames for saved data. This is different
        # from new_frame_seq() to give the ability to save 'live' generated
        # frame information to be saved later.
        # TODO: Right now, after closing the figure, saving a movie won't work
        # since GUI widgets are gone. Either need to remove extra code to
        # allow for this non-existent use case or find a way to make it work.
        with rc_context():
            if rcParams['savefig.bbox'] == 'tight':
                _log.info("Disabling savefig.bbox = 'tight', as it may cause "
                          "frame size to vary, which is inappropriate for "
                          "animation.")
                rcParams['savefig.bbox'] = None
            with writer.saving(self._fig, filename, dpi):
                for anim in all_anim:
                    # Clear the initial frame
                    anim._init_draw()
                for data in zip(*[a.new_saved_frame_seq() for a in all_anim]):
                    for anim, d in zip(all_anim, data):
                        # TODO: See if turning off blit is really necessary
                        anim._draw_next_frame(d, blit=False)
&gt;                   writer.grab_frame(**savefig_kwargs)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:1200: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;contextlib.GeneratorContextManager object at 0x7f4fcf604ca0&gt;
type = &lt;type 'exceptions.ImportError'&gt;
value = ImportError('/usr/lib/python2.7/dist-packages/PIL/_imaging.x86_64-linux-gnu.so: undefined symbol: Py_InitModule4_64',)
traceback = &lt;traceback object at 0x7f4fcf4b8588&gt;

    def __exit__(self, type, value, traceback):
        if type is None:
            try:
                self.gen.next()
            except StopIteration:
                return
            else:
                raise RuntimeError("generator didn't stop")
        else:
            if value is None:
                # Need to force instantiation so we can reliably
                # tell if we get the same exception back
                value = type()
            try:
&gt;               self.gen.throw(type, value, traceback)

/usr/lib/python2.7/contextlib.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;
fig = &lt;Figure size 640x480 with 1 Axes&gt;, outfile = 'movie.gif', dpi = 100.0
args = (), kwargs = {}

    @contextlib.contextmanager
    def saving(self, fig, outfile, dpi, *args, **kwargs):
        '''
            Context manager to facilitate writing the movie file.
    
            ``*args, **kw`` are any parameters that should be passed to `setup`.
            '''
        # This particular sequence is what contextlib.contextmanager wants
        self.setup(fig, outfile, dpi, *args, **kwargs)
        try:
            yield self
        finally:
&gt;           self.finish()

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:241: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;matplotlib.animation.PillowWriter object at 0x7f4fcf604b50&gt;

    def finish(self):
&gt;       self._frames[0].save(
            self._outfile, save_all=True, append_images=self._frames[1:],
            duration=int(1000 / self.fps))
E       IndexError: list index out of range

build/lib.linux-x86_64-2.7-pydebug/matplotlib/animation.py:610: IndexError
------------------------------ Captured log call -------------------------------
animation.py              1172 INFO     Animation.save using &lt;class 'matplotlib.animation.PillowWriter'&gt;
_____________________________ test_log_scales[png] _____________________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd446c258&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_log_scales[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_log_scales[png]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}, notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_log_scales[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_log_scales[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        """
        Compare two "image" files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = "./baseline/plot.png"
        img2 = "./output/plot.png"
        compare_images( img1, img2, 0.001 ):
    
        """
        if not os.path.exists(actual):
            raise Exception("Output image %s does not exist." % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception("Output image file %s is empty." % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
        rms = calculate_rms(expectedImage, actualImage)
    
        if rms &lt;= tol:
            return None
    
&gt;       save_diff_image(expected, actual, diff_image)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales.png'
output = '/build/matplotlib-2.2.2/result_images/test_axes/log_scales-failed-diff.png'

    def save_diff_image(expected, actual, output):
        expectedImage = _png.read_png(expected)
        actualImage = _png.read_png(actual)
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
        expectedImage = np.array(expectedImage).astype(float)
        actualImage = np.array(actualImage).astype(float)
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                "Image sizes do not match expected size: {0} "
&gt;               "actual size {1}".format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (600, 800, 3) actual size (600, 800, 4)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:471: ImageComparisonFailure
__________________ test_bbox_inches_tight_suptile_legend[png] __________________

self = &lt;CallInfo when='call' exception: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd3bdf1b0&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_bbox_inches_tight_suptile_legend[png]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expected = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend-expected.png'
actual = '/build/matplotlib-2.2.2/result_images/test_bbox_tight/bbox_inches_tight_suptile_legend.png'
tol = 0.306, in_decorator = True

    def compare_images(expected, actual, tol, in_decorator=False):
        """
        Compare two "image" files checking differences within a tolerance.
    
        The two given filenames may point to files which are convertible to
        PNG via the `.converter` dictionary. The underlying RMS is calculated
        with the `.calculate_rms` function.
    
        Parameters
        ----------
        expected : str
            The filename of the expected image.
        actual :str
            The filename of the actual image.
        tol : float
            The tolerance (a color value difference, where 255 is the
            maximal difference).  The test fails if the average pixel
            difference is greater than this value.
        in_decorator : bool
            If called from image_comparison decorator, this should be
            True. (default=False)
    
        Examples
        --------
        img1 = "./baseline/plot.png"
        img2 = "./output/plot.png"
        compare_images( img1, img2, 0.001 ):
    
        """
        if not os.path.exists(actual):
            raise Exception("Output image %s does not exist." % actual)
    
        if os.stat(actual).st_size == 0:
            raise Exception("Output image file %s is empty." % actual)
    
        # Convert the image to png
        extension = expected.split('.')[-1]
    
        if not os.path.exists(expected):
            raise IOError('Baseline image %r does not exist.' % expected)
    
        if extension != 'png':
            actual = convert(actual, False)
            expected = convert(expected, True)
    
        # open the image files and remove the alpha channel (if it exists)
        expectedImage = _png.read_png_int(expected)
        actualImage = _png.read_png_int(actual)
        expectedImage = expectedImage[:, :, :3]
        actualImage = actualImage[:, :, :3]
    
        actualImage, expectedImage = crop_to_same(
            actual, actualImage, expected, expectedImage)
    
        diff_image = make_test_filename(actual, 'failed-diff')
    
        if tol &lt;= 0.0:
            if np.array_equal(expectedImage, actualImage):
                return None
    
        # convert to signed integers, so that the images can be subtracted without
        # overflow
        expectedImage = expectedImage.astype(np.int16)
        actualImage = actualImage.astype(np.int16)
    
&gt;       rms = calculate_rms(expectedImage, actualImage)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:439: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

expectedImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)
actualImage = array([[[255, 255, 255],
        [255, 255, 255],
        [255, 255, 255],
   ...55, 255, 255],
        [255, 255, 255],
        [255, 255, 255]]], dtype=int16)

    def calculate_rms(expectedImage, actualImage):
        "Calculate the per-pixel errors, then compute the root mean square error."
        if expectedImage.shape != actualImage.shape:
            raise ImageComparisonFailure(
                "Image sizes do not match expected size: {0} "
&gt;               "actual size {1}".format(expectedImage.shape, actualImage.shape))
E           ImageComparisonFailure: Image sizes do not match expected size: (593, 921, 3) actual size (592, 921, 3)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/testing/compare.py:369: ImageComparisonFailure
__________________ test_nose_image_comparison[failing figure] __________________

self = &lt;CallInfo when='call' exception: assert '...' == 'FFF'
  - ...
  + FFF&gt;
func = &lt;function &lt;lambda&gt; at 0x7f4fd45b0a38&gt;, when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
&gt;           self.result = func()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:189: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

&gt;   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

/usr/lib/python2.7/dist-packages/_pytest/runner.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_runtest_call'&gt;, args = ()
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_runtest_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3a370&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb93c530&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb944bc0&gt;]
kwargs = {'item': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

item = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def pytest_runtest_call(item):
        _update_current_test_var(item, 'call')
        try:
&gt;           item.runtest()

/usr/lib/python2.7/dist-packages/_pytest/runner.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    def runtest(self):
        """ execute the underlying test function. """
&gt;       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/usr/lib/python2.7/dist-packages/_pytest/python.py:1171: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_HookCaller 'pytest_pyfunc_call'&gt;, args = ()
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}
notincall = set([])

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.argnames:
            notincall = set(self.argnames) - set(['__multicall__']) - set(
                kwargs.keys())
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call"
                    .format(tuple(notincall)),
                    stacklevel=2,
                )
&gt;       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:617: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_pytest.config.PytestPluginManager object at 0x7f4fdcda3b50&gt;
hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
&gt;       return self._inner_hookexec(hook, methods, kwargs)

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

hook = &lt;_HookCaller 'pytest_pyfunc_call'&gt;
methods = [&lt;pluggy.HookImpl object at 0x7f4fdba3ae60&gt;, &lt;pluggy.HookImpl object at 0x7f4fdb9f7290&gt;]
kwargs = {'pyfuncitem': &lt;Function 'test_nose_image_comparison[failing figure]'&gt;}

    self._inner_hookexec = lambda hook, methods, kwargs: \
        hook.multicall(
            methods, kwargs,
&gt;           firstresult=hook.spec_opts.get('firstresult'),
        )

/usr/lib/python2.7/dist-packages/pluggy/__init__.py:216: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

pyfuncitem = &lt;Function 'test_nose_image_comparison[failing figure]'&gt;

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        if pyfuncitem._isyieldedfunction():
            testfunction(*pyfuncitem._args)
        else:
            funcargs = pyfuncitem.funcargs
            testargs = {}
            for arg in pyfuncitem._fixtureinfo.argnames:
                testargs[arg] = funcargs[arg]
&gt;           testfunction(**testargs)

/usr/lib/python2.7/dist-packages/_pytest/python.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
kwargs = {'baseline_images': ['simple'], 'extensions': ['png', 'png', 'png']}
errors = []
failures = [(&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exc...onFailure'&gt;, 'images not close'), (&lt;class 'matplotlib.testing.exceptions.ImageComparisonFailure'&gt;, 'images not close')]
dots = 'FFF'
monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch instance at 0x7f4fd5651420&gt;

    @pytest.mark.parametrize(
        'func, kwargs, errors, failures, dots',
        [
            (nosetest_empty, {'baseline_images': []}, [], [], ''),
            (nosetest_empty, {'baseline_images': ['foo']},
             [(AssertionError,
               'Test generated 0 images but there are 1 baseline images')],
             [],
             'E'),
            (nosetest_simple_figure,
             {'baseline_images': ['basn3p02'], 'extensions': ['png'],
              'remove_text': True},
             [],
             [(ImageComparisonFailure, 'Image sizes do not match expected size:')],
             'F'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple']},
             [],
             [(ImageComparisonFailure, 'images not close')] * 3,
             'FFF'),
            (nosetest_simple_figure,
             {'baseline_images': ['simple'], 'remove_text': True},
             [],
             [],
             '...'),
            (nosetest_manual_text_removal,
             {'baseline_images': ['simple']},
             [],
             [],
             '...'),
        ],
        ids=[
            'empty',
            'extra baselines',
            'incorrect shape',
            'failing figure',
            'passing figure',
            'manual text removal',
        ])
    def test_nose_image_comparison(func, kwargs, errors, failures, dots,
                                   monkeypatch):
        nose = pytest.importorskip('nose')
        monkeypatch.setattr('matplotlib._called_from_pytest', False)
    
        class TestResultVerifier(nose.result.TextTestResult):
            def __init__(self, *args, **kwargs):
                super(TestResultVerifier, self).__init__(*args, **kwargs)
                self.error_count = 0
                self.failure_count = 0
    
            def addError(self, test, err):
                super(TestResultVerifier, self).addError(test, err)
    
                if self.error_count &lt; len(errors):
                    assert err[0] is errors[self.error_count][0]
                    assert errors[self.error_count][1] in str(err[1])
                else:
                    raise err[1]
                self.error_count += 1
    
            def addFailure(self, test, err):
                super(TestResultVerifier, self).addFailure(test, err)
    
                assert self.failure_count &lt; len(failures), err[1]
                assert err[0] is failures[self.failure_count][0]
                assert failures[self.failure_count][1] in str(err[1])
                self.failure_count += 1
    
        # Make sure that multiple extensions work, but don't require LaTeX or
        # Inkscape to do so.
        kwargs.setdefault('extensions', ['png', 'png', 'png'])
    
        func = image_comparison(**kwargs)(func)
        loader = nose.loader.TestLoader()
        suite = loader.loadTestsFromGenerator(
            func,
            'matplotlib.tests.test_compare_images')
        if six.PY2:
            output = io.BytesIO()
        else:
            output = io.StringIO()
        result = TestResultVerifier(stream=output, descriptions=True, verbosity=1)
        with warnings.catch_warnings():
            # Nose uses deprecated stuff; we don't care about it.
            warnings.simplefilter('ignore', DeprecationWarning)
            suite.run(result=result)
    
&gt;       assert output.getvalue() == dots
E       AssertionError: assert '...' == 'FFF'
E         - ...
E         + FFF

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py:199: AssertionError
----------------------------- Captured stdout call -----------------------------
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
images not close (RMS 12.955):
	result_images/test_compare_images/simple.png
	result_images/test_compare_images/simple-expected.png 
------------------------------ Captured log call -------------------------------
importer.py                143 DEBUG    Add path /build/matplotlib-2.2.2
suite.py                   418 DEBUG    Create suite for &lt;function generate at 0x7f4fd49e3d80&gt;
suite.py                   420 DEBUG    tests &lt;function generate at 0x7f4fd49e3d80&gt; context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   148 DEBUG    Context suite for &lt;function generate at 0x7f4fd49e3d80&gt; (&lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;) (139980834420128)
suite.py                   481 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has context nosetest_simple_figure
suite.py                   435 DEBUG    get ancestry &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib', 'tests', 'test_compare_images']
util.py                    311 DEBUG    __import__ matplotlib.tests.test_compare_images
util.py                    320 DEBUG    resolve: ['tests', 'test_compare_images'], matplotlib.tests.test_compare_images, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests.test_compare_images
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib', 'tests']
util.py                    311 DEBUG    __import__ matplotlib.tests
util.py                    320 DEBUG    resolve: ['tests'], matplotlib.tests, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib.tests
suite.py                   452 DEBUG     &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; ancestors ['matplotlib']
util.py                    311 DEBUG    __import__ matplotlib
util.py                    320 DEBUG    resolve: [], matplotlib, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;, &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   485 DEBUG    suite &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; has ancestor matplotlib
suite.py                   201 DEBUG    suite 139980834420128 (&lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt;) run called, tests: &lt;generator object _get_wrapped_tests at 0x7f4fd5629ce0&gt;
suite.py                   269 DEBUG    suite 139980834420128 setUp called, tests: &lt;generator object _get_wrapped_tests at 0x7f4fd3a837e0&gt;
suite.py                    79 DEBUG    tests in 139980834420128?
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
util.py                    470 DEBUG    call fixture &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;.setup
suite.py                   288 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   288 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need setup
suite.py                   291 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; does need setup
suite.py                   302 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;.setup
suite.py                   298 DEBUG    completed suite setup
suite.py                    94 DEBUG    precache is [matplotlib.tests.test_compare_images.nosetest_simple_figure(0, 'simple', 'png')]
suite.py                   323 DEBUG    context teardown
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;
util.py                    470 DEBUG    call fixture &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt;.teardown
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests.test_compare_images' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_compare_images.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib.tests' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt; may need teardown
suite.py                   349 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; setup ancestor &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   356 DEBUG    &lt;nose.suite.ContextSuite context=nosetest_simple_figure&gt; teardown context &lt;module 'matplotlib' from '/build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/__init__.py'&gt;
suite.py                   341 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; may need teardown
suite.py                   346 DEBUG    ancestor &lt;function nosetest_simple_figure at 0x7f4fd4d83ae0&gt; already torn down
=============================== warnings summary ===============================
build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_axes.py::test_fill_units[png]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/axes/_base.py:2504: RuntimeWarning: invalid value encountered in double_scalars
    delta = (x1t - x0t) * margin

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_axes.py::test_pyplot_axes
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: Using pyplot.axes(ax) with ax an Axes argument is deprecated. Please use pyplot.sca(ax) instead.
    warnings.warn(message, mplDeprecation, stacklevel=1)

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_image.py::test_empty_imshow[make_norm2]
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/colors.py:1133: RuntimeWarning: invalid value encountered in greater
    masked = np.abs(a) &gt; self.linthresh

build/lib.linux-x86_64-2.7-pydebug/matplotlib/tests/test_image.py::test_full_invalid
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:405: UserWarning: Warning: converting a masked element to nan.
    dv = (np.float64(self.norm.vmax) -
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:406: UserWarning: Warning: converting a masked element to nan.
    np.float64(self.norm.vmin))
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:412: UserWarning: Warning: converting a masked element to nan.
    a_min = np.float64(newmin)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/image.py:417: UserWarning: Warning: converting a masked element to nan.
    a_max = np.float64(newmax)
  /build/matplotlib-2.2.2/build/lib.linux-x86_64-2.7-pydebug/matplotlib/colors.py:916: UserWarning: Warning: converting a masked element to nan.
    dtype = np.min_scalar_type(value)
  /usr/lib/python2.7/dist-packages/numpy/ma/core.py:716: UserWarning: Warning: converting a masked element to nan.
    data = np.array(a, copy=False, subok=subok)

-- Docs: http://doc.pytest.org/en/latest/warnings.html

</code></pre></div>
<p dir="auto">python 3.6.5</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_angle_helper.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_angle_helper.py:9: in &lt;module&gt;
    from mpl_toolkits.axisartist.angle_helper import (
E     File &quot;/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py&quot;, line 212
E       deg_mark = &quot;^{\circ}&quot;
E                 ^
E   SyntaxError: invalid escape sequence \c
 ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_floating_axes.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_floating_axes.py:15: in &lt;module&gt;
    from mpl_toolkits.axisartist import angle_helper
E     File &quot;/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py&quot;, line 212
E       deg_mark = &quot;^{\circ}&quot;
E                 ^
E   SyntaxError: invalid escape sequence \c
 ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py:15: in &lt;module&gt;
    from mpl_toolkits.axisartist import angle_helper
E     File &quot;/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py&quot;, line 212
E       deg_mark = &quot;^{\circ}&quot;
E                 ^
E   SyntaxError: invalid escape sequence \c
------------------------------- Captured stderr --------------------------------
/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!"><pre class="notranslate"><code class="notranslate"> ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_angle_helper.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_angle_helper.py:9: in &lt;module&gt;
    from mpl_toolkits.axisartist.angle_helper import (
E     File "/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py", line 212
E       deg_mark = "^{\circ}"
E                 ^
E   SyntaxError: invalid escape sequence \c
 ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_floating_axes.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_floating_axes.py:15: in &lt;module&gt;
    from mpl_toolkits.axisartist import angle_helper
E     File "/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py", line 212
E       deg_mark = "^{\circ}"
E                 ^
E   SyntaxError: invalid escape sequence \c
 ERROR collecting build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py 
/usr/lib/python3/dist-packages/_pytest/python.py:403: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
/usr/lib/python3/dist-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
&lt;frozen importlib._bootstrap&gt;:971: in _find_and_load
    ???
&lt;frozen importlib._bootstrap&gt;:955: in _find_and_load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:656: in _load_unlocked
    ???
&lt;frozen importlib._bootstrap&gt;:626: in _load_backward_compatible
    ???
/usr/lib/python3/dist-packages/_pytest/assertion/rewrite.py:213: in load_module
    py.builtin.exec_(co, mod.__dict__)
build/lib.linux-x86_64-3.6/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py:15: in &lt;module&gt;
    from mpl_toolkits.axisartist import angle_helper
E     File "/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/mpl_toolkits/axisartist/angle_helper.py", line 212
E       deg_mark = "^{\circ}"
E                 ^
E   SyntaxError: invalid escape sequence \c
------------------------------- Captured stderr --------------------------------
/build/matplotlib-2.2.2/build/lib.linux-x86_64-3.6/matplotlib/cbook/deprecation.py:107: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
</code></pre></div>
<p dir="auto">python3.5.1<br>
matplotlib 1.5.1<br>
jupyter 4.0.6</p>
<p dir="auto">matplotlib.pyplot cannot render figures with new colormaps in discretized mode ('viridis' and friends).</p>
<p dir="auto">with 'jet' and friends exception is not raised</p>
<p dir="auto">How to reproduce:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
import numpy as np
a = np.random.randn(20,20)
cmap = plt.get_cmap('viridis',20)
plt.pcolormesh(a,cmap=cmap)"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt
import numpy as np
a = np.random.randn(20,20)
cmap = plt.get_cmap('viridis',20)
plt.pcolormesh(a,cmap=cmap)
</code></pre></div>
<p dir="auto">raises:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;matplotlib.collections.QuadMesh at 0x11a767198&gt;

In [6]: Exception in Tkinter callback
Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 368, in to_rgba
    'length of rgba sequence should be either 3 or 4')
ValueError: length of rgba sequence should be either 3 or 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 399, in to_rgba_array
    return np.array([self.to_rgba(c, alpha)], dtype=np.float)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 376, in to_rgba
    'to_rgba: Invalid rgba arg &quot;%s&quot;\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg &quot;['viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis']&quot;
length of rgba sequence should be either 3 or 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 306, in to_rgb
    fl = float(argl)
ValueError: could not convert string to float: 'viridis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 370, in to_rgba
    r, g, b = self.to_rgb(arg)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 328, in to_rgb
    'to_rgb: Invalid rgb arg &quot;%s&quot;\n%s' % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg &quot;viridis&quot;
could not convert string to float: 'viridis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File &quot;/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py&quot;, line 1549, in __call__
    return self.func(*args)
  File &quot;/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py&quot;, line 596, in callit
    func(*args)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py&quot;, line 373, in idle_draw
    self.draw()
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py&quot;, line 354, in draw
    FigureCanvasAgg.draw(self)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py&quot;, line 474, in draw
    self.figure.draw(self.renderer)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/figure.py&quot;, line 1159, in draw
    func(*args)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/axes/_base.py&quot;, line 2324, in draw
    a.draw(renderer)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/artist.py&quot;, line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/collections.py&quot;, line 1847, in draw
    self.update_scalarmappable()
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/collections.py&quot;, line 713, in update_scalarmappable
    self._facecolors = self.to_rgba(self._A, self._alpha)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/cm.py&quot;, line 262, in to_rgba
    x = self.cmap(x, alpha=alpha, bytes=bytes)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 550, in __call__
    self._init()
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 845, in _init
    rgba = colorConverter.to_rgba_array(self.colors)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 422, in to_rgba_array
    result[i] = self.to_rgba(cc, alpha)
  File &quot;/usr/local/lib/python3.5/site-packages/matplotlib/colors.py&quot;, line 376, in to_rgba
    'to_rgba: Invalid rgba arg &quot;%s&quot;\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg &quot;viridis&quot;
to_rgb: Invalid rgb arg &quot;viridis&quot;
could not convert string to float: 'viridis'
"><pre class="notranslate"><code class="notranslate">&lt;matplotlib.collections.QuadMesh at 0x11a767198&gt;

In [6]: Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 368, in to_rgba
    'length of rgba sequence should be either 3 or 4')
ValueError: length of rgba sequence should be either 3 or 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 399, in to_rgba_array
    return np.array([self.to_rgba(c, alpha)], dtype=np.float)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 376, in to_rgba
    'to_rgba: Invalid rgba arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg "['viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis', 'viridis']"
length of rgba sequence should be either 3 or 4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 306, in to_rgb
    fl = float(argl)
ValueError: could not convert string to float: 'viridis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 370, in to_rgba
    r, g, b = self.to_rgb(arg)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 328, in to_rgb
    'to_rgb: Invalid rgb arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgb: Invalid rgb arg "viridis"
could not convert string to float: 'viridis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 1549, in __call__
    return self.func(*args)
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 596, in callit
    func(*args)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 373, in idle_draw
    self.draw()
  File "/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 354, in draw
    FigureCanvasAgg.draw(self)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/backends/backend_agg.py", line 474, in draw
    self.figure.draw(self.renderer)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/figure.py", line 1159, in draw
    func(*args)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/axes/_base.py", line 2324, in draw
    a.draw(renderer)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/artist.py", line 61, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/collections.py", line 1847, in draw
    self.update_scalarmappable()
  File "/usr/local/lib/python3.5/site-packages/matplotlib/collections.py", line 713, in update_scalarmappable
    self._facecolors = self.to_rgba(self._A, self._alpha)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/cm.py", line 262, in to_rgba
    x = self.cmap(x, alpha=alpha, bytes=bytes)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 550, in __call__
    self._init()
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 845, in _init
    rgba = colorConverter.to_rgba_array(self.colors)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 422, in to_rgba_array
    result[i] = self.to_rgba(cc, alpha)
  File "/usr/local/lib/python3.5/site-packages/matplotlib/colors.py", line 376, in to_rgba
    'to_rgba: Invalid rgba arg "%s"\n%s' % (str(arg), exc))
ValueError: to_rgba: Invalid rgba arg "viridis"
to_rgb: Invalid rgb arg "viridis"
could not convert string to float: 'viridis'

</code></pre></div>