diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2020-04-15 09:51:45 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2020-04-15 09:51:45 +0200 |
commit | a6799b242c0abd6a9dfbf1e98742b2b922205ebf (patch) | |
tree | 89d3c5330ec4cae28f39c64c6a343caa5b6a868b /tests/test_overrides_gio.py | |
parent | 9cdbc56fbac4db2de78dc080934b8f0a7efc892a (diff) | |
download | pygobject-a6799b242c0abd6a9dfbf1e98742b2b922205ebf.tar.gz |
Remove all Python 2 Python code
Diffstat (limited to 'tests/test_overrides_gio.py')
-rw-r--r-- | tests/test_overrides_gio.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_overrides_gio.py b/tests/test_overrides_gio.py index 8612d51e..de0e2352 100644 --- a/tests/test_overrides_gio.py +++ b/tests/test_overrides_gio.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import random import platform import warnings @@ -8,7 +6,6 @@ import pytest from gi.repository import Gio, GObject from gi import PyGIWarning -from gi._compat import cmp class Item(GObject.Object): @@ -42,6 +39,7 @@ def test_list_store_sort(): assert list(args) == user_data assert isinstance(a, NamedItem) assert isinstance(b, NamedItem) + cmp = lambda a, b: (a > b) - (a < b) return cmp(a.props.name, b.props.name) store[:] = items @@ -61,6 +59,7 @@ def test_list_store_insert_sorted(): assert list(args) == user_data assert isinstance(a, NamedItem) assert isinstance(b, NamedItem) + cmp = lambda a, b: (a > b) - (a < b) return cmp(a.props.name, b.props.name) for item in items: |