[rfc] bzrlib.doc.api doctests as txt files

Robert Collins robertc at robertcollins.net
Tue May 9 11:27:52 BST 2006


On Tue, 2006-05-09 at 13:21 +0300, Alexander Belchenko wrote:
> This subpackage (bzrlib.doc.api) wrote Robert Collins so probably this 
> question mostly addressed to him.

Hi.

> I make bzr.exe for win32 with py2exe. All python packages py2exe store 
> into one library.zip file and during executing of program this modules 
> imported via zipimport. All stuff works. Only txt files inside 
> bzrlib/doc/api break normal behaviour (break selftest command).
> 
> Now I simply disable this tests when directory 
> os.getcwd()/bzrlib/doc/api does not exists. Therefore this tests will 
> never be executed on win32 in bzr.exe form. Is this important part of 
> test suite? I see in comments that it mostly used as examples of using 
> api. So I think it can be omitted in case when we provide bzr.exe with 
> bzrlib bundled inside.

Its certainly not relevant if the bzrlib python module isn't importable
via

python
import bzrlib

> If there is important to run this tests even in bzr.exe form then this 
> files probably should be converted to usual python source for normal 
> importing and bundling into library.zip.

Its not important.

> I try to store this text files apart of library.zip (in directory 
> data/bzrlib/doc/api) but doctest.py from standard python library anyway 
> try to open files with filename pointed into library.zip:
> 
> @@@ bzr.exe peek doc-api tests from 
> E:\work\Python\bzr\0.8\bzr.0.8.win32.installer\win32_bzr.exe/data/bzrlib/doc/api
> 
> bzr: ERROR: exceptions.IOError: [Errno 2] No such file or directory: 
> 'E:\\work\\Python\\bzr\\0.8\\bzr.0.8.win32.installer\\win32
> _bzr.exe\\lib\\library.zip\\bzrlib\\doc\\api\\branch.txt'
>    at doctest.pyc line 2343
>    in DocFileTest
> 
> 
> What do you think about? Just skip this test in bzr.exe is enough?

yes, skip it in bzr.exe.

We should skip most of the test suite in installed forms anyway IMO. The
developer regression suite, and the 'am I working here' tests are very
different.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060509/c044b770/attachment.pgp 


More information about the bazaar mailing list