Re: Test driven development

2008-01-25 Thread Roel Schroeven
alex23 schreef: > On Jan 25, 5:44 am, Roel Schroeven <[EMAIL PROTECTED]> > wrote: >> I guess I just need to try somewhat harder to use TDD in my daily >> coding. Apart from books, are there other resources that can help >> beginners with TDD? Mailing lists, forums, newsgroups possibly? > > There's

Re: Test driven development

2008-01-24 Thread alex23
On Jan 25, 5:44 am, Roel Schroeven <[EMAIL PROTECTED]> wrote: > I guess I just need to try somewhat harder to use TDD in my daily > coding. Apart from books, are there other resources that can help > beginners with TDD? Mailing lists, forums, newsgroups possibly? There's the Testing-in-Python mail

Re: Test driven development

2008-01-24 Thread Roel Schroeven
ong ago, I took the "bottom-up" approach to TDD, which was a >>> mistake because it leads to over-engineering (the end result is not so >>> bad since it's over-engineering that has good test coverage :) ) >> I don't regularly use TDD yet, and one of the rea

Re: Test driven development

2008-01-24 Thread Virgil Dupras
D, which was a > > mistake because it leads to over-engineering (the end result is not so > > bad since it's over-engineering that has good test coverage :) ) > > I don't regularly use TDD yet, and one of the reasons is that in many > cases I'm unsure exactly how

Re: Test driven development

2008-01-24 Thread Roel Schroeven
x27;s over-engineering that has good test coverage :) ) I don't regularly use TDD yet, and one of the reasons is that in many cases I'm unsure exactly how to use it in practice. I read "Test-driven development - A practical guide" (and I should re-read), but I feel it doesn&#x

Re: Test driven development

2008-01-24 Thread Virgil Dupras
difficult to put into practice > most of the time. I think this primarily because I tend to like top- > down development and functional/object decomposition and TDD feels > more like a bottom-up approach. > > So my question is when approaching a project that you want to employ > test dri

Re: Test driven development

2008-01-24 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > So my question is when approaching a project that you want to employ > test driven development on how and where do you start? And also if > anyone uses top-down design with TDD I would be interested in how you > do i

Re: Test driven development

2008-01-24 Thread A.T.Hofkamp
" is not defined by the approach. > So my question is when approaching a project that you want to employ > test driven development on how and where do you start? And also if 1. Define a small step of extended functionality that you can finish by the end of the week. 2. Write tests that

Re: Test driven development

2008-01-24 Thread Neil Cerutti
On 1/24/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > Sorry if this is a bit off topic but as unit testing is such a > cornerstone of python development I thought a few of you may be able > to share your knowledge/experiences. Test driven development, simplisti

Test driven development

2008-01-24 Thread ajcppmod
to like top- down development and functional/object decomposition and TDD feels more like a bottom-up approach. So my question is when approaching a project that you want to employ test driven development on how and where do you start? And also if anyone uses top-down design with TDD I would be

Re: Test-driven development and code size

2007-09-26 Thread Ben Finney
(Joel, please preserve attribution lines on your quoted material so we can see who wrote it.) Joel Hedlund <[EMAIL PROTECTED]> writes: > My presumption has been that in order to do proper test-driven > development I would have to make enormous test suites covering all > bases for

Re: Test-driven development and code size

2007-09-26 Thread Fredrik Lundh
Diez B. Roggisch wrote: > Sounds good to me. IMHO there are two ways one gathers tests: > > - concrete bugs appear, and one writes a test that reproduces the bug & > eventually after the fix runs smoothly > > - new features are planned/implemented, and the tests accompany them right > from the

RE: Test-driven development and code size

2007-09-26 Thread Ryan Ginstrom
> On Behalf Of Joel Hedlund > My presumption has been that in order to do proper > test-driven development I would have to make enormous test > suites covering all bases for my small hacks before I could > getting down and dirty with coding (as for example in > http://www.

Re: Test-driven development and code size

2007-09-26 Thread Diez B. Roggisch
Joel Hedlund wrote: >> test-driven development merely means that you take that test case and >> *keep it* in your unit test. Then, once you're assured that you will >> find the bug again any time it reappears, go ahead and fix it. > > My presumption has been th

Re: Test-driven development and code size

2007-09-26 Thread Joel Hedlund
> test-driven development merely means that you take that test case and > *keep it* in your unit test. Then, once you're assured that you will > find the bug again any time it reappears, go ahead and fix it. My presumption has been that in order to do proper test-driven development

Test-driven development and code size (was: What is a good way of having several versions of a python module installed in parallell?)

2007-09-25 Thread Ben Finney
Joel Hedlund <[EMAIL PROTECTED]> writes: > Do you also do [test-driven development] for all the little stuff, > the small hacks you just whip together to get a particular task > done? My impression is that doing proper unittests adds a lot of > time to development, and I'm

Re: Test-driven development of random algorithms

2006-11-13 Thread Ben Finney
Robert Kern <[EMAIL PROTECTED]> writes: > Steven D'Aprano wrote: > > Does anyone have generic advice for the testing and development of > > this sort of function? > > "Design for Testability". In library code, never call the functions > in the random module. Always take as an argument a random.Ran

Re: Test-driven development of random algorithms

2006-11-13 Thread Robert Kern
> """ > x = 0.0 > for i in range(12): > x += random.random() > return str(int(x)+6)) > > I want to do test-driven development. What should I do? Generally, any > test I do of the form > > assert rst() == '1' > > wil

Test-driven development of random algorithms

2006-11-13 Thread Steven D'Aprano
x += random.random() return str(int(x)+6)) I want to do test-driven development. What should I do? Generally, any test I do of the form assert rst() == '1' will fail more often than not (about 85% of the time, by my estimate). An easy work around would be to do this: asser

Test-driven development (was: Tracing the execution of scripts?)

2006-10-27 Thread Ben Finney
is probably poorly > designed. *shrug* Though, I *do* try to write everything in such a > way as to be able to easily re-use it later. The trick is to write pieces that are small and loosely-coupled, so that small pieces of code (not just entire modules) can be re-used without being re-w

HTML bodies in a text medium (was: Re: Python and Test Driven Development)

2006-05-19 Thread Ben Finney
"Diego Torres Milano" <[EMAIL PROTECTED]> writes: > [a message body in HTML] > Comments are gladly welcome. First comment: please don't compose your message body in anything but plain text, unless you *know* *every* recipient wants it otherwise. In a public discussion forum, where you *can't* kn

Python and Test Driven Development

2006-05-19 Thread Diego Torres Milano
First part of a series of articles about Python and Test Driven Development can be found at http://dtmilano.blogspot.com/2006/05/python-and-test-driven-development.html. These articles include some scripts to ease automatic test suite creation in Python. Comments are gladly welcome