Use TypeError instead of AssertionError for no sequence
Improve/extends tests.
This commit is contained in:
@@ -1430,7 +1430,8 @@ class LineMatcher:
|
||||
:param str match_nickname: the nickname for the match function that
|
||||
will be logged to stdout when a match occurs
|
||||
"""
|
||||
assert isinstance(lines2, collections.abc.Sequence)
|
||||
if not isinstance(lines2, collections.abc.Sequence):
|
||||
raise TypeError("invalid type for lines2: {}".format(type(lines2).__name__))
|
||||
lines2 = self._getlines(lines2)
|
||||
lines1 = self.lines[:]
|
||||
nextline = None
|
||||
|
||||
Reference in New Issue
Block a user