We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbd7c59 commit ea69dc5Copy full SHA for ea69dc5
extra_tests/snippets/stdlib_array.py
@@ -101,6 +101,7 @@ def test_array_frombytes():
101
102
test_str = '🌉abc🌐def🌉🌐'
103
u = array('u', test_str)
104
-assert u.__reduce_ex__(1)[1][1] == list(test_str)
105
-assert str(loads(dumps(u, 1))) == f"array('u', '{test_str}')"
106
-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)
107
+ assert loads(dumps(u, 1)) == loads(dumps(u, 3))
stdlib/src/array.rs
@@ -13,7 +13,7 @@ mod array {
13
use crate::vm::{
14
builtins::{
15
PyByteArray, PyBytes, PyBytesRef, PyDictRef, PyFloat, PyInt, PyIntRef, PyList,
16
- PyListRef, PySliceRef, PyStr, PyStrRef, PyTupleRef, PyTypeRef,
+ PyListRef, PySliceRef, PyStr, PyStrRef, PyTypeRef,
17
},
18
class_or_notimplemented,
19
function::{
@@ -28,8 +28,8 @@ mod array {
28
AsBuffer, AsMapping, Comparable, Iterable, IteratorIterable, PyComparisonOp,
29
SlotConstructor, SlotIterator,
30
31
- IdProtocol, PyComparisonValue, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject,
32
- TypeProtocol, VirtualMachine,
+ IdProtocol, PyComparisonValue, PyObjectRef, PyObjectWrap, PyRef, PyResult, PyValue,
+ TryFromObject, TypeProtocol, VirtualMachine,
33
};
34
use crossbeam_utils::atomic::AtomicCell;
35
use itertools::Itertools;
0 commit comments