diff options
-rwxr-xr-x | runtest.py | 12 | ||||
-rw-r--r-- | src/CHANGES.txt | 3 |
2 files changed, 11 insertions, 4 deletions
@@ -95,11 +95,12 @@ import time import threading try: # python3 from queue import Queue + PY3=True except ImportError as e: # python2 from Queue import Queue + PY3=False import subprocess - cwd = os.getcwd() baseline = 0 @@ -770,10 +771,13 @@ os.environ["python_executable"] = python # but time.time() does a better job on Linux systems, so let that be # the non-Windows default. -if sys.platform == 'win32': - time_func = time.clock +if PY3: + time_func = time.perf_counter else: - time_func = time.time + if sys.platform == 'win32': + time_func = time.clock + else: + time_func = time.time if print_times: print_time_func = lambda fmt, time: sys.stdout.write(fmt % time) diff --git a/src/CHANGES.txt b/src/CHANGES.txt index ab15214..27fe66a 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -123,6 +123,9 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE - fix must_contain tests for py3 - one swig test now checks for Python.h instead of failing - if test opens os.devnull, register with atexit so file opens do not leak. + - for py3, use time.perf_counter instead of depr time.clock, which is + used in win32 case for py2. py37 depr warnings were failing a bunch + of tests on windows since warn messes up expected stderr. From Hao Wu - typo in customized decider example in user guide |