Closed cbrnr closed 7 months ago
I like the idea! Not sure how to best test this though :thinking:
Hm, good question. But it is so simple that maybe there's no need for a test?
We can assume that it works, yes. I'd prefer to have a test to avoid inadvertently breaking the behavior in the future though.
I agree. If tilde resolves to a directory on the test runners that we can use, we can write a test.
PS: I'd also throw in .resolve()
to resolve symlinks, WDYT?
Maybe we can use the error message in a test. If it still contains a ~
, it didn't get expanded. If it doesn't contain a ~
, expansion worked.
If the path provided to
edfio.read_edf()
contains a~
, I get aFileNotFoundError
. The reason is that the tilde is not expanded to the user's home directory. I think it would be useful if the function expanded paths internally.