tempfile.TemporaryDirectory() does not create a directory, it creates an object that will create a directory when "enetered", so it needs to be used with a with statement or with an explicit enter. On the other hand with tempfile.NamedTemporaryFile as destfile opens destfile, so we if want to create a file with destfile.name, we need to close destfile first. On my windows pc all of these threw up errors 100% of the time, so there is some platform variation in how forgiving all this temp file stuff is. I believe I've switch to more correct uses of the API. Also in some cases the same temprorary dir was used twice in a row, so I used two different dirs.
test_ljh_copy_and_append_traces fails on windows with the error
Where you can see that I've used the debugger to print out timestamp_usec which is negative. <Q is for unsigned ints, so it throws an error. Since this has long passed linux and our automated testing, I'm not going to to try just submitting this as a PR and see if it passes on github actions.
tempfile.TemporaryDirectory()
does not create a directory, it creates an object that will create a directory when "enetered", so it needs to be used with awith
statement or with an explicit enter. On the other handwith tempfile.NamedTemporaryFile as destfile
opensdestfile
, so we if want to create a file withdestfile.name
, we need to closedestfile
first. On my windows pc all of these threw up errors 100% of the time, so there is some platform variation in how forgiving all this temp file stuff is. I believe I've switch to more correct uses of the API. Also in some cases the same temprorary dir was used twice in a row, so I used two different dirs.test_ljh_copy_and_append_traces
fails on windows with the errorWhere you can see that I've used the debugger to print out
timestamp_usec
which is negative.<Q
is for unsigned ints, so it throws an error. Since this has long passed linux and our automated testing, I'm not going to to try just submitting this as a PR and see if it passes on github actions.