equal
deleted
inserted
replaced
1 import doctest, tempfile, os, sys |
1 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) |