This commit fix three test cases in test_index.py
* SeqTestCase.test_index
* SeqTestCase.test_wrappers
* ListTestCase.test_setdelitem
All these three cases' failures were caused by not supporting classes
that override __index__ operator when indexing sequence type.
This commit implement almost same routine with PR(#2807) which also did not
support classes which override __index__ operator in range indexing.
Signed-off-by: snowapril <sinjihng@gmail.com>
This commit fix RangeTestCase.test_range test in test_index.py
TryFromObject implementation for RangeIndex enum did not cover classes
that override __index__ operator which cpython implementation is currently providing
(https://docs.python.org/3.8/library/operator.html#operator.__index__)
I add codes that cover upper case using vm.to_index method.
Signed-off-by: snowapril <sinjihng@gmail.com>
- add a special_retrieve fudge function to the PyValue trait
- define the special_retrieve function for PyInt
- remove blocks on successful tests to reflect effect of changes