Separate the test for packbits against empty arrays
@@ -24,7 +24,6 @@ class TestPacking(unittest.TestCase):
return xp.unpackbits(a)
def test_packbits(self):
- self.check_packbits([])
self.check_packbits([0])
self.check_packbits([1])
self.check_packbits([0, 1])
@@ -32,6 +31,10 @@ class TestPacking(unittest.TestCase):
self.check_packbits([1, 0, 1, 1, 0, 1, 1, 1, 1])
self.check_packbits(numpy.arange(24).reshape((2, 3, 4)) % 2)
+ @testing.with_requires('numpy>=1.12')
+ def test_packbits_empty(self):
+ self.check_packbits([])
+
def test_unpackbits(self):
self.check_unpackbits([])
self.check_unpackbits([0])
