python lambda doesn't match expression lambda #2425
Unanswered
DominicKauschinger
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
Pythonnet version: 3.0.3
Python version: 3.9.6
Operating System: win 10
.NET Runtime: 4.6.1
Details
I tried to match a c# method that takes an Expression to a lambda function from python but that doesnt work.
In C# this Expression can be created by an expression lambda:
Mock.Arrange(() => mock.Message(Arg.IsAny<string>(), Arg.IsAny<TestMessageSeverity>())).DoInstead(func);But in python this code doesn't match with the method/overload above:
Mock.Arrange.__overloads__[Expression[Action]](lambda: mock.Message("Hello", TestMessageSeverity.Info)).DoInstead(logger)Is there any way to match to an Expression Lambda from python?
Beta Was this translation helpful? Give feedback.
All reactions