Standalone test for staticmethod serialization.
()
| 224 | |
| 225 | |
| 226 | def test_staticmethod_serialization(): |
| 227 | """Standalone test for staticmethod serialization.""" |
| 228 | fory = pyfory.Fory(xlang=False, strict=False, ref=True, compatible=False) |
| 229 | |
| 230 | class A: |
| 231 | @staticmethod |
| 232 | def g(): |
| 233 | return "static_result" |
| 234 | |
| 235 | method = A.g |
| 236 | serialized = fory.serialize(method) |
| 237 | deserialized = fory.deserialize(serialized) |
| 238 | |
| 239 | assert method() == deserialized() |
| 240 | assert method() == "static_result" |
| 241 | |
| 242 | |
| 243 | # Global class method tests |
nothing calls this directly
no test coverage detected