From 58f64d39fa440ade6da064233857b91c859ecc83 Mon Sep 17 00:00:00 2001 From: Benedek Racz Date: Wed, 4 Sep 2019 12:58:38 +0200 Subject: [PATCH] [FIX] Deprecation of the time.clock() --- .travis.yml | 4 +++- wexpect.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ca56e9..dc64b61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ +language: python dist: xenial # required for Python >= 3.7 matrix: include: + - stage: test - os: windows language: sh python: "3.7" @@ -18,7 +20,7 @@ install: # command to run tests script: - - coverage run -m unittest + - tox # Push the results back to codecov after_success: diff --git a/wexpect.py b/wexpect.py index ae5db43..627b202 100644 --- a/wexpect.py +++ b/wexpect.py @@ -2319,7 +2319,7 @@ class Wtty: if self.__currentReadCo.Y > maxconsoleY: time.sleep(.2) - start = time.clock() + start = time.time() s = self.readConsoleToCursor() if self.__currentReadCo.Y > maxconsoleY: @@ -2334,7 +2334,7 @@ class Wtty: return '' time.sleep(0.001) - end = time.clock() + end = time.time() timeout -= end - start except Exception as e: