Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUG la.close() crashes; closes #73

  • Loading branch information...
commit e263c9e530626980f7688cb65823142ac947d4e5 1 parent 0c132ce
@kwgoodman authored
Showing with 21 additions and 3 deletions.
  1. +2 −2 README.rst
  2. +1 −0  RELEASE.rst
  3. +1 −1  la/io.py
  4. +17 −0 la/tests/io_test.py
View
4 README.rst
@@ -120,9 +120,9 @@ After you have installed ``la``, run the suite of unit tests::
>>> import la
>>> la.test()
<snip>
- Ran 3003 tests in 12.225s
+ Ran 3005 tests in 12.225s
OK
- <nose.result.TextTestResult run=3003 errors=0 failures=0>
+ <nose.result.TextTestResult run=3005 errors=0 failures=0>
The ``la`` package contains C extensions that speed up common alignment
operations such as adding two unaligned larrys. If the C extensions don't
View
1  RELEASE.rst
@@ -47,6 +47,7 @@ la 0.7
- #68 h5py prevents archiving of empty larrys
- #69, #70 Unit test failures on Windows
- #71 la.stack() Python 3.3 unit test failure
+- #73 la.load() crashes due to typo
Older versions
==============
View
2  la/io.py
@@ -509,7 +509,7 @@ def load(file, key):
# Load larry
group = f[key]
x = group['x'][:]
- label = _load_label(group, x.ndim)
+ label = _load_label(f, key)
# Close if file is a filename
if opened:
View
17 la/tests/io_test.py
@@ -192,6 +192,23 @@ def test_io_len(self):
io['y'] = y
self.assertTrue(len(io) == 2, 'number of keys is wrong')
+ def test_io_load_1(self):
+ "io.load_1"
+ d = larry([1,2,3])
+ la.save(self.filename, d, 'd')
+ a = la.load(self.filename, 'd')
+ assert_larry_equal(a, d)
+ la.io.delete(self.filename, 'd')
+
+ def test_io_load_2(self):
+ "io.load_2"
+ f = h5py.File(self.filename)
+ d = larry([1,2,3])
+ la.save(f, d, 'd')
+ a = la.load(f, 'd')
+ assert_larry_equal(a, d)
+ la.io.delete(f, 'd')
+
# nose tests ----------------------------------------------------------------
def datetime_test():
Please sign in to comment.
Something went wrong with that request. Please try again.