(self)
| 347 | class TestPathUsage: |
| 348 | # Test that pathlib.Path can be used |
| 349 | def test_tofile_fromfile(self): |
| 350 | with temppath(suffix='.bin') as path: |
| 351 | path = Path(path) |
| 352 | np.random.seed(123) |
| 353 | a = np.random.rand(10).astype('f8,i4,S5') |
| 354 | a[5] = (0.5, 10, 'abcde') |
| 355 | with path.open("wb") as fd: |
| 356 | a.tofile(fd) |
| 357 | x = np._core.records.fromfile( |
| 358 | path, formats='f8,i4,S5', shape=10 |
| 359 | ) |
| 360 | assert_array_equal(x, a) |
| 361 | |
| 362 | |
| 363 | class TestRecord: |
nothing calls this directly
no test coverage detected