tests: skip doctests that use `time.tzset()` on Windows...
tests: skip doctests that use `time.tzset()` on Windows
There's no way to conditionally skip the tests for a function (see the inline
feature request). That leaves us with the choice to either put the whole
`mercurial.utils.dateutil` module in the skip list of this script (but then this
script prints out the module as unexpectedly not tested, and misses a bunch of
tests that can be run), blacklist the test entirely (but that makes it harder to
work with on Windows), or use this hack to look for the statement that is
broken, and skip the test currently attached to one function.
(It appears that an example in the list of examples corresponds to a single
`>>>` block, and the `test` itself corresponds to a single function. So prescan
the examples, and skip all of them when the statement is found in any, since the
setup of setting the timezone has an effect on subsequent examples.)