File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -727,21 +727,6 @@ class Person(pydantic.BaseModel):
727727class TestCallableEncodable :
728728 """Tests for CallableEncodable - encoding/decoding callables as SynthesizedFunction."""
729729
730- def test_bare_callable_allows_encode_but_not_decode (self ):
731- def add (a : int , b : int ) -> int :
732- return a + b
733-
734- # Bare Callable allows encoding
735- encodable = Encodable .define (Callable , {})
736- encoded = encodable .encode (add )
737- assert isinstance (encoded , SynthesizedFunction )
738- assert "def add" in encoded .module_code
739-
740- # But decode is disabled
741- with pytest .raises (TypeError , match = "Cannot decode/synthesize callable" ):
742- with handler (UnsafeEvalProvider ()):
743- encodable .decode (encoded )
744-
745730 def test_encode_decode_function (self ):
746731 def add (a : int , b : int ) -> int :
747732 return a + b
You can’t perform that action at this time.
0 commit comments