Show More
@@ -2,8 +2,12 b' import doctest, tempfile, os, sys' | |||
|
2 | 2 | |
|
3 | 3 | if __name__ == "__main__": |
|
4 | 4 | fd, name = tempfile.mkstemp(suffix='hg-tst') |
|
5 | os.write(fd, sys.stdin.read()) | |
|
6 | os.close(fd) | |
|
7 | failures, _ = doctest.testfile(name, module_relative=False) | |
|
8 | if failures: | |
|
9 | sys.exit(1) | |
|
5 | ||
|
6 | try: | |
|
7 | os.write(fd, sys.stdin.read()) | |
|
8 | os.close(fd) | |
|
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