diff --git a/appveyor.yml b/appveyor.yml index 4183e0a74c78..32f6b4fde8e9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -89,6 +89,7 @@ test_script: - '%CMD_IN_ENV% python setup.py develop' # tests - python tests.py + # remove to get around libpng issue? - python visual_tests.py after_test: @@ -108,7 +109,7 @@ after_test: - cmd: path - cmd: where python - cmd: '%CMD_IN_ENV% conda config --get channels' - - cmd: '%CMD_IN_ENV% conda build .\ci\conda_recipe' + # - cmd: '%CMD_IN_ENV% conda build .\ci\conda_recipe' # Move the conda package into the dist directory, to register it # as an "artifact" for Appveyor. diff --git a/lib/matplotlib/mlab.py b/lib/matplotlib/mlab.py index a6e2d8e213fa..57fc4995f440 100644 --- a/lib/matplotlib/mlab.py +++ b/lib/matplotlib/mlab.py @@ -3188,9 +3188,8 @@ def get_justify(colname, column, precision): ntype = column.dtype if np.issubdtype(ntype, str) or np.issubdtype(ntype, bytes): - # The division below handles unicode stored in array, which could - # have 4 bytes per char - length = max(len(colname), column.itemsize // column[0].itemsize) + fixed_width = int(ntype.str[2:]) + length = max(len(colname), fixed_width) return 0, length+padding, "%s" # left justify if np.issubdtype(ntype, np.int): diff --git a/lib/matplotlib/tests/test_mlab.py b/lib/matplotlib/tests/test_mlab.py index d34d1b79cf65..5eca224813c8 100644 --- a/lib/matplotlib/tests/test_mlab.py +++ b/lib/matplotlib/tests/test_mlab.py @@ -403,10 +403,10 @@ def test_csv2txt_basic(self): (str('y'), np.int8), (str('s'), str, 3), (str('s2'), str, 4)])) - truth = (' x y s s2\n' - ' 1.000 2 foo bing \n' - ' 2.000 3 bar blah ') - assert_equal(mlab.rec2txt(a), truth) + truth = (' x y s s2\n' + ' 1.000 2 foo bing \n' + ' 2.000 3 bar blah ').splitlines() + assert_equal(mlab.rec2txt(a).splitlines(), truth) class window_testcase(CleanupTestCase):