##// END OF EJS Templates
tests: patch up silly new year's bug
tests: patch up silly new year's bug

File last commit:

r15434:5635a401 default
r15770:1f9f9b4c stable
Show More
heredoctest.py
16 lines | 392 B | text/x-python | PythonLexer
import doctest, tempfile, os, sys
if __name__ == "__main__":
if 'TERM' in os.environ:
del os.environ['TERM']
fd, name = tempfile.mkstemp(suffix='hg-tst')
try:
os.write(fd, sys.stdin.read())
os.close(fd)
failures, _ = doctest.testfile(name, module_relative=False)
if failures:
sys.exit(1)
finally:
os.remove(name)