Closed goodmami closed 8 months ago
The reason for errors in the tdl_test.py
file is that the testing file writes to disk without specifying an encoding. This isn't a bug in PyDelphin proper, just in the tests.
For the TSDB tests, the issue was similar in that the code is fine but the tests are buggy for Windows. In this case it's the use of Pathlib.Path.write_text() to write the testsuite files:
The write_text()
method does not allow one to specify the newline
parameter prior to Python 3.10 and it defaults to the system sequence. The solution here is to make a function that does a regular open
on the files with newline="\n"
.
I think it is true that TSDB database files invariably use \n
as line endings and never \r\n
, even on Windows systems, but I cannot find a definitive source for that at the moment.
It looks like newline issues are causing problems with running tests on windows:
This seems to affect the
tsdb
andtdl
tests.