diff options
Diffstat (limited to 'numpy/testing/noseclasses.py')
-rw-r--r-- | numpy/testing/noseclasses.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/testing/noseclasses.py b/numpy/testing/noseclasses.py index 05d244083..aae7c5da4 100644 --- a/numpy/testing/noseclasses.py +++ b/numpy/testing/noseclasses.py @@ -148,6 +148,21 @@ class NumpyOutputChecker(doctest.OutputChecker): if not ret: if "#random" in want: return True + + # it would be useful to normalize endianness so that + # bigendian machines don't fail all the tests (and there are + # actually some bigendian examples in the doctests). Let's try + # making them all little endian + got = got.replace("'>","'<") + want= want.replace("'>","'<") + + # try to normalize out 32 and 64 bit default int sizes + for sz in [4,8]: + got = got.replace("'<i%d'"%sz,"int") + want= want.replace("'<i%d'"%sz,"int") + + ret = doctest.OutputChecker.check_output(self, want, + got, optionflags) return ret |