MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_operators_notimplemented

Function test_operators_notimplemented

tests/test_operator_overloading.py:94–101  ·  view source on GitHub ↗

#393: need to return NotSupported to ensure correct arithmetic operator behavior

()

Source from the content-addressed store, hash-verified

92 env.GRAALPY and env.GRAALPY_VERSION < (24, 2), reason="Fixed in GraalPy 24.2"
93)
94def test_operators_notimplemented():
95 """#393: need to return NotSupported to ensure correct arithmetic operator behavior"""
96
97 c1, c2 = m.C1(), m.C2()
98 assert c1 + c1 == 11
99 assert c2 + c2 == 22
100 assert c2 + c1 == 21
101 assert c1 + c2 == 12
102
103
104def test_nested():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected