From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1L9AL3-0003Sl-Nk for garchives@archives.gentoo.org; Sun, 07 Dec 2008 03:29:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8DCA6E03D6; Sun, 7 Dec 2008 03:29:41 +0000 (UTC) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by pigeon.gentoo.org (Postfix) with ESMTP id 4A53EE03D6 for ; Sun, 7 Dec 2008 03:29:41 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so505368fga.14 for ; Sat, 06 Dec 2008 19:29:35 -0800 (PST) Received: by 10.223.115.193 with SMTP id j1mr874653faq.98.1228620575280; Sat, 06 Dec 2008 19:29:35 -0800 (PST) Received: by 10.223.112.17 with HTTP; Sat, 6 Dec 2008 19:29:35 -0800 (PST) Message-ID: Date: Sun, 7 Dec 2008 12:29:35 +0900 From: "Douglas Anderson" To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] Re: equery refactorization In-Reply-To: <493B3CAD.9070304@smith-li.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <493B3CAD.9070304@smith-li.com> X-Archives-Salt: a7995595-6a53-4c22-9f62-e1441bb77333 X-Archives-Hash: 22ba75e405bba948b0a6a3af34e5f369 On Sun, Dec 7, 2008 at 12:02 PM, Michael A. Smith wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Regarding gentoolkit/trunk/src/equery/tests > > I discovered all the test kit that's in equery, and have been refactoring > 'em. > They're written in bash, not python, so they're a candidate for some kind of > python unit testing. Right now, however, that's not a priority for me, so > I'm > just making the bash cleaner and hopefully faster and more maintainable. I > think it'll be helpful as we refactor. > > The question is, how maintainable are the "help" tests? These are tests that > try to confirm that the --help output of each module is correct. I think it > might be more work than it's worth to try to maintain those... > > Thoughts? I know some people like to write the tests and then write the code to match, but I don't think it's a good idea for you to refactor the tests as I'm refactoring the codebase :) Especially since I'm chopping and moving things, renaming functions, etc, as long as I think it'll help in the long term. I even changed the format of the help output ;) Why? Because we have two user-oriented tools with a similar "modular" design, equery and eselect, and yet they have a totally different naming scheme and behave quite differently. It's unnecessarily confusing so I tried to make them more uniform (I'll upload some code shortly). I always though equery's --help was cluttered and confusing. A complete overview is what `man equery' is for, IMHO. I also changed the way equery handles input slightly. For example this I think is unnecessarily lenient and in the end confusing, because it goes against what most other tools do (raise an exception): $ equery -q -i list mozilla-firefox !!! unknown global option -i, reusing as local option So, I don't think we should be working on the tests until we have most of the code refactored, but I re-extend my invitation for help on that because there's quite a bit to do! -Doug