summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-05-28 20:28:30 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-05-28 20:28:30 (GMT)
commit13c6f4b75308666a589330c0a5ccb6a57672a407 (patch)
treea4027c6dd166199e40cd9c0044abc7522a0c3026
parentfd48ebfeb806014059322b7905217118a4841c2e (diff)
downloadSCons-13c6f4b75308666a589330c0a5ccb6a57672a407.zip
SCons-13c6f4b75308666a589330c0a5ccb6a57672a407.tar.gz
SCons-13c6f4b75308666a589330c0a5ccb6a57672a407.tar.bz2
PY2/3 add support for specifying newline mode to file reads for tests
-rw-r--r--QMTest/TestCommon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/QMTest/TestCommon.py b/QMTest/TestCommon.py
index c1adc37..a475ddc 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: