-
Couldn't load subscription status.
- Fork 48
Cleanup PDL::IO::FITS tests, fix incorrect tests; fix regression in writing 0D ndarrays #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ng; fix temp file race conditions; fix tilde expansion test;
- Tests are now better isolated by using subtests and not reusing
variables between tests
- ile::Temp's automatic file unlinking is now used, rather than
explicitly unlinking the temp files
bugfixes;
- use of unique temporary file names could fail due to race conditions.
File::Temp creates the temporary file and returns a handle to it.
The file is detroyed when the handle is destroyed, and the filename
can then be reused by another process.
The code kept the name of the temporary file, but not the handle, so
the file was destroyed before the code could use it, and thus
a race condition could have ensued.
- the tilde expansion tests did not actually run
The tests should be skipped if the '~' expanded directory was not
writeable. The test for that was essentially
-w '~'
which checks for writeability of a path which is exactly the
character '~', not the expanded path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the changes noted. It's a bit surprising that you submitted this without (from the CI results) even running it locally.
Can you confirm in which version that used to work? It will need noting in |
Harsh, dude. No need for that. |
…he raw fits file Unify with/without Astro::FITS::Header tests for writing nullhdu, as patht/fits-noah.t takes care of running without Astro::FITS::Header. Scanning the raw fits file for expected COMMENT strings results in horrendous garbage output if the tests fail. Instead use rfitshdr to extract the header and scan the comments.
I know with certainty it worked back in 2.018. I'll try to track down the version where it changed. |
git bisect says 899a615. git bisect run script: |
t/fits.treorganization and fixes:Astro::FITS::HEADERwas installedFile::TempTests are now isolated into subtests, with no shared variables. The other issues were dealt with, but the level of header checking with and without
Astro::FITS::Headeris still quite asymmetric.bug fixes:
Astro::FITS::Headerwas available.regression fixes:
wfitscaused an internal crash, as the codeexpected they be at least 1D. This used to work.