sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #47829
Re: [Question #671096]: unit testing: how to handle exceptions and continue in case of failures
Question #671096 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/671096
Status: Open => Answered
RaiMan proposed the following answer:
as mentioned: you have to learn some basic Python.
--- except exception e:
is not valid (syntax error!)
--- even when using
except Exception as e: (which is correct)
this does not help, since FindFailed is not a subclass of Exception.
so either:
except:
or:
except FindFailed:
But as also mentioned:
--- using exists() is much more elegant and transparent
--- your Unittest setup is not according to the rules
so make your homework and come back after having really tracked down your problems.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.