This commit is contained in:
Benedikt Bartscher 2024-10-31 21:23:05 +01:00
parent 9bcb1c073d
commit 909ed8ca9b
No known key found for this signature in database

View File

@ -3400,11 +3400,6 @@ def test_fallback_pickle():
assert isinstance(unpickled_state2._g, type(threading.Lock())) assert isinstance(unpickled_state2._g, type(threading.Lock()))
# Some object, like generator, are still unpicklable with dill. # Some object, like generator, are still unpicklable with dill.
state._g = (i for i in range(10))
pk = state._serialize()
assert len(pk) == 0
with pytest.raises(EOFError):
BaseState._deserialize(pk)
state3 = DillState(_reflex_internal_init=True) # type: ignore state3 = DillState(_reflex_internal_init=True) # type: ignore
state3._g = (i for i in range(10)) state3._g = (i for i in range(10))
pk3 = state3._serialize() pk3 = state3._serialize()