[MERGE] Cleanup and test Lock objects

John Arbash Meinel john at arbash-meinel.com
Wed Mar 14 23:16:50 GMT 2007


John Arbash Meinel wrote:
> John Arbash Meinel wrote:
>> Martin Pool wrote:
>>> Martin Pool has voted +1.
>>> Status is now: Approved
>>> Comment:
>>> +    _fmt = "Cannot acquire write lock on %(fname)s. File is readonly."
>>>
>>> Adding a specific exception class sounds good.  I think you could get
>>> eaccess for other reasons when the file is not readonly?  Maybe it
>>> would be better to include the message from the IOError.
>>>
>>> I agree with Alexander that we should perhaps have per-implementation
>>> tests.
> 
> Well to give myself some more experience with writing adapted tests, I
> have went ahead and done this in the attached patch.
> 
> It is a large enough change, that I would like someone to look it over,
> even though the other one was +1.
> 
> John
> =:->

Attached is a small patch which makes it a bit more explicit that we
don't create the win32 lock objects on non-win32 platforms.

It isn't strictly necessary, because the "import" tests include
importing msvcrt, which won't exist on non windows platforms.

But it seemed better to be explicit.

John
=:->

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: skip_win32_locks.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070314/608fbccf/attachment.diff 


More information about the bazaar mailing list