summaryrefslogtreecommitdiff
path: root/numpy/testing/noseclasses.py
diff options
context:
space:
mode:
authorPaul Ivanov <paul.ivanov@local>2009-12-28 20:49:52 +0000
committerPaul Ivanov <paul.ivanov@local>2009-12-28 20:49:52 +0000
commite4f233ecfedd2aafa258db2d3ae27e30604cc020 (patch)
tree6d32fbdd19b8dca00cd7cafd8df076bac55ddfd8 /numpy/testing/noseclasses.py
parent5ba01996a9ab2fdfb7c120a5afae801f854a781a (diff)
downloadnumpy-e4f233ecfedd2aafa258db2d3ae27e30604cc020.tar.gz
fixed a whole bunch of doctests
Diffstat (limited to 'numpy/testing/noseclasses.py')
-rw-r--r--numpy/testing/noseclasses.py15
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