On Wed, 23 Jan 2013 10:07:01 +0100, Jens Rehsack <rehs...@cpan.org>
wrote:

> On 22.01.13 23:42, Tim Bunce wrote:
> > On Tue, Jan 15, 2013 at 09:47:02AM +0100, Jens Rehsack wrote:
> >>
> >> 1) having a lot of DBD::CSV tests (DBI related like ChopBlanks)
> >>     moved or copied and maintained in DBI
> >
> > Think bigger.
> 
> I do :P
> 
> SQL::Statement can't rely on DBI, because it would create a
> circular dependency - but my far distance goal was a test
> base common for DBI, DBD::* and SQL::Statement - and maybe
> more ...
> 
> But I want start somewhere and not finish anything because
> of the long way (I think about my goal to improve
> Proc::ProcessTable, which stalls because I don't find
> a near goal to reach soon and have not enough free time to
> do it all in one big task).
> 
> > One of my biggest regrets about the implementation of the DBI is that I
> > didn't create a separate test suite that could be reused by driver authors.
> >
> > So each driver has only it's own set of tests that are really only
> > testing the authors interpretation of the barely-specified behavior.
> >
> > I'd *love* to see that error fixed so all drivers authors could make use
> > of, and contribute to, a common DBI driver test suite.
> 
> You suggest a DBI::Test suite which is a separate module and is required 
> by DBI? This completely different to previous statements
> where DBI should have no additional dependencies ...
> 
> Let's discuss this as Merijn suggested at Perl QA hackathon.

But this is almost exactly what I had in mind when I started DBD::Unify
I somehow have never been able to express those thoughts in words :)

The "problem" is requiring DBI::Test (or whatever) from the DBD in
question, where DBI::Test only depends on DBI. DBI::Test could then do
the DBD-less tests to DBI (again) before being 'use DBI::Test;'d in
DBD's t/ set of files

use DBI::Test;  # subclasses Test::More

setup ({ … });  # Things DBI::Test should know to connect, use temp
                # tables, and more
dbd_dbi_ok ();  # set of sub-tests - can I load DBI
dbd_drv_ok ();  # set of sub-tests - can I load DBD
dbd_dbh_ok ();  # set of sub-tests - can I connect/disconnect/cache
dbd_sth_ok ();  # set of sub-tests - can I do standard things


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.17   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to