diff options
Diffstat (limited to 'scripts/test')
-rw-r--r-- | scripts/test/shared.py | 4 | ||||
-rw-r--r-- | scripts/test/support.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index e0a51a73a..ac9a408b6 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -315,7 +315,7 @@ class Py2CalledProcessError(subprocess.CalledProcessError): def run_process(cmd, check=True, input=None, capture_output=False, decode_output=True, *args, **kw): - if input and type(input) == str: + if input and type(input) is str: input = bytes(input, 'utf-8') if capture_output: kw['stdout'] = subprocess.PIPE @@ -358,7 +358,7 @@ def fail_if_not_contained(actual, expected): def fail_if_not_identical_to_file(actual, expected_file): - binary = expected_file.endswith(".wasm") or type(actual) == bytes + binary = expected_file.endswith(".wasm") or type(actual) is bytes with open(expected_file, 'rb' if binary else 'r') as f: fail_if_not_identical(actual, f.read(), fromfile=expected_file) diff --git a/scripts/test/support.py b/scripts/test/support.py index 43bd00fe8..a41fee227 100644 --- a/scripts/test/support.py +++ b/scripts/test/support.py @@ -170,7 +170,7 @@ def split_wast(wastFile): # write a split wast from split_wast. the wast may be binary if the original # file was binary def write_wast(filename, wast, asserts=[]): - if type(wast) == bytes: + if type(wast) is bytes: assert not asserts with open(filename, 'wb') as o: o.write(wast) @@ -182,7 +182,7 @@ def write_wast(filename, wast, asserts=[]): def run_command(cmd, expected_status=0, stderr=None, expected_err=None, err_contains=False, err_ignore=None): if expected_err is not None: - assert stderr == subprocess.PIPE or stderr is None,\ + assert stderr == subprocess.PIPE or stderr is None, \ "Can't redirect stderr if using expected_err" stderr = subprocess.PIPE print('executing: ', ' '.join(cmd)) |