changeset 13083:c0290fc6b486

test-demandimport.py: PyPy support The stringification of sys.stderr is different in PyPy: $ pypy -c 'import sys; print sys.stderr' <open file '<fdopen>', mode 'w' at 0x00a42080> $ python -c 'import sys; print sys.stderr' <open file '<stderr>', mode 'w' at 0x10025a270> The test will now ignore the exact value between the angle brackets.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 01 Dec 2010 21:46:08 +0100
parents 4db5bfea1b07
children c97ded7b6e79
files tests/test-demandimport.py tests/test-demandimport.py.out
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-demandimport.py	Wed Dec 01 21:46:08 2010 +0100
+++ b/tests/test-demandimport.py	Wed Dec 01 21:46:08 2010 +0100
@@ -8,6 +8,7 @@
     l = repr(obj)
     l = rsub("0x[0-9a-fA-F]+", "0x?", l)
     l = rsub("from '.*'", "from '?'", l)
+    l = rsub("'<[a-z]*>'", "'<whatever>'", l)
     return l
 
 import os
--- a/tests/test-demandimport.py.out	Wed Dec 01 21:46:08 2010 +0100
+++ b/tests/test-demandimport.py.out	Wed Dec 01 21:46:08 2010 +0100
@@ -11,5 +11,5 @@
 fred.sub = <function sub at 0x?>
 fred = <proxied module 're'>
 re = <unloaded module 'sys'>
-re.stderr = <open file '<stderr>', mode 'w' at 0x?>
+re.stderr = <open file '<whatever>', mode 'w' at 0x?>
 re = <proxied module 'sys'>