# HG changeset patch # User Gregory Szorc # Date 1569785692 25200 # Node ID d75142ef054a160dd4f7cc1c557e7c5343299c0d # Parent e05c141511dd72563546d36a8fb666ff7086fabc tests: use silenttestrunner in test-simplemerge.py The time monkeypatching doesn't appear to work reliably in Python 3, possibly due to unittest using a different time function. This makes the test intermittent due to the execution time not always being `0.00s`. We have our own wrapper around unittest for more deterministic test output. So let's use it. As a bonus, all test output disappeared, so we can remove the .out file! Differential Revision: https://phab.mercurial-scm.org/D6921 diff -r e05c141511dd -r d75142ef054a tests/test-simplemerge.py --- a/tests/test-simplemerge.py Sun Sep 29 12:25:29 2019 -0700 +++ b/tests/test-simplemerge.py Sun Sep 29 12:34:52 2019 -0700 @@ -355,11 +355,5 @@ b'>>>>>>> THIS\r'.splitlines(True), list(m_lines)) if __name__ == '__main__': - # hide the timer - import time - orig = time.time - try: - time.time = lambda: 0 - unittest.main() - finally: - time.time = orig + import silenttestrunner + silenttestrunner.main(__name__) diff -r e05c141511dd -r d75142ef054a tests/test-simplemerge.py.out --- a/tests/test-simplemerge.py.out Sun Sep 29 12:25:29 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -................ ----------------------------------------------------------------------- -Ran 16 tests in 0.000s - -OK