Rev 4807: 2.1.0b4-win32-trace was approved in http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-accepted
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 17 22:24:44 GMT 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1.0b4-win32-accepted
------------------------------------------------------------
revno: 4807 [merge]
revision-id: john at arbash-meinel.com-20091117222437-b3ljdokx17dql57q
parent: john at arbash-meinel.com-20091117222009-sbcgouw5nwn61awi
parent: john at arbash-meinel.com-20091108190700-f0sfia3kjtdgqjg8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1.0b4-win32-accepted
timestamp: Tue 2009-11-17 16:24:37 -0600
message:
2.1.0b4-win32-trace was approved
modified:
bzrlib/tests/test_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
-------------- next part --------------
=== modified file 'bzrlib/tests/test_trace.py'
--- a/bzrlib/tests/test_trace.py 2009-09-03 02:59:56 +0000
+++ b/bzrlib/tests/test_trace.py 2009-11-08 19:07:00 +0000
@@ -84,11 +84,12 @@
def test_format_os_error(self):
try:
os.rmdir('nosuchfile22222')
- except OSError:
- pass
+ except OSError, e:
+ e_str = str(e)
msg = _format_exception()
- self.assertContainsRe(msg,
- r'^bzr: ERROR: \[Errno .*\] No such file.*nosuchfile22222')
+ # Linux seems to give "No such file" but Windows gives "The system
+ # cannot find the file specified".
+ self.assertEqual('bzr: ERROR: %s\n' % (e_str,), msg)
def test_format_io_error(self):
try:
@@ -96,7 +97,10 @@
except IOError:
pass
msg = _format_exception()
- self.assertContainsRe(msg, r'^bzr: ERROR: \[Errno .*\] No such file.*nosuchfile')
+ # Even though Windows and Linux differ for 'os.rmdir', they both give
+ # 'No such file' for open()
+ self.assertContainsRe(msg,
+ r'^bzr: ERROR: \[Errno .*\] No such file.*nosuchfile')
def test_format_unicode_error(self):
try:
@@ -268,7 +272,7 @@
def test_log_rollover(self):
temp_log_name = 'test-log'
trace_file = open(temp_log_name, 'at')
- trace_file.write('test_log_rollover padding\n' * 1000000)
+ trace_file.writelines(['test_log_rollover padding\n'] * 200000)
trace_file.close()
_rollover_trace_maybe(temp_log_name)
# should have been rolled over
More information about the bazaar-commits
mailing list