# HG changeset patch # User Pierre-Yves David # Date 1625249922 -7200 # Node ID 2dac94edd98dc0da50466759c7fc2299ea037648 # Parent f03e9d30258e5b73f43b73ba770a7b9cdc6b5bdc testing: fix _timeout_factor With `--debug`, `run-tests.py` set the timeout to 0... that breaks the logic in `mercurial.testing`. Differential Revision: https://phab.mercurial-scm.org/D10937 diff -r f03e9d30258e -r 2dac94edd98d mercurial/testing/__init__.py --- a/mercurial/testing/__init__.py Sat Jul 03 10:21:16 2021 +0300 +++ b/mercurial/testing/__init__.py Fri Jul 02 20:18:42 2021 +0200 @@ -16,8 +16,10 @@ def _timeout_factor(): """return the current modification to timeout""" - default = int(environ.get('HGTEST_TIMEOUT_DEFAULT', 1)) + default = int(environ.get('HGTEST_TIMEOUT_DEFAULT', 360)) current = int(environ.get('HGTEST_TIMEOUT', default)) + if current == 0: + return 1 return current / float(default)