##// END OF EJS Templates
tests: remove temp doctest file when finished running it
Idan Kamara -
r15247:3cd1605e default
parent child Browse files
Show More
@@ -2,8 +2,12 b' import doctest, tempfile, os, sys'
2
2
3 if __name__ == "__main__":
3 if __name__ == "__main__":
4 fd, name = tempfile.mkstemp(suffix='hg-tst')
4 fd, name = tempfile.mkstemp(suffix='hg-tst')
5 os.write(fd, sys.stdin.read())
5
6 os.close(fd)
6 try:
7 failures, _ = doctest.testfile(name, module_relative=False)
7 os.write(fd, sys.stdin.read())
8 if failures:
8 os.close(fd)
9 sys.exit(1)
9 failures, _ = doctest.testfile(name, module_relative=False)
10 if failures:
11 sys.exit(1)
12 finally:
13 os.remove(name)
General Comments 0
You need to be logged in to leave comments. Login now