-
-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap the code that mocks the camera with a try-catch clause in the readme #375
Conversation
Wondering... Maybe we can create a helper function, that does that? Wrap code in a try catch and has a lambda to allow any needed interactions |
I think the best / right approach is to do |
What do you think about doing it in the Barista rule, @Sloy? |
Dunno. That's actually what the IntentsTestRule does. Taking a quick look at the code, I don't see anything that could break. I don't know if there's any performance impact though. But I don't really use the BaristaTestRule myself, so... go go go! 🥳 |
PS: We need to talk about BaristaTestRule, the Espresso's ActivityTestRule is now deprecated in favor of ActivityScenario. |
😱 🙀 |
Hey team! Is that an LGFM? 🤩 |
#402 relates to this. |
Thanks @alorma 😄 |
It happened to me that the code that performs something with the camera crashes, so the
release
is never called, so the next test fails because theinit
has been called twice without releasing it.Totally open for discussion, of course! But as it's a piece of code that we're aiming people to copy-paste...