Closed drew-parsons closed 3 years ago
Fixed in commit 1444936 in the main
branch. It had nothing to do with files, but instead had to do with numpy requiring titles in dtypes to be unique. This is now fixed.
The test isn't in the 0.1.x
branch at all, so no commit needs to be done there. Given that debian is packaging the 0.1.x branch, I have no clue why this error is turning up in the debian packaging when running the tests. The unit test in question tests functionality added to the main branch only, not the legacy 0.1.x branch (specifically, testing the marshalling of numpy.dtype
objects). It frankly is not a surprise that things are going wrong with code mixed from both branches.
Thanks Freja, commit #1444936 seems to be working fine for us.
The Debian code wasn't mixed, it was a snapshot of the main branch at June 2020. I took the snapshot because it fixed some documentation issues that were causing the old release to fail to build.
Test failure was reported against the Debian build at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=971806
test_write_readback.TestMatlabFormat.test_dtype_structured_with_offsets_titles fails, occasionally:
The test does not always fail. Since the failure involves a filename clash on a randomly generated file, it seems the test algorithm is not robust with respect to repetition of the randomly generated number.
If the number is generated with
random.randint(1, 100)
then you might expect test failure due to filename clash "1%" of the time. I'm not certain this is the root problem since a numpy ValueError is also involved. But if it is just the randomly generated filename causing the problem, then some validation should be added to ensure the same filename is not generated twice. Or alternatively use the tempfile API which already ensures file uniqueness, https://docs.python.org/3/library/tempfile.html