Previously Alexandre Conrad wrote:
> 
> Dear Pylonauts,
> 
> I'm starting a new project and I thought it was a good time to setup
> tests, something I have never done before. Because I'm writing models
> (SQLAlchemy objects) before my controllers, I have created a
> tests/units folder under which I'm testing my models, in a
> straightforward manner, no WebOb.
> 
> But one may argue that unit testing at such low level shouldn't be
> required as the higher tests/functional level should cover all
> requirements as this is what is exposed to the outside world and only
> that exposed part will manipulate the web app. So unit testing may
> lead to over-testing, which is as well arguable as it takes time to
> update and maintain.
> 
> On the other hand, I tend to think that the functional tests may get
> into your way when testing, such as logging and how "environ" may
> alter the behavior of controllers. Of course, a setUpClass()
> classmethod at the class level could prepare these things, but it's
> more work and I feel that I have less control as functional tests call
> controllers, which are black boxes.
> 
> I am *not* saying that functional tests shouldn't be done. I just want
> to test my models and functional tests may get into my way. But do I
> need to test my models so finely?

I certainly do. There is a lot of value in doing proper unit tests.

Wichert.

-- 
Wichert Akkerman <[email protected]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to