Skip to content
Browse files

ENH Unit tests for new input check.

  • Loading branch information...
1 parent b1285e8 commit c583f884b37bf0275b3e55b85f80a8d520243157 @VSTeam VSTeam committed
Showing with 9 additions and 3 deletions.
  1. +2 −2 README.rst
  2. +7 −1 la/tests/flarry_test.py
View
4 README.rst
@@ -118,9 +118,9 @@ After you have installed ``la``, run the suite of unit tests::
>>> import la
>>> la.test()
<snip>
- Ran 3059 tests in 1.408s
+ Ran 3061 tests in 1.408s
OK
- <nose.result.TextTestResult run=3059 errors=0 failures=0>
+ <nose.result.TextTestResult run=3061 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
8 la/tests/flarry_test.py
@@ -10,7 +10,7 @@
from la import larry, rand
from la import (union, intersection, panel, stack, cov, align, isaligned,
binaryop, add, subtract, multiply, divide, unique, sortby,
- align_axis, lrange, ones, zeros)
+ align_axis, lrange, ones, zeros, empty)
from la.util.testing import assert_larry_equal as ale
@@ -684,6 +684,12 @@ def test_lrange_4(self):
d = larry([[0, 1], [2, 3]], [['a', 'b'], ['c', 'd']])
ale(a, d, "lrange failed.")
+ def test_lrange_5(self):
+ self.failUnlessRaises(ValueError, lrange, (2,), ['a', 'b', 'c'])
+
+ def test_empty_1(self):
+ self.failUnlessRaises(ValueError, empty, (2,), ['a', 'b', 'c'])
+
def test_ones_1(self):
a = ones(5)
d = larry([1., 1., 1., 1., 1.])

0 comments on commit c583f88

Please sign in to comment.
Something went wrong with that request. Please try again.