summaryrefslogtreecommitdiff
path: root/logilab/common/pytest.py
diff options
context:
space:
mode:
Diffstat (limited to 'logilab/common/pytest.py')
-rw-r--r--logilab/common/pytest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/logilab/common/pytest.py b/logilab/common/pytest.py
index c644a61..5c62816 100644
--- a/logilab/common/pytest.py
+++ b/logilab/common/pytest.py
@@ -115,7 +115,7 @@ FILE_RESTART = ".pytest.restart"
import os, sys, re
import os.path as osp
-from time import time, clock
+from time import process_time, time
import warnings
import types
import inspect
@@ -385,7 +385,7 @@ class PyTester(object):
print((' %s ' % osp.basename(filename)).center(70, '='),
file=sys.__stderr__)
try:
- tstart, cstart = time(), clock()
+ tstart, cstart = time(), process_time()
try:
testprog = SkipAwareTestProgram(modname, batchmode=batchmode, cvg=self.cvg,
options=self.options, outstream=sys.stderr)
@@ -406,7 +406,7 @@ class PyTester(object):
traceback.print_exc(file=sys.stderr)
return None
- tend, cend = time(), clock()
+ tend, cend = time(), process_time()
ttime, ctime = (tend - tstart), (cend - cstart)
self.report.feed(filename, testprog.result, ttime, ctime)
return testprog
@@ -515,10 +515,10 @@ class DjangoTester(PyTester):
file=sys.stderr)
try:
try:
- tstart, cstart = time(), clock()
+ tstart, cstart = time(), process_time()
self.before_testfile()
testprog = SkipAwareTestProgram(modname, batchmode=batchmode, cvg=self.cvg)
- tend, cend = time(), clock()
+ tend, cend = time(), process_time()
ttime, ctime = (tend - tstart), (cend - cstart)
self.report.feed(filename, testprog.result, ttime, ctime)
return testprog