Re: [Pyunit-interest] PyUnitTestBrowser - Memory leak
Brought to you by:
purcell
From: Phlip <ppl...@om...> - 2002-06-04 04:21:17
|
Alexander Garden sez: > > $ ./browser.py test\*.py > > > > The slash is not optional because we don't want your BASH or whatever to > > expand the *. We need to expand it for you, recursively in each sub > > directory. Like 'find'. > > Being a Unix guy, I'd much, much rather have the shell do the work of > finding files for me. That's what it's good at. It don't recurse. The entire point of the tree structure was to recurse; to make very large Python projects in a stack of folders testable. Deal: I will detect * on the command line (meaning you escape it so the shell did not leap at it, and meaning you didn't name your test program *.py out of perversity), and then I will accept everything on the command line and treat stars as requests to recurse and expand the stars as file globs. > That's what it's there > for, among other things. If I needed to recursively find files, I'd do > $ ./browser.py `find . -name 'test*.py'` > which is admittedly rather clumsy if one must type it often, but one > shouldn't have to, right? :) And it is easily bound up into a shell > script or alias anyway. That would not work, directly, because browser.py would prefer to find the folders itself so it can construct its tree; with the '.' node to mean "test this folder but not the sub-folders." But it would work with my proposed tweak because the sought files would go in as individual files in a long list at the root level. > It seems more flexible and cleaner to me to have the internals think in > terms of a list of files and have an outer layer optionally do the > conversion from directories and patterns to a file list than to build a > pattern/directory thought structure into the core. If you decide to go > this way, I'd be happy to help out with the refactoring. Let me catch up first! ;-) Then I will refactor the long list at the root level into a merged folder structure. -- Phlip http://www.greencheese.org/PhilosophyBrethrenThree -- Appears that VIM is internationalized... May I ask what's the point? -- |