[C++-sig] Re: Unit test script problem with boost
RaoulGough at yahoo.co.uk
Mon Nov 10 13:25:44 CET 2003
John Slater <john_slater33 at yahoo.com> writes:
> I have a problem using unittest script with Boost.
> I have a class as Command which is exposed to python through Boost.
> If I run a failUnlessRaises() from python as below
> def testFunctionBounds(self):
> command = Command()
> self.failUnlessRaises(ValueError, command.Command, -1)
> This gives error saying
> apply(callableObj, args, kwargs)
> TypeError: Bad argument type for built-in operation.
> This works fine if the Class is in python.
> Looking for a suggetion from ur end.
I suggest you supply more details :-) Guessing wildly anyway, could it
be that Boost.Python is just raising a different type of exception for
the same problem? In that case, an easy solution would be to make the
test robust enough to accept either type of exception.
(setq dabbrev-case-fold-search nil)
More information about the Cplusplus-sig