You're right, Richard, but I was asking how you organize your production
code, not your test code.
What is your strategies to isolate components to achieve a better
unit-testing scenario?
--
Vinicius Assef
On 10/04/2012 12:49 PM, Richard Vézina wrote:
I am reading actually about unit testing and doctest in docstring should
be pretty small, as a rule of thumb it should be less longer than you
docstring documentation.
But, it says too that it pretty convenient to have at least one doctest
in docstring since it could help a lot in identifying outdated docstring
since if you refactor you code without touch you docstring your doctest
should failed so you know you are good for a bit of documentation pleasure.
I read too that docstring can be kept apart the docstring a .txt file,
so the long unit test should go there.
So when doctest help you better understand and document the purpose of
the code and if it is short it should go in docstring if it get bloated
you can move it in .txt file apart.
Richard
On Thu, Oct 4, 2012 at 10:27 AM, Marek Mollin <rog...@gmail.com
<mailto:rog...@gmail.com>> wrote:
I only use doc-string testing. For everything I do its snap and
effective enough. Plus it can trigered from admin.
Though it is not recomnded way of unittesting - it has its problems,
bloats the code base, does not provide clean seperation between
tests and actual app.
W dniu środa, 3 października 2012 21:46:03 UTC+2 użytkownik
viniciusban napisał:
Hi all.
I continue diving into unit-testing and I'd like to know how do you
organize your applications to be unit-tested.
Thin controllers? DAO classes? How do you decouple things in
web2py to
make unit-testing easy?
--
Vinicius Assef
--
--
--