Re: [Pyunit-interest] PyunitBrowser 003 on win32
Brought to you by:
purcell
From: Phlip <ppl...@om...> - 2002-06-05 16:38:17
|
Syver Enstad sez: > I understand that the PyUnitTestBrowser is written primarily > for use on *nix machines, and by reporting problems found when running > under win32 I don't therefore mean that you are in anyway obligated to > fix them. I just report them in case you are interested in knowing > about them. Then you misunderstand me. I intend to ask Steve to add this to PyUnit, under a folder called contrib/browser. And I intend to port it to wherever Python & Tkinter go. To do that I need to remove Pmw, and get these idiotic path issues fixed. > When run (version 003) from the site-packages/browser directory with > the commandline: python browser.py I experience the following errors > in test_browser.py > (see bottom of mail) I have been sneakily upgrading those temporary "releases" if I improve them but don't add anything radical or contradict the documentation. Please try one of these: http://flea.sourceforge.net/browser003.zip http://flea.sourceforge.net/browser.zip The latter is my latest bench version - the equivalent of a CVS HEAD. > The fileNameToModuleName test case can be fixed by > using os.sep in the construction of the test string This has been fixed, test-first. So the tests should reveal that stoopid function working with a range of kinds of relative file locations. > fileName = os.path.normpath(fileName) # fix by syver I will add this (with the attribution ;-) the next time I'm working on the module. > if fileName[0] != '.': fileName = '.' + os.sep + fileName Yeek! You just took it off so we can put it on again! The only reason it's there is to hard-code the [1:] two lines down! > fileName = fileName[:-3] > moduleName = string.split(fileName, os.sep)[1:] > The windows version of the os.path module doesn't have the samefile > method, only on *nix and mac methinks. Translation: It works by checking the inode; Windowz and mac don't have them but do have absolute jiggers built into their directory system, and the Python guys didn't feel like research this. Thanks for the error traces; I'l see when I have time ;-) -- Phlip http://www.greencheese.org/DontPlanDesigns "I love children, especially when they cry, for then someone takes them away." -- Nancy Mitford |