[Xapian-devel] Re: [Xapian-commits] 8181: trunk/xapian-bindings/
trunk/xapian-bindings/python/
Olly Betts
olly at survex.com
Wed Apr 11 12:16:23 BST 2007
On Wed, Apr 11, 2007 at 11:48:55AM +0100, Richard Boulton wrote:
> Olly Betts wrote:
> >It might be simpler, but mostly because functionality has gone - you've
> >thrown away all my carefully written failure messages!
>
> Ah. It wouldn't be that hard to put the error messages back (just by
> adding an extra argument to each checking function).
That would certainly be useful.
> Alternatively, I could improve the error reporting, and make it just
> display the exception message and quote the lines of code around each
> the error failure, instead of displaying a raw traceback.
That sounds like a difficult solution to a simple problem!
> I could also make it report the xapian version number.
That's not a bad idea (though I'm sure some people will manage to
trim down the error report to exclude it...)
> It seems a good plan to me to lower the barrier to writing tests, so
> avoiding having to think of a clear explanatory message for each new
> test seems a win.
Well, it makes it slightly easier to add a slightly less useful test.
If you can't clearly express what's being tested, it seems it'll be hard
to actually write the test.
> >It'll also be easier to keep the different language versions of the
> >smoketest in step if we resist the urge to mercilessly refactor them
> >individually...
>
> Ah. The reason I did all this is that I'm working on the Pythonic
> iterators, and since their implementation is relatively complicated
> they'll need quite a lot of extra checking - particularly since I'm
> trying to support the current interfaces to iterators as well as the new
> ones. I was going to add the checks for these to the smoketest.
>
> Perhaps the solution is to revert the changes I made to the smoketest,
> and to add a Python specific testsuite for features specific to Python.
A second "language specific" set of tests isn't a bad idea.
> I thought that the smoketests for each language were completely
> out-of-step already - I didn't realise I was breaking this. I confess I
> haven't looked at the smoketests for other languages at all, lately. Sorry.
They are somewhat out-of-step, but that's a bug not a feature! Nobody
else seems very interested in adding a test to more than one language
(and even if they were, I'm not sure we can realistically demand a
complete set of feature tests for any newly wrapped feature - few people
are fluent enough in all the languages). But occasionally I go through
and fill in missing tests for other languages, and that is much easier
if the structure is similar in each case.
Cheers,
Olly
More information about the Xapian-devel
mailing list