You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need a reset for used spy or mock for continus testing without creating a new one
Describe the solution you'd like
func test_reset():
var instance :Node = auto_free(Node.new())
var spy_node = spy(instance)
# call with different arguments
spy_node.set_process(false) # 1 times
spy_node.set_process(true) # 1 times
spy_node.set_process(true) # 2 times
verify(spy_node, 2).set_process(true)
verify(spy_node, 1).set_process(false)
# now reset the spy
reset(spy_node)
# verify all counters are rested
verify_no_interactions(spy_node)
This will help a very lot to test different use cases on one spy or mock objet in a single test
The text was updated successfully, but these errors were encountered:
I need a reset for used spy or mock for continus testing without creating a new one
Describe the solution you'd like
This will help a very lot to test different use cases on one spy or mock objet in a single test
The text was updated successfully, but these errors were encountered: