-
main code: RE_pytho.py test code: Python_unitTest.py
-
a)
- matched the given regular expression with the url string
- if result is None then raise Exception else Pass
b) I Changed the regular expression to set the size of the port to {3,5}
c) I've assumed that the given regular expression is correct and satisfies all the valid urls. If I had more time then I would have thought of url's which might not satisfy the given regular expression and update regular expression accordingly
d) The first objective to have the website url "remembered" was confusing to me. This objective is independent of the second objective. Therefore, I understood that the url string is constant and is not user defined and is a successful scenario always. The successful scenario is the dummy website given in the problem statement.
ashishiit / illumio-coding-test Goto Github PK
View Code? Open in Web Editor NEWillumio coding challenge