The default timeout value is 30 seconds, but you are able to change it globally or per expect return. Upon timeout it will raise an exception which you could handle as you wish.
Good video only one comment. I started by looking at the documentation but as is often true the documentation is not written in manor that is easy to understand for someone just learning python. If I had a dollar for every WTF I exclaimed while trying to understand the documentation, I'd be rich! So looking at difficult to interpret documentation is often, not very helpfull. Which is how I came to look for videos on pexpect and landed on yours. I did on the other hand find your video clear and easy to follow and devoid of expressions of WTF. Thank you.