Show More
@@ -43,7 +43,17 b' def testmod(name, optionflags=0, testtar' | |||||
43 | checker = py3docchecker() |
|
43 | checker = py3docchecker() | |
44 | runner = doctest.DocTestRunner(checker=checker, optionflags=optionflags) |
|
44 | runner = doctest.DocTestRunner(checker=checker, optionflags=optionflags) | |
45 | for test in finder.find(mod, name): |
|
45 | for test in finder.find(mod, name): | |
46 | runner.run(test) |
|
46 | # Windows doesn't have time.tzset(), so skip methods that invoke it in | |
|
47 | # a doctest, without hardcoding the function name. There is a feature | |||
|
48 | # request for adding syntax to the test itself to conditionally skip | |||
|
49 | # that would make this unnecessary: | |||
|
50 | # | |||
|
51 | # https://github.com/python/cpython/issues/117364 | |||
|
52 | for example in test.examples: | |||
|
53 | if os.name == 'nt' and 'time.tzset()' in example.source: | |||
|
54 | break | |||
|
55 | else: | |||
|
56 | runner.run(test) | |||
47 | runner.summarize() |
|
57 | runner.summarize() | |
48 |
|
58 | |||
49 |
|
59 |
General Comments 0
You need to be logged in to leave comments.
Login now