Description
These test failures have been lurking around on master for all my installed Python versions 3.6.9, 3.7.5 and 3.8.0:
Actual behavior
======================================================================================== FAILURES ========================================================================================
__________________________________________________________________________ test_label_visibility_rules_default ___________________________________________________________________________
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11c77e520>
@ignore_matplotlibrc
def test_label_visibility_rules_default(ax):
> assert_label_draw(ax, True, True)
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11c77e520>, x_label = True, y_label = True
def assert_label_draw(ax, x_label, y_label):
ax.coords[0].set_axislabel("Label 1")
ax.coords[1].set_axislabel("Label 2")
with patch.object(ax.coords[0].axislabels, 'set_position') as pos1:
with patch.object(ax.coords[1].axislabels, 'set_position') as pos2:
ax.figure.canvas.draw()
> assert pos1.call_count == x_label
E assert 17 == True
E -17
E +True
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:52: AssertionError
___________________________________________________________________________ test_label_visibility_rules_ticks ____________________________________________________________________________
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11e9874f0>
@ignore_matplotlibrc
def test_label_visibility_rules_ticks(ax):
ax.coords[0].set_axislabel_visibility_rule('ticks')
ax.coords[1].set_axislabel_visibility_rule('ticks')
ax.coords[0].set_ticklabel_visible(False)
ax.coords[1].set_ticks(values=[-9999]*u.one)
> assert_label_draw(ax, True, False)
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:79:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11e9874f0>, x_label = True, y_label = False
def assert_label_draw(ax, x_label, y_label):
ax.coords[0].set_axislabel("Label 1")
ax.coords[1].set_axislabel("Label 2")
with patch.object(ax.coords[0].axislabels, 'set_position') as pos1:
with patch.object(ax.coords[1].axislabels, 'set_position') as pos2:
ax.figure.canvas.draw()
> assert pos1.call_count == x_label
E assert 17 == True
E -17
E +True
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:52: AssertionError
___________________________________________________________________________ test_label_visibility_rules_always ___________________________________________________________________________
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11f00dac0>
@ignore_matplotlibrc
def test_label_visibility_rules_always(ax):
ax.coords[0].set_axislabel_visibility_rule('always')
ax.coords[1].set_axislabel_visibility_rule('always')
ax.coords[0].set_ticklabel_visible(False)
ax.coords[1].set_ticks(values=[-9999]*u.one)
> assert_label_draw(ax, True, True)
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ax = <astropy.visualization.wcsaxes.core.WCSAxes object at 0x11f00dac0>, x_label = True, y_label = True
def assert_label_draw(ax, x_label, y_label):
ax.coords[0].set_axislabel("Label 1")
ax.coords[1].set_axislabel("Label 2")
with patch.object(ax.coords[0].axislabels, 'set_position') as pos1:
with patch.object(ax.coords[1].axislabels, 'set_position') as pos2:
ax.figure.canvas.draw()
> assert pos1.call_count == x_label
E assert 17 == True
E -17
E +True
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_coordinate_helpers.py:52: AssertionError
______________________________________________________________________________ test_format_coord_regression ______________________________________________________________________________
tmpdir = local('/private/var/folders/7l/j6rbh6fw8xjc4w0059bv63_h00027w/T/pytest-of-derek/pytest-75/test_format_coord_regression0')
@ignore_matplotlibrc
def test_format_coord_regression(tmpdir):
# Regression test for a bug that meant that if format_coord was called by
# Matplotlib before the axes were drawn, an error occurred.
fig = plt.figure(figsize=(3, 3))
ax = WCSAxes(fig, [0.1, 0.1, 0.8, 0.8])
fig.add_axes(ax)
> assert ax.format_coord(10, 10) == ""
E AssertionError: assert '10.0 10.0 (world)' == ''
E - 10.0 10.0 (world)
lib/python3.8/site-packages/astropy/visualization/wcsaxes/tests/test_misc.py:50: AssertionError
Steps to Reproduce
System Details
>>> astropy.test(package='visualization', args='-vk wcs', remote_data=True)
================================================================================== test session starts ===================================================================================
platform darwin -- Python 3.8.0, pytest-5.3.0, py-1.8.0, pluggy-0.13.0 -- /sw/bin/python3.8
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/Users/derek/.hypothesis/examples')
Running tests with Astropy version 4.1.dev27005.
Running tests in lib/python3.8/site-packages/astropy/visualization.
Date: 2019-11-26T15:29:00
Platform: macOS-10.12.6-x86_64-i386-64bit
Executable: /sw/bin/python3.8
Full Python Version:
3.8.0 (default, Oct 23 2019, 19:06:20)
[Clang 9.0.0 (clang-900.0.39.2)]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Package versions:
Numpy: 1.17.4
Scipy: 1.3.2
Matplotlib: 3.1.0
h5py: 2.9.0
Pandas: 0.25.3
Cython: 0.29.13
Scikit-image: not available
asdf: 2.4.2
astropy-helpers: 3.1
Using Astropy options: remote_data: any.
Matplotlib: 3.1.0
Freetype: 2.6.1
rootdir: /Users/derek
plugins: asdf-2.4.2, flaky-3.5.3, hypothesis-4.24.3, arraydiff-0.3, astropy-header-0.1.1, cov-2.6.0, doctestplus-0.4.0, expect-1.1.0, forked-1.1.3, mock-1.10.4, mpl-0.11, openfiles-0.3.2, remotedata-0.3.1, xdist-1.30.0
collected 450 items / 232 deselected / 218 selected
Description
These test failures have been lurking around on master for all my installed Python versions 3.6.9, 3.7.5 and 3.8.0:
Actual behavior
Steps to Reproduce
System Details