Message12394
I beefed up test_dict_jy to test more thoroughly the behaviour of Java containers exposed as Python mapping types equivalent to dict(). This was initially just in aid of #2649, but revealed a few other warts.
At the time of writing, the beefed-up test is not in the repository, but I'll do that in the next few days, with skips in place citing this issue. I haven't analysed the causes yet, but the added tests produce:
======================================================================
ERROR: test_has_key (__main__.JavaHashtableDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict.py", line 73, in test_has_key
k.sort()
AttributeError: 'java.util.Hashtable$Enumerator' object has no attribute 'sort'
======================================================================
ERROR: test_repr_value_None (__main__.JavaHashtableDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict_jy.py", line 265, in test_repr_value_None
x = self._class({1:None})
NullPointerException: java.lang.NullPointerException
======================================================================
ERROR: test_has_key (__main__.JavaConcurrentHashMapDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict.py", line 73, in test_has_key
k.sort()
AttributeError: 'java.util.concurrent.ConcurrentHashMap$KeyIterator' object has no attribute 'sort'
======================================================================
ERROR: test_repr_value_None (__main__.JavaConcurrentHashMapDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict_jy.py", line 265, in test_repr_value_None
x = self._class({1:None})
NullPointerException: java.lang.NullPointerException
======================================================================
FAIL: test_keys (__main__.JavaHashtableDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict.py", line 41, in test_keys
self.assertEqual(d.keys(), [])
AssertionError: java.util.Collections$EmptyEnumeration@1e495414 != []
======================================================================
FAIL: test_keys (__main__.JavaConcurrentHashMapDictTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\Jeff\Documents\Eclipse-O\jython-jvm9\dist\Lib\test\test_dict.py", line 41, in test_keys
self.assertEqual(d.keys(), [])
AssertionError: java.util.concurrent.ConcurrentHashMap$KeyIterator@62ea8931 != [] |
|
Date |
User |
Action |
Args |
2019-03-24 14:32:33 | jeff.allen | set | recipients:
+ jeff.allen |
2019-03-24 14:32:33 | jeff.allen | set | messageid: <1553437953.0.0.523462418088.issue2746@roundup.psfhosted.org> |
2019-03-24 14:32:32 | jeff.allen | link | issue2746 messages |
2019-03-24 14:32:32 | jeff.allen | create | |
|