Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89835
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Subject | Re: Is this a good way to implement testing |
| Date | 2015-05-03 09:38 +0100 |
| References | <878ud6mx4y.fsf@Equus.decebal.nl> <87383em7sn.fsf@Equus.decebal.nl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.51.1430642317.12865.python-list@python.org> (permalink) |
On 03/05/2015 08:36, Cecil Westerhof wrote: > > Thanks for the tips. For most I have to read a ‘little’ first, so I > will not implement them immediately. > Another question. Is it acceptable to have it in the module itself, or > should I put it in something like test_<module>.py? The code for > testing is bigger as the code for the implementation, so I am leaning > to putting it in a separate file. > I'd go for the former if your implementation code base is measured in hundreds of lines of code, anything larger and I'd probably split the test code out. That's just my own rule of thumb, I'm sure others will quote different figures, but what it ultimately gets down to is what are you comfortable with? I ask because you should keep in mind that Python modules containing several classes and running into thousands of lines of code are fairly common. Python is not Java, and Java isn't Python either :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 00:29 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 00:17 +0100
Re: Is this a good way to implement testing Terry Reedy <tjreedy@udel.edu> - 2015-05-02 20:06 -0400
Re: Is this a good way to implement testing Paul Rubin <no.email@nospam.invalid> - 2015-05-02 20:58 -0700
Re: Is this a good way to implement testing Ben Finney <ben+python@benfinney.id.au> - 2015-05-03 14:49 +1000
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 09:36 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 09:38 +0100
Re: Is this a good way to implement testing Peter Otten <__peter__@web.de> - 2015-05-03 10:45 +0200
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 11:49 +0200
Re: Is this a good way to implement testing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 11:21 +0100
Re: Is this a good way to implement testing Cecil Westerhof <Cecil@decebal.nl> - 2015-05-03 12:50 +0200
Re: Is this a good way to implement testing Ben Finney <ben+python@benfinney.id.au> - 2015-05-03 18:52 +1000
Re: Is this a good way to implement testing Peter Otten <__peter__@web.de> - 2015-05-03 11:22 +0200
csiph-web