[pygobject/pygobject-3-32] tests: remove usage of time.clock(), no longer available in py3.8
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/pygobject-3-32] tests: remove usage of time.clock(), no longer available in py3.8
- Date: Thu, 13 Jun 2019 18:56:28 +0000 (UTC)
commit 1c78286f8aef7ed411efc159a7abb1edcf744102
Author: Christoph Reiter <reiter christoph gmail com>
Date: Fri Jun 7 16:28:54 2019 +0200
tests: remove usage of time.clock(), no longer available in py3.8
tests/test_overrides_gtk.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py
index 627d5760..d96d8fe8 100644
--- a/tests/test_overrides_gtk.py
+++ b/tests/test_overrides_gtk.py
@@ -6,10 +6,10 @@ from __future__ import absolute_import
import contextlib
import unittest
-import time
import sys
import gc
import warnings
+import timeit
import pytest
@@ -2260,12 +2260,12 @@ class TestTreeModel(unittest.TestCase):
model = Gtk.ListStore(int, str)
iterations = 2000
- start = time.clock()
+ start = timeit.default_timer()
i = iterations
while i > 0:
model.append([1, 'hello'])
i -= 1
- end = time.clock()
+ end = timeit.default_timer()
sys.stderr.write('[%.0f µs/append] ' % ((end - start) * 1000000 / iterations))
def test_filter_new_default(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]