Raise test coverage to 100%
jugmac00 opened this issue · 6 comments
While test coverage is already at a very good 93%, the PR #84 alone would have brought two regressions (changed log level + no more help text), as there are still some lines without coverage.
I suggest to fill the coverage gaps before continuing to work on the current open PRs.
I tried to come up with a test for...
Lines 41 to 47 in d29d976
I even wrote a helper to iterate over date/time ranges, but I found no value which fails for the try block and succeeds for the except block.
The change was introduced in be35566
@Beercow @petri Maybe you know or remember why this try/except statement was introduced in the first place?
I don't remember. But I bet this is related: https://stackoverflow.com/questions/10849717/what-is-the-significance-of-january-1-1601
Hi @Beercow
thank you very much for getting back to me.
As you seem to have some more domain knowledge in this topic, could you give me a microsecond number which is too large, but fits the condition in the except branch?
microseconds = ft / 10
return (datetime(1601, 1, 1) + timedelta(microseconds=microseconds))
As I wrote above, I did not find a number on my own.
Here is the complete code snippet:
Lines 41 to 47 in f81554d
Maybe this is simply to overcome the fact that the max for python timestamps and dates is different? https://stackoverflow.com/questions/39153700/why-cant-pythons-datetime-max-survive-a-round-trip-through-timestamp-fromtim
Unfortunately, I do not have the file I was working with anymore. Trying to find one that brings up the error.