Re: [Tutor] unittest and private methods

2006-01-21 Thread Kent Johnson
lemeia wrote: > kent wrote: >>Rereading your mail another possibility comes to mind. It sounds like >>extractTo() is a general-purpose function that is used for a specific >>purpose by the module you are testing. Why not extract extractTo to a >>utility module? Then you can test it as much as yo

Re: [Tutor] unittest and private methods

2006-01-21 Thread Alan Gauld
> I'm really enjoying Python. I don't like the "sentence structure" quite > as much as Smalltalk (ie I like anObject actOn: a untilYouSee: b), Have you looked at Objective C? It uses Smalltalk style messaging, but in a C language framework. > I find it much faster to do things in Python even ov

Re: [Tutor] unittest and private methods

2006-01-20 Thread lemeia
kent wrote: > > I currently have a class where I have quite a few private methods. > > One > of these methods is a small general utility that extracts characters > from provided text up until it reaches a delimiter. Something like > extractTo(self, text, delimiter). > > > > It's not a relevant int

Re: [Tutor] unittest and private methods

2006-01-20 Thread Kent Johnson
lemeia wrote: > I currently have a class where I have quite a few private methods. > One of these methods is a small general utility that extracts characters from provided text up until it reaches a delimiter. Something like extractTo(self, text, delimiter). > > It's not a relevant interface to th

[Tutor] unittest and private methods

2006-01-20 Thread lemeia
I currently have a class where I have quite a few private methods. One of these methods is a small general utility that extracts characters from provided text up until it reaches a delimiter. Something like extractTo(self, text, delimiter). It's not a relevant interface to the class, just a uti