(self, ua, ua_scalar, nbytes)
| 52 | """Check the creation of zero-valued arrays""" |
| 53 | |
| 54 | def content_check(self, ua, ua_scalar, nbytes): |
| 55 | |
| 56 | # Check the length of the unicode base type |
| 57 | assert_(int(ua.dtype.str[2:]) == self.ulen) |
| 58 | # Check the length of the data buffer |
| 59 | assert_(buffer_length(ua) == nbytes) |
| 60 | # Small check that data in array element is ok |
| 61 | assert_(ua_scalar == '') |
| 62 | # Encode to ascii and double check |
| 63 | assert_(ua_scalar.encode('ascii') == b'') |
| 64 | # Check buffer lengths for scalars |
| 65 | assert_(buffer_length(ua_scalar) == 0) |
| 66 | |
| 67 | def test_zeros0D(self): |
| 68 | # Check creation of 0-dimensional objects |
no test coverage detected