diff options
author | njsmith <njs@pobox.com> | 2013-04-08 12:04:07 -0700 |
---|---|---|
committer | njsmith <njs@pobox.com> | 2013-04-08 12:04:07 -0700 |
commit | f85bdf48aadf7b5a5f575370b589805fed190a6c (patch) | |
tree | c84a165c4b3d10421744785ffe2803bc069b09ea /numpy/testing/utils.py | |
parent | 01aa27a436476d87c4d986a80225d23179eebb44 (diff) | |
parent | 011f8a20044a3982b2441cb53876e9689a3f6d0c (diff) | |
download | numpy-f85bdf48aadf7b5a5f575370b589805fed190a6c.tar.gz |
Merge pull request #3208 from charris/2to3-apply-repr-fixer
2to3: Apply `repr` fixer.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 234311689..cf35802ae 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -919,9 +919,9 @@ def assert_string_equal(actual, desired): import difflib if not isinstance(actual, str) : - raise AssertionError(`type(actual)`) + raise AssertionError(repr(type(actual))) if not isinstance(desired, str): - raise AssertionError(`type(desired)`) + raise AssertionError(repr(type(desired))) if re.match(r'\A'+desired+r'\Z', actual, re.M): return diff = list(difflib.Differ().compare(actual.splitlines(1), desired.splitlines(1))) diff_list = [] @@ -936,7 +936,7 @@ def assert_string_equal(actual, desired): l.append(d2) d2 = diff.pop(0) if not d2.startswith('+ ') : - raise AssertionError(`d2`) + raise AssertionError(repr(d2)) l.append(d2) d3 = diff.pop(0) if d3.startswith('? '): @@ -947,7 +947,7 @@ def assert_string_equal(actual, desired): continue diff_list.extend(l) continue - raise AssertionError(`d1`) + raise AssertionError(repr(d1)) if not diff_list: return msg = 'Differences in strings:\n%s' % (''.join(diff_list)).rstrip() |