SF patch 1167316:  doctest.py fails self-test if run directly.
SF patch 1167316:  doctest.py fails self-test if run directly.

Patch by Ilya Sandler.

Bugfix candidate.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator