GeneralFunctions: Difference between revisions

 
Line 49: Line 49:
Return True if two URLs are functionally equal
Return True if two URLs are functionally equal
* converts special characters to character code found in URLs (ex: space => %20) before testing if they are equal.
* converts special characters to character code found in URLs (ex: space => %20) before testing if they are equal.
== Exception Handling ==
=== saveException(exceptionKey, exceptionMsg, exceptionList, exceptionCounts) ===
Saves exception messages into exception list and exception type count
* ''exceptionKey'' - type of exception.  used as is a key into ''exceptionCounts'' dictionary
* ''exceptionMsg'' - information about the particular exception, such as values and testcase breadcrumb
* ''exceptionList'' - list of exceptions, assumed to be of type list. ''exceptionKey'' and ''exceptionMsg'' are concatenated together and appended to the list.
* ''exceptionCounts'' - count of exception types, assumed to be a dictionary. the entry with a key of ''exceptionKey'' is incremented by 1.  if an entry with the key does not exist, an entry is created as initialized to 1.
=== fatalException(exceptionKey, exceptionMsg, exceptionList, exceptionCounts) ===
Handle fatal exception
* Calls saveException().  Prints last exception.  Ends program by raising AssertionError.
1,072

edits