remove test that fail on CPython

This commit is contained in:
Kangzhi Shi
2021-10-07 10:14:50 +02:00
parent cbd7c59329
commit ea69dc53d2
2 changed files with 7 additions and 6 deletions

View File

@@ -101,6 +101,7 @@ with assert_raises(IndexError):
test_str = '🌉abc🌐def🌉🌐'
u = array('u', test_str)
assert u.__reduce_ex__(1)[1][1] == list(test_str)
assert str(loads(dumps(u, 1))) == f"array('u', '{test_str}')"
assert loads(dumps(u, 1)) == loads(dumps(u, 3))
# skip as 2 bytes character enviroment with CPython is failing the test
if u.itemsize >= 4:
assert u.__reduce_ex__(1)[1][1] == list(test_str)
assert loads(dumps(u, 1)) == loads(dumps(u, 3))

View File

@@ -13,7 +13,7 @@ mod array {
use crate::vm::{
builtins::{
PyByteArray, PyBytes, PyBytesRef, PyDictRef, PyFloat, PyInt, PyIntRef, PyList,
PyListRef, PySliceRef, PyStr, PyStrRef, PyTupleRef, PyTypeRef,
PyListRef, PySliceRef, PyStr, PyStrRef, PyTypeRef,
},
class_or_notimplemented,
function::{
@@ -28,8 +28,8 @@ mod array {
AsBuffer, AsMapping, Comparable, Iterable, IteratorIterable, PyComparisonOp,
SlotConstructor, SlotIterator,
},
IdProtocol, PyComparisonValue, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject,
TypeProtocol, VirtualMachine,
IdProtocol, PyComparisonValue, PyObjectRef, PyObjectWrap, PyRef, PyResult, PyValue,
TryFromObject, TypeProtocol, VirtualMachine,
};
use crossbeam_utils::atomic::AtomicCell;
use itertools::Itertools;