summaryrefslogtreecommitdiff
path: root/QMTest
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-05-28 13:28:30 -0700
committerWilliam Deegan <bill@baddogconsulting.com>2017-05-28 13:28:30 -0700
commit95156ab89b78cfbfcf1df79fb705dbeb7200e77e (patch)
treea4027c6dd166199e40cd9c0044abc7522a0c3026 /QMTest
parentaf45ebd94e58b341fdc38aa7b49dd5e92ce58087 (diff)
downloadscons-95156ab89b78cfbfcf1df79fb705dbeb7200e77e.tar.gz
PY2/3 add support for specifying newline mode to file reads for tests
Diffstat (limited to 'QMTest')
-rw-r--r--QMTest/TestCommon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/QMTest/TestCommon.py b/QMTest/TestCommon.py
index c1adc376..a475ddc6 100644
--- a/QMTest/TestCommon.py
+++ b/QMTest/TestCommon.py
@@ -469,13 +469,13 @@ class TestCommon(TestCmd):
print("Missing one of: `%s'" % "', `".join(missing))
self.fail_test(missing)
- def must_match(self, file, expect, mode = 'rb', match=None, message=None):
+ def must_match(self, file, expect, mode = 'rb', match=None, message=None, newline=None):
"""Matches the contents of the specified file (first argument)
against the expected contents (second argument). The expected
contents are a list of lines or a string which will be split
on newlines.
"""
- file_contents = self.read(file, mode)
+ file_contents = self.read(file, mode, newline)
if not match:
match = self.match
try: