(self)
| 323 | class TestPathUsage: |
| 324 | # Test that pathlib.Path can be used |
| 325 | def test_tofile_fromfile(self): |
| 326 | with temppath(suffix='.bin') as path: |
| 327 | path = Path(path) |
| 328 | np.random.seed(123) |
| 329 | a = np.random.rand(10).astype('f8,i4,a5') |
| 330 | a[5] = (0.5,10,'abcde') |
| 331 | with path.open("wb") as fd: |
| 332 | a.tofile(fd) |
| 333 | x = np.core.records.fromfile(path, |
| 334 | formats='f8,i4,a5', |
| 335 | shape=10) |
| 336 | assert_array_equal(x, a) |
| 337 | |
| 338 | |
| 339 | class TestRecord: |
nothing calls this directly
no test coverage detected