1 |
On Sun, Dec 7, 2008 at 12:02 PM, Michael A. Smith <michael@××××××××.com> wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA1 |
4 |
> |
5 |
> Regarding gentoolkit/trunk/src/equery/tests |
6 |
> |
7 |
> I discovered all the test kit that's in equery, and have been refactoring |
8 |
> 'em. |
9 |
> They're written in bash, not python, so they're a candidate for some kind of |
10 |
> python unit testing. Right now, however, that's not a priority for me, so |
11 |
> I'm |
12 |
> just making the bash cleaner and hopefully faster and more maintainable. I |
13 |
> think it'll be helpful as we refactor. |
14 |
> |
15 |
> The question is, how maintainable are the "help" tests? These are tests that |
16 |
> try to confirm that the --help output of each module is correct. I think it |
17 |
> might be more work than it's worth to try to maintain those... |
18 |
> |
19 |
> Thoughts? |
20 |
|
21 |
I know some people like to write the tests and then write the code to |
22 |
match, but I don't think it's a good idea for you to refactor the |
23 |
tests as I'm refactoring the codebase :) |
24 |
|
25 |
Especially since I'm chopping and moving things, renaming functions, |
26 |
etc, as long as I think it'll help in the long term. |
27 |
|
28 |
I even changed the format of the help output ;) Why? Because we have |
29 |
two user-oriented tools with a similar "modular" design, equery and |
30 |
eselect, and yet they have a totally different naming scheme and |
31 |
behave quite differently. It's unnecessarily confusing so I tried to |
32 |
make them more uniform (I'll upload some code shortly). I always |
33 |
though equery's --help was cluttered and confusing. A complete |
34 |
overview is what `man equery' is for, IMHO. |
35 |
|
36 |
I also changed the way equery handles input slightly. For example this |
37 |
I think is unnecessarily lenient and in the end confusing, because it |
38 |
goes against what most other tools do (raise an exception): |
39 |
|
40 |
$ equery -q -i list mozilla-firefox |
41 |
!!! unknown global option -i, reusing as local option |
42 |
|
43 |
So, I don't think we should be working on the tests until we have most |
44 |
of the code refactored, but I re-extend my invitation for help on that |
45 |
because there's quite a bit to do! |
46 |
|
47 |
-Doug |