Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ ipython
- Python 2.7.12 (default, Dec 4 2017, 14:50:18)
- Type "copyright", "credits" or "license" for more information.
- IPython 5.8.0 -- An enhanced Interactive Python.
- ? -> Introduction and overview of IPython's features.
- %quickref -> Quick reference.
- help -> Python's own help system.
- object? -> Details about 'object', use 'object??' for extra details.
- In [1]: %run -m pytest -ipdb issue025_test.py
- ================================================= test session starts =================================================
- platform linux2 -- Python 2.7.12, pytest-3.8.1, py-1.6.0, pluggy-0.7.1
- rootdir: /home/aling/pygeode_git/pygeode, inifile:
- plugins: ipdb-0.1
- collected 43 items
- issue004_test.py . [ 2%]
- issue005_test.py . [ 4%]
- issue006_test.py . [ 6%]
- issue007_test.py . [ 9%]
- issue010_test.py . [ 11%]
- issue012_test.py .. [ 16%]
- issue015_test.py . [ 18%]
- issue017_test.py .. [ 23%]
- issue023_test.py . [ 25%]
- issue025_test.py F [ 27%]
- issue028_test.py . [ 30%]
- issue032_test.py . [ 32%]
- issue036_test.py . [ 34%]
- issue039_test.py . [ 37%]
- issue041_test.py . [ 39%]
- issue044_test.py . [ 41%]
- issue046_test.py . [ 44%]
- issue049_test.py . [ 46%]
- issue053_test.py . [ 48%]
- issue058_test.py . [ 51%]
- issue061_test.py . [ 53%]
- issue065_test.py . [ 55%]
- issue066_test.py . [ 58%]
- issue068_test.py ...... [ 72%]
- issue069_test.py . [ 74%]
- issue073_test.py . [ 76%]
- issue089_test.py . [ 79%]
- issue090_test.py . [ 81%]
- issue093_test.py .. [ 86%]
- issue096_test.py . [ 88%]
- issue097_test.py .. [ 93%]
- issue104_test.py . [ 95%]
- issue108_test.py .. [100%]
- ====================================================== FAILURES =======================================================
- ____________________________________________________ test_issue025 ____________________________________________________
- def test_issue025():
- lat = Lat([80,70,60])
- var = Var(axes=[lat], values=[1,2,3], name='2B')
- # Save the variable
- nc.save ("issue025_test.nc", var)
- # This may crash in some versions of the netcdf library.
- # Even if it doesn't crash, it's a good idea to enforce the legal
- # netcdf names
- f = nc.open("issue025_test.nc")
- > assert len(f.vars) == 1
- E AssertionError: assert 2 == 1
- E + where 2 = len([<Var '_2B'>, <Var 'lat_weights'>])
- E + where [<Var '_2B'>, <Var 'lat_weights'>] = <pygeode.dataset.Dataset object at 0x7f59be407090>.vars
- issue025_test.py:22: AssertionError
- ================================================== warnings summary ===================================================
- /home/aling/.local/lib/python2.7/site-packages/scipy/special/__init__.py:640: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._ufuncs import *
- /home/aling/.local/lib/python2.7/site-packages/scipy/linalg/basic.py:17: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._solve_toeplitz import levinson
- /home/aling/.local/lib/python2.7/site-packages/scipy/linalg/__init__.py:207: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._decomp_update import *
- /home/aling/.local/lib/python2.7/site-packages/scipy/special/_ellip_harm.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm
- /home/aling/.local/lib/python2.7/site-packages/scipy/interpolate/_bsplines.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _bspl
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/lil.py:19: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _csparsetools
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:165: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._shortest_path import shortest_path, floyd_warshall, dijkstra,\
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py:5: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._tools import csgraph_to_dense, csgraph_from_dense,\
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:167: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._traversal import breadth_first_order, depth_first_order, \
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:169: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._min_spanning_tree import minimum_spanning_tree
- /home/aling/.local/lib/python2.7/site-packages/scipy/sparse/csgraph/__init__.py:170: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._reordering import reverse_cuthill_mckee, maximum_bipartite_matching, \
- /home/aling/.local/lib/python2.7/site-packages/scipy/spatial/__init__.py:95: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from .ckdtree import *
- /home/aling/.local/lib/python2.7/site-packages/scipy/spatial/__init__.py:96: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from .qhull import *
- /home/aling/.local/lib/python2.7/site-packages/scipy/spatial/_spherical_voronoi.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _voronoi
- /home/aling/.local/lib/python2.7/site-packages/scipy/spatial/distance.py:122: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _hausdorff
- /home/aling/.local/lib/python2.7/site-packages/scipy/optimize/_trlib/__init__.py:1: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._trlib import TRLIBQuadraticSubproblem
- /home/aling/.local/lib/python2.7/site-packages/scipy/optimize/_numdiff.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._group_columns import group_dense, group_sparse
- /home/aling/.local/lib/python2.7/site-packages/scipy/stats/_continuous_distns.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _stats
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:257: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- values = values[[slice(None)]*i + [sl]]
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/formats/netcdf.py:391: UserWarning: cfmeta: data starts at year 0 (which usually indicates a climatology), but there's more than one year's worth of data! Keeping it on a regular calendar.
- return finalize_open(dataset, dimtypes, namemap, varlist, cfmeta)
- /home/aling/pygeode_git/pygeode/tests/issues/issue015_test.py:16: UserWarning: skipping attribute ancillary_variables = lat_weights (unsupported type unicode352)
- nc.save("issue015_test.nc", x)
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/axis.py:693: UserWarning: No units available for the given relative values. Ignoring values array and relying on absolute date fields for initialization.
- return cls(values, name=name, atts=atts, **aux)
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/axis.py:693: UserWarning: No units given, using default of 'days'
- return cls(values, name=name, atts=atts, **aux)
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/formats/cfmeta.py:132: UserWarning: renaming '2B' to '_2B'
- warn ("renaming '%s' to '%s'"%(oldname,newname))
- /home/aling/pygeode_git/pygeode/tests/issues/issue025_test.py:13: UserWarning: skipping attribute ancillary_variables = lat_weights (unsupported type unicode352)
- nc.save ("issue025_test.nc", var)
- /home/aling/.local/lib/python2.7/site-packages/scipy/signal/_max_len_seq.py:8: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._max_len_seq_inner import _max_len_seq_inner
- /home/aling/.local/lib/python2.7/site-packages/scipy/signal/_upfirdn.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._upfirdn_apply import _output_len, _apply
- /home/aling/.local/lib/python2.7/site-packages/scipy/ndimage/measurements.py:36: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from . import _ni_label
- /home/aling/.local/lib/python2.7/site-packages/scipy/signal/spectral.py:10: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._spectral import _lombscargle
- /home/aling/.local/lib/python2.7/site-packages/scipy/signal/_peak_finding.py:13: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
- from ._peak_finding_utils import (_argmaxima1d, _select_by_peak_distance,
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.WeightedNANMeanVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.NANSDVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.NANVarianceVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.WeightedMeanVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.SDVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.reduce.VarianceVar'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/smooth.py:83: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- src[sslo] = indata
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/smooth.py:89: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- src[sslo] = src[ssli]
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/smooth.py:97: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- out[outsl] = self._convolve(src, self.kernel, 'same')[cnvsl]
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/diff.py:72: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- return diff[getleft]
- /home/aling/pygeode_git/pygeode/tests/issues/issue090_test.py:10: UserWarning: skipping attribute ancillary_variables = lat_weights (unsupported type unicode352)
- netcdf.save("issue090.data", t1)
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/tools.py:488: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- bigout[sl] += out
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/tools.py:489: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
- bigcount[sl] += count
- /usr/local/lib/python2.7/dist-packages/pygeode-1.2.2-py2.7-linux-x86_64.egg/pygeode/view.py:287: UserWarning: <class 'pygeode.varoperations.Replace_axes'> is returning a numpy scalar instead of an ndarray - re-wrapping it now
- warn ("%s is returning a numpy scalar instead of an ndarray - re-wrapping it now"%type(var))
- -- Docs: https://docs.pytest.org/en/latest/warnings.html
- ================================== 1 failed, 42 passed, 44 warnings in 1.85 seconds ===================================
- ---------------------------------------------------------------------------
- SystemExit Traceback (most recent call last)
- /usr/lib/python2.7/runpy.pyc in run_module(mod_name, init_globals, run_name, alter_sys)
- 186 if alter_sys:
- 187 return _run_module_code(code, init_globals, run_name,
- --> 188 fname, loader, pkg_name)
- 189 else:
- 190 # Leave the sys module alone
- /usr/lib/python2.7/runpy.pyc in _run_module_code(code, init_globals, mod_name, mod_fname, mod_loader, pkg_name)
- 80 mod_globals = temp_module.module.__dict__
- 81 _run_code(code, mod_globals, init_globals,
- ---> 82 mod_name, mod_fname, mod_loader, pkg_name)
- 83 # Copy the globals of the temporary module, as they
- 84 # may be cleared when the temporary module goes away
- /usr/lib/python2.7/runpy.pyc in _run_code(code, run_globals, init_globals, mod_name, mod_fname, mod_loader, pkg_name)
- 70 __loader__ = mod_loader,
- 71 __package__ = pkg_name)
- ---> 72 exec code in run_globals
- 73 return run_globals
- 74
- /usr/local/lib/python2.7/dist-packages/pytest.py in <module>()
- 75 import pytest
- 76
- ---> 77 raise SystemExit(pytest.main())
- 78 else:
- 79
- SystemExit: 1
- /usr/local/lib/python2.7/dist-packages/IPython/core/interactiveshell.py:2590: UserWarning: Unknown failure executing module: <pytest>
- warn('Unknown failure executing module: <%s>' % mod_name)
- In [2]: %debug
- > /usr/local/lib/python2.7/dist-packages/pytest.py(77)<module>()
- 75 import pytest
- 76
- ---> 77 raise SystemExit(pytest.main())
- 78 else:
- 79
- ipdb> u
- > /usr/lib/python2.7/runpy.py(72)_run_code()
- 70 __loader__ = mod_loader,
- 71 __package__ = pkg_name)
- ---> 72 exec code in run_globals
- 73 return run_globals
- 74
- ipdb> u
- > /usr/lib/python2.7/runpy.py(82)_run_module_code()
- 80 mod_globals = temp_module.module.__dict__
- 81 _run_code(code, mod_globals, init_globals,
- ---> 82 mod_name, mod_fname, mod_loader, pkg_name)
- 83 # Copy the globals of the temporary module, as they
- 84 # may be cleared when the temporary module goes away
- ipdb> u
- > /usr/lib/python2.7/runpy.py(188)run_module()
- 186 if alter_sys:
- 187 return _run_module_code(code, init_globals, run_name,
- --> 188 fname, loader, pkg_name)
- 189 else:
- 190 # Leave the sys module alone
- ipdb> u
- *** Oldest frame
- ipdb> l
- 183 if run_name is None:
- 184 run_name = mod_name
- 185 pkg_name = mod_name.rpartition('.')[0]
- 186 if alter_sys:
- 187 return _run_module_code(code, init_globals, run_name,
- --> 188 fname, loader, pkg_name)
- 189 else:
- 190 # Leave the sys module alone
- 191 return _run_code(code, {}, init_globals, run_name,
- 192 fname, loader, pkg_name)
- 193
- ipdb> exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement