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
If a global function is stubbed once and then the original function is restored through finish_spying, the same global function can not be stubbed again.
In test_foo_one, I have stubbed bar to return 1.
In test_foo_two, I have stubbed bar to return 2.
If both tests are run one after another, the first test passes and the second doesn't.
There was 1 failure:
1) Test_Foo::test_foo_two
Failed asserting that 0 matches expected 2.
The second one's bar is not stubbed and returns the original return value.
So a stubbed global function can not be re-stubbed properly.
Note: if the tests are run individually, both tests pass.
The text was updated successfully, but these errors were encountered:
If a global function is stubbed once and then the original function is restored through
finish_spying
, the same global function can not be stubbed again.For example,
In
test_foo_one
, I have stubbedbar
to return 1.In
test_foo_two
, I have stubbedbar
to return 2.If both tests are run one after another, the first test passes and the second doesn't.
The second one's
bar
is not stubbed and returns the original return value.So a stubbed global function can not be re-stubbed properly.
Note: if the tests are run individually, both tests pass.
The text was updated successfully, but these errors were encountered: