diff options
author | Petr Viktorin <pviktori@redhat.com> | 2015-09-18 11:30:15 +0200 |
---|---|---|
committer | Tomas Babej <tbabej@redhat.com> | 2015-10-13 14:16:32 +0200 |
commit | 59d87d53b10a201ef03077c96011523bdd1342e8 (patch) | |
tree | d72834017dfef90e107cf3093beee9ede07a836b /ipatests/test_ipapython/test_ipautil.py | |
parent | 5ff4170ff9cab64d3527001de8214cb30439e3e3 (diff) | |
download | freeipa-59d87d53b10a201ef03077c96011523bdd1342e8.tar.gz freeipa-59d87d53b10a201ef03077c96011523bdd1342e8.tar.xz freeipa-59d87d53b10a201ef03077c96011523bdd1342e8.zip |
Do not compare types that are not comparable in Python 3
In Python 3, different types are generally not comparable (except for equality),
and None can't be compared to None.
Fix cases of these comparisons.
In ipatest.util, give up on sorting lists if the sorting raises a TypeError.
Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipatests/test_ipapython/test_ipautil.py')
-rw-r--r-- | ipatests/test_ipapython/test_ipautil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipatests/test_ipapython/test_ipautil.py b/ipatests/test_ipapython/test_ipautil.py index 609e1f0e5..e19cd2cb6 100644 --- a/ipatests/test_ipapython/test_ipautil.py +++ b/ipatests/test_ipapython/test_ipautil.py @@ -321,7 +321,7 @@ class TestCIDict(object): def test_fromkeys(self): dct = ipautil.CIDict.fromkeys(('A', 'b', 'C')) assert sorted(dct.keys()) == sorted(['A', 'b', 'C']) - assert sorted(dct.values()) == [None] * 3 + assert list(dct.values()) == [None] * 3 class TestTimeParser(object): |