Revision f985ecbd qa/qa_utils.py
b/qa/qa_utils.py | ||
---|---|---|
123 | 123 |
raise qa_error.Error("%r in %r" % (item, sequence)) |
124 | 124 |
|
125 | 125 |
|
126 |
def AssertEqual(first, second): |
|
126 |
def AssertEqual(first, second, msg=""):
|
|
127 | 127 |
"""Raises an error when values aren't equal. |
128 | 128 |
|
129 | 129 |
""" |
130 | 130 |
if not first == second: |
131 |
raise qa_error.Error("%r == %r" % (first, second)) |
|
131 |
if msg: |
|
132 |
raise qa_error.Error("%s: %r == %r" % (msg, first, second)) |
|
133 |
else: |
|
134 |
raise qa_error.Error("%r == %r" % (first, second)) |
|
132 | 135 |
|
133 | 136 |
|
134 | 137 |
def AssertMatch(string, pattern): |
Also available in: Unified diff