# HG changeset patch # User James Abbatiello # Date 1247625492 14400 # Node ID 705278e704577ddd2d21b757b4604da17b522e28 # Parent e8441597d2eefeb89abf71c205470928bfdd8159 Fix test-demandimport and test-trusted under Windows The Windows-only wrapper around stdout is causing both of these tests to fail. test-demandimport fails because it tries to print repr(sys.stdout). Use stderr instead since that is not wrapped. test-trusted fails because the wrapper doesn't handle softspace and an unexpected extra space gets printed. diff -r e8441597d2ee -r 705278e70457 mercurial/windows.py --- a/mercurial/windows.py Fri Jul 17 13:31:12 2009 +0200 +++ b/mercurial/windows.py Tue Jul 14 22:38:12 2009 -0400 @@ -41,6 +41,7 @@ limit = 16000 l = len(s) start = 0 + self.softspace = 0; while start < l: end = start + limit self.fp.write(s[start:end]) diff -r e8441597d2ee -r 705278e70457 tests/test-demandimport.py --- a/tests/test-demandimport.py Fri Jul 17 13:31:12 2009 +0200 +++ b/tests/test-demandimport.py Tue Jul 14 22:38:12 2009 -0400 @@ -36,5 +36,5 @@ print "fred =", f(fred) print "re =", f(re) -print "re.stdout =", f(re.stdout) +print "re.stderr =", f(re.stderr) print "re =", f(re) diff -r e8441597d2ee -r 705278e70457 tests/test-demandimport.py.out --- a/tests/test-demandimport.py.out Fri Jul 17 13:31:12 2009 +0200 +++ b/tests/test-demandimport.py.out Tue Jul 14 22:38:12 2009 -0400 @@ -11,5 +11,5 @@ fred.sub = fred = re = -re.stdout = ', mode 'w' at 0x?> +re.stderr = ', mode 'w' at 0x?> re =