DocTest

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

DocTest

Benjamin Van Ryseghem (Pharo)
Hi guys,

I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)


Ben

[1]http://docs.python.org/2/library/doctest.html


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Stéphane Ducasse
it would be nice to introduce the same syntax than Sunit

        exp assert: exp2

        [ exp ] shouldraise:

Stef


On Jan 21, 2013, at 4:41 AM, Benjamin wrote:

> Hi guys,
>
> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>
>
> Ben
>
> [1]http://docs.python.org/2/library/doctest.html
>
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Sean P. DeNigris
Administrator
In reply to this post by Benjamin Van Ryseghem (Pharo)
Benjamin Van Ryseghem-2 wrote
I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
I've been dreaming about, and doing experiments around, this for quite a while... could be so much better in st because we can create custom UI tools instead of text files...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Benjamin Van Ryseghem (Pharo)
With Nicolas Petton we implemented it yesterday afternoon :)

It's missing Nautilus integration, but the code is pretty much there :)

(I will provide the repo asap)

Ben

On Jan 22, 2013, at 6:46 PM, Sean P. DeNigris wrote:

> Benjamin Van Ryseghem-2 wrote
>> I am attending a python lecture and discovered DocTest[1], and I was
>> wondering if such a tool exists for Pharo ? :)
>
> I've been dreaming about, and doing experiments around, this for quite a
> while... could be so much better in st because we can create custom UI tools
> instead of text files...
>
>
>
> --
> View this message in context: http://forum.world.st/DocTest-tp4664547p4664617.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Denis Kudriashov
In reply to this post by Stéphane Ducasse
2013/1/22 Stéphane Ducasse <[hidden email]>
it would be nice to introduce the same syntax than Sunit

        exp assert: exp2

        [ exp ] shouldraise:

StateSpecs (package separated from Mocketry) implements it. And such "should" syntax extendable by pragmas. Your example looks like:

[exp] should raise: Error

It is implemented with main spec class RaisingExceptionSpec
RaisingExceptionSpec >>basicMatches: aBlockContext
    [aBlockContext value.
   ^false] on: requiredException
            do:
                [:ex |
                ex class = SpecFailed ifTrue: [ex outer].
                ^true]
And single method in special DSL class:
Raise>>exception: aClass
    <syntax: #(raise:)>
    ^RaisingExceptionSpec requiredException: aClass
 
Stef


On Jan 21, 2013, at 4:41 AM, Benjamin wrote:

> Hi guys,
>
> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>
>
> Ben
>
> [1]http://docs.python.org/2/library/doctest.html
>
>



Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Denis Kudriashov
In reply to this post by Sean P. DeNigris
2013/1/22 Sean P. DeNigris <[hidden email]>
Benjamin Van Ryseghem-2 wrote
> I am attending a python lecture and discovered DocTest[1], and I was
> wondering if such a tool exists for Pharo ? :)

I've been dreaming about, and doing experiments around, this for quite a
while... could be so much better in st because we can create custom UI tools
instead of text files...

I dream about it too :)). I remember we talk about this in Gent. But what experiments are you talk about? How I can try it?
I think BDD programming can be much better and simpler with smalltalk because we are not limited with text files and code syntax. We can work with objects and present it with any way we want.
With classic TDD we model system specs with test methods which are very restricted way for building readable and reusable specs of system. And I think we mix here few concepts: how to validate (run) specs, how to persist specs and what specs actualy is. And last item is what we should reimplement from scrach independently from others (we should forgot about others for the moment). BDD exactly about it. But nonsmalltalk world continue mix concepts because text files and code syntax is only way to persist and build system specs there. They was make just good refactoring of TDD approach which is very nice but I'm sure we can do better :)


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Benjamin Van Ryseghem (Pharo)
You can have a look here

Gofer it
url: 'http://smalltalkhub.com/mc/BenjaminVanRyseghem/DocTest/main';
package: 'DocTest';
load.

Then you can have a look at the test to see how it works :)

Basically MockCommentWithValidTests is a class with a comment containing valid test
then you can do

(DocTest testClass: MockCommentWithValidTests) run

It will run the test, and notify if something is wrong

Ben


On Jan 22, 2013, at 9:49 PM, Denis Kudriashov wrote:

2013/1/22 Sean P. DeNigris <[hidden email]>
Benjamin Van Ryseghem-2 wrote
> I am attending a python lecture and discovered DocTest[1], and I was
> wondering if such a tool exists for Pharo ? :)

I've been dreaming about, and doing experiments around, this for quite a
while... could be so much better in st because we can create custom UI tools
instead of text files...

I dream about it too :)). I remember we talk about this in Gent. But what experiments are you talk about? How I can try it?
I think BDD programming can be much better and simpler with smalltalk because we are not limited with text files and code syntax. We can work with objects and present it with any way we want.
With classic TDD we model system specs with test methods which are very restricted way for building readable and reusable specs of system. And I think we mix here few concepts: how to validate (run) specs, how to persist specs and what specs actualy is. And last item is what we should reimplement from scrach independently from others (we should forgot about others for the moment). BDD exactly about it. But nonsmalltalk world continue mix concepts because text files and code syntax is only way to persist and build system specs there. They was make just good refactoring of TDD approach which is very nice but I'm sure we can do better :)



Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Camillo Bruni-3
In reply to this post by Stéphane Ducasse
for that we already have a fully working Phexample:

http://www.squeaksource.com/phexample.html

which I will push in 3.0, cause I never really liked #assert: and friends being
sent to self. Furthermore we could finally build up decent messages!

On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:

> it would be nice to introduce the same syntax than Sunit
>
> exp assert: exp2
>
> [ exp ] shouldraise:
>
> Stef
>
>
> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>
>> Hi guys,
>>
>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>
>>
>> Ben
>>
>> [1]http://docs.python.org/2/library/doctest.html
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Tudor Girba-2
+1

Doru


On Jan 23, 2013, at 1:07 AM, Camillo Bruni <[hidden email]> wrote:

> for that we already have a fully working Phexample:
>
> http://www.squeaksource.com/phexample.html
>
> which I will push in 3.0, cause I never really liked #assert: and friends being
> sent to self. Furthermore we could finally build up decent messages!
>
> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>
>> it would be nice to introduce the same syntax than Sunit
>>
>> exp assert: exp2
>>
>> [ exp ] shouldraise:
>>
>> Stef
>>
>>
>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>
>>> Hi guys,
>>>
>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>
>>>
>>> Ben
>>>
>>> [1]http://docs.python.org/2/library/doctest.html
>>>
>>>
>>
>>
>
>

--
www.tudorgirba.com

"Every thing should have the right to be different."




Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Nicolas Cellier
In reply to this post by Camillo Bruni-3
Who should assert then?
From a certain POV, it does not seem that awfully unlogical to
delegate this responsability to a TestCase.
A TestCase is here to assert some rule.

Nicolas

2013/1/23 Camillo Bruni <[hidden email]>:

> for that we already have a fully working Phexample:
>
> http://www.squeaksource.com/phexample.html
>
> which I will push in 3.0, cause I never really liked #assert: and friends being
> sent to self. Furthermore we could finally build up decent messages!
>
> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>
>> it would be nice to introduce the same syntax than Sunit
>>
>>       exp assert: exp2
>>
>>       [ exp ] shouldraise:
>>
>> Stef
>>
>>
>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>
>>> Hi guys,
>>>
>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>
>>>
>>> Ben
>>>
>>> [1]http://docs.python.org/2/library/doctest.html
>>>
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Camillo Bruni-3
check the project page for all examples and explanations:

http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo

to me this feels more like Smalltalk and less like Java ;)

On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:

> Who should assert then?
> From a certain POV, it does not seem that awfully unlogical to
> delegate this responsability to a TestCase.
> A TestCase is here to assert some rule.
>
> Nicolas
>
> 2013/1/23 Camillo Bruni <[hidden email]>:
>> for that we already have a fully working Phexample:
>>
>> http://www.squeaksource.com/phexample.html
>>
>> which I will push in 3.0, cause I never really liked #assert: and friends being
>> sent to self. Furthermore we could finally build up decent messages!
>>
>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>>
>>> it would be nice to introduce the same syntax than Sunit
>>>
>>>      exp assert: exp2
>>>
>>>      [ exp ] shouldraise:
>>>
>>> Stef
>>>
>>>
>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>>
>>>> Hi guys,
>>>>
>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>>
>>>>
>>>> Ben
>>>>
>>>> [1]http://docs.python.org/2/library/doctest.html
>>>>
>>>>
>>>
>>>
>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Frank Shearar-3
Well, of course, JUnit feels that way because of SUnit, but sure.
RSpec-like testing languages read much more easily than #assert:, in
my not so humble opinion.

frank

On 23 January 2013 10:04, Camillo Bruni <[hidden email]> wrote:

> check the project page for all examples and explanations:
>
> http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
>
> to me this feels more like Smalltalk and less like Java ;)
>
> On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
>> Who should assert then?
>> From a certain POV, it does not seem that awfully unlogical to
>> delegate this responsability to a TestCase.
>> A TestCase is here to assert some rule.
>>
>> Nicolas
>>
>> 2013/1/23 Camillo Bruni <[hidden email]>:
>>> for that we already have a fully working Phexample:
>>>
>>> http://www.squeaksource.com/phexample.html
>>>
>>> which I will push in 3.0, cause I never really liked #assert: and friends being
>>> sent to self. Furthermore we could finally build up decent messages!
>>>
>>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>>>
>>>> it would be nice to introduce the same syntax than Sunit
>>>>
>>>>      exp assert: exp2
>>>>
>>>>      [ exp ] shouldraise:
>>>>
>>>> Stef
>>>>
>>>>
>>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>>>
>>>>>
>>>>> Ben
>>>>>
>>>>> [1]http://docs.python.org/2/library/doctest.html
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Sven Van Caekenberghe-2
In reply to this post by Camillo Bruni-3
Yes we #should ;-)

It is beautiful.

On 23 Jan 2013, at 11:04, Camillo Bruni <[hidden email]> wrote:

> check the project page for all examples and explanations:
>
> http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
>
> to me this feels more like Smalltalk and less like Java ;)
>
> On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
>> Who should assert then?
>> From a certain POV, it does not seem that awfully unlogical to
>> delegate this responsability to a TestCase.
>> A TestCase is here to assert some rule.
>>
>> Nicolas
>>
>> 2013/1/23 Camillo Bruni <[hidden email]>:
>>> for that we already have a fully working Phexample:
>>>
>>> http://www.squeaksource.com/phexample.html
>>>
>>> which I will push in 3.0, cause I never really liked #assert: and friends being
>>> sent to self. Furthermore we could finally build up decent messages!
>>>
>>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>>>
>>>> it would be nice to introduce the same syntax than Sunit
>>>>
>>>>     exp assert: exp2
>>>>
>>>>     [ exp ] shouldraise:
>>>>
>>>> Stef
>>>>
>>>>
>>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>>>
>>>>>
>>>>> Ben
>>>>>
>>>>> [1]http://docs.python.org/2/library/doctest.html
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Tudor Girba-2
FYI, we are already using Phexample in Moose since several years, and it just works out of the box next to Sunit.

Doru

On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
Yes we #should ;-)

It is beautiful.

On 23 Jan 2013, at 11:04, Camillo Bruni <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;camillobruni@gmail.com&#39;)">camillobruni@...> wrote:

> check the project page for all examples and explanations:
>
> http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
>
> to me this feels more like Smalltalk and less like Java ;)
>
> On 2013-01-23, at 08:47, Nicolas Cellier <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;nicolas.cellier.aka.nice@gmail.com&#39;)">nicolas.cellier.aka.nice@...> wrote:
>> Who should assert then?
>> From a certain POV, it does not seem that awfully unlogical to
>> delegate this responsability to a TestCase.
>> A TestCase is here to assert some rule.
>>
>> Nicolas
>>
>> 2013/1/23 Camillo Bruni <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;camillobruni@gmail.com&#39;)">camillobruni@...>:
>>> for that we already have a fully working Phexample:
>>>
>>> http://www.squeaksource.com/phexample.html
>>>
>>> which I will push in 3.0, cause I never really liked #assert: and friends being
>>> sent to self. Furthermore we could finally build up decent messages!
>>>
>>> On 2013-01-22, at 18:24, Stéphane Ducasse <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;stephane.ducasse@inria.fr&#39;)">stephane.ducasse@...> wrote:
>>>
>>>> it would be nice to introduce the same syntax than Sunit
>>>>
>>>>     exp assert: exp2
>>>>
>>>>     [ exp ] shouldraise:
>>>>
>>>> Stef
>>>>
>>>>
>>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>>>
>>>>>
>>>>> Ben
>>>>>
>>>>> [1]http://docs.python.org/2/library/doctest.html
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>




--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Sven Van Caekenberghe-2

On 23 Jan 2013, at 11:34, Tudor Girba <[hidden email]> wrote:

> FYI, we are already using Phexample in Moose since several years, and it just works out of the box next to Sunit.

That is good to know.
Moose is a really important project for Pharo.
It feels good to know that such a big code base is pushing forward like that.

BTW, is work already being done bring Moose to Pharo 2.0 ?

> Doru
>
> On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
> Yes we #should ;-)
>
> It is beautiful.
>
> On 23 Jan 2013, at 11:04, Camillo Bruni <[hidden email]> wrote:
>
> > check the project page for all examples and explanations:
> >
> > http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> > http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
> >
> > to me this feels more like Smalltalk and less like Java ;)
> >
> > On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
> >> Who should assert then?
> >> From a certain POV, it does not seem that awfully unlogical to
> >> delegate this responsability to a TestCase.
> >> A TestCase is here to assert some rule.
> >>
> >> Nicolas
> >>
> >> 2013/1/23 Camillo Bruni <[hidden email]>:
> >>> for that we already have a fully working Phexample:
> >>>
> >>> http://www.squeaksource.com/phexample.html
> >>>
> >>> which I will push in 3.0, cause I never really liked #assert: and friends being
> >>> sent to self. Furthermore we could finally build up decent messages!
> >>>
> >>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
> >>>
> >>>> it would be nice to introduce the same syntax than Sunit
> >>>>
> >>>>     exp assert: exp2
> >>>>
> >>>>     [ exp ] shouldraise:
> >>>>
> >>>> Stef
> >>>>
> >>>>
> >>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
> >>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
> >>>>>
> >>>>>
> >>>>> Ben
> >>>>>
> >>>>> [1]http://docs.python.org/2/library/doctest.html
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Tudor Girba-2
We are releasing Moose as soon as we figure out how to load RPackage from PharoTaskForces squeak source repository (see my previous mail), and afterwards we move to 2.0.

Cheers,
Doru



On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:

On 23 Jan 2013, at 11:34, Tudor Girba <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;tudor@tudorgirba.com&#39;)">tudor@...> wrote:

> FYI, we are already using Phexample in Moose since several years, and it just works out of the box next to Sunit.

That is good to know.
Moose is a really important project for Pharo.
It feels good to know that such a big code base is pushing forward like that.

BTW, is work already being done bring Moose to Pharo 2.0 ?

> Doru
>
> On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
> Yes we #should ;-)
>
> It is beautiful.
>
> On 23 Jan 2013, at 11:04, Camillo Bruni <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;camillobruni@gmail.com&#39;)">camillobruni@...> wrote:
>
> > check the project page for all examples and explanations:
> >
> > http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> > http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
> >
> > to me this feels more like Smalltalk and less like Java ;)
> >
> > On 2013-01-23, at 08:47, Nicolas Cellier <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;nicolas.cellier.aka.nice@gmail.com&#39;)">nicolas.cellier.aka.nice@...> wrote:
> >> Who should assert then?
> >> From a certain POV, it does not seem that awfully unlogical to
> >> delegate this responsability to a TestCase.
> >> A TestCase is here to assert some rule.
> >>
> >> Nicolas
> >>
> >> 2013/1/23 Camillo Bruni <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;camillobruni@gmail.com&#39;)">camillobruni@...>:
> >>> for that we already have a fully working Phexample:
> >>>
> >>> http://www.squeaksource.com/phexample.html
> >>>
> >>> which I will push in 3.0, cause I never really liked #assert: and friends being
> >>> sent to self. Furthermore we could finally build up decent messages!
> >>>
> >>> On 2013-01-22, at 18:24, Stéphane Ducasse <<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;stephane.ducasse@inria.fr&#39;)">stephane.ducasse@...> wrote:
> >>>
> >>>> it would be nice to introduce the same syntax than Sunit
> >>>>
> >>>>     exp assert: exp2
> >>>>
> >>>>     [ exp ] shouldraise:
> >>>>
> >>>> Stef
> >>>>
> >>>>
> >>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
> >>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
> >>>>>
> >>>>>
> >>>>> Ben
> >>>>>
> >>>>> [1]http://docs.python.org/2/library/doctest.html
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>




--

"Every thing has its own flow"

Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Nicolas Cellier
In reply to this post by Frank Shearar-3
Sure, such kind of DSL is cute,
What is the relation to http://www.squeaksource.com/SSpec/ ?
http://www.smalltalkhub.com/#!/~dionisiy/Mocketry ?

Nicolas

2013/1/23 Frank Shearar <[hidden email]>:

> Well, of course, JUnit feels that way because of SUnit, but sure.
> RSpec-like testing languages read much more easily than #assert:, in
> my not so humble opinion.
>
> frank
>
> On 23 January 2013 10:04, Camillo Bruni <[hidden email]> wrote:
>> check the project page for all examples and explanations:
>>
>> http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
>> http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
>>
>> to me this feels more like Smalltalk and less like Java ;)
>>
>> On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
>>> Who should assert then?
>>> From a certain POV, it does not seem that awfully unlogical to
>>> delegate this responsability to a TestCase.
>>> A TestCase is here to assert some rule.
>>>
>>> Nicolas
>>>
>>> 2013/1/23 Camillo Bruni <[hidden email]>:
>>>> for that we already have a fully working Phexample:
>>>>
>>>> http://www.squeaksource.com/phexample.html
>>>>
>>>> which I will push in 3.0, cause I never really liked #assert: and friends being
>>>> sent to self. Furthermore we could finally build up decent messages!
>>>>
>>>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
>>>>
>>>>> it would be nice to introduce the same syntax than Sunit
>>>>>
>>>>>      exp assert: exp2
>>>>>
>>>>>      [ exp ] shouldraise:
>>>>>
>>>>> Stef
>>>>>
>>>>>
>>>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
>>>>>>
>>>>>>
>>>>>> Ben
>>>>>>
>>>>>> [1]http://docs.python.org/2/library/doctest.html
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Stéphane Ducasse
In reply to this post by Tudor Girba-2
Doru I will try to have a look later today but busy….

Stef
On Jan 23, 2013, at 8:38 AM, Tudor Girba wrote:

> We are releasing Moose as soon as we figure out how to load RPackage from PharoTaskForces squeak source repository (see my previous mail), and afterwards we move to 2.0.
>
> Cheers,
> Doru
>
>
>
> On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
>
> On 23 Jan 2013, at 11:34, Tudor Girba <[hidden email]> wrote:
>
> > FYI, we are already using Phexample in Moose since several years, and it just works out of the box next to Sunit.
>
> That is good to know.
> Moose is a really important project for Pharo.
> It feels good to know that such a big code base is pushing forward like that.
>
> BTW, is work already being done bring Moose to Pharo 2.0 ?
>
> > Doru
> >
> > On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
> > Yes we #should ;-)
> >
> > It is beautiful.
> >
> > On 23 Jan 2013, at 11:04, Camillo Bruni <[hidden email]> wrote:
> >
> > > check the project page for all examples and explanations:
> > >
> > > http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> > > http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
> > >
> > > to me this feels more like Smalltalk and less like Java ;)
> > >
> > > On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
> > >> Who should assert then?
> > >> From a certain POV, it does not seem that awfully unlogical to
> > >> delegate this responsability to a TestCase.
> > >> A TestCase is here to assert some rule.
> > >>
> > >> Nicolas
> > >>
> > >> 2013/1/23 Camillo Bruni <[hidden email]>:
> > >>> for that we already have a fully working Phexample:
> > >>>
> > >>> http://www.squeaksource.com/phexample.html
> > >>>
> > >>> which I will push in 3.0, cause I never really liked #assert: and friends being
> > >>> sent to self. Furthermore we could finally build up decent messages!
> > >>>
> > >>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
> > >>>
> > >>>> it would be nice to introduce the same syntax than Sunit
> > >>>>
> > >>>>     exp assert: exp2
> > >>>>
> > >>>>     [ exp ] shouldraise:
> > >>>>
> > >>>> Stef
> > >>>>
> > >>>>
> > >>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
> > >>>>
> > >>>>> Hi guys,
> > >>>>>
> > >>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
> > >>>>>
> > >>>>>
> > >>>>> Ben
> > >>>>>
> > >>>>> [1]http://docs.python.org/2/library/doctest.html
> > >>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>
> > >
> > >
> >
> >
> >
> >
> > --
> > www.tudorgirba.com
> >
> > "Every thing has its own flow"
> >
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>


Reply | Threaded
Open this post in threaded view
|

Re: DocTest

Noury Bouraqadi-2
In reply to this post by Tudor Girba-2
I find PhExample very interesting!
Is there any doc/paper other than these two web pages.

Noury
On 23 janv. 2013, at 11:34, Tudor Girba wrote:

> FYI, we are already using Phexample in Moose since several years, and it just works out of the box next to Sunit.
>
> Doru
>
> On Wednesday, January 23, 2013, Sven Van Caekenberghe wrote:
> Yes we #should ;-)
>
> It is beautiful.
>
> On 23 Jan 2013, at 11:04, Camillo Bruni <[hidden email]> wrote:
>
> > check the project page for all examples and explanations:
> >
> > http://smalltalkthoughts.blogspot.ch/2009/11/phexample-because-examples-expand-on.html
> > http://www.iam.unibe.ch/~akuhn/blog/2009/shoulda-use-this-in-pharo
> >
> > to me this feels more like Smalltalk and less like Java ;)
> >
> > On 2013-01-23, at 08:47, Nicolas Cellier <[hidden email]> wrote:
> >> Who should assert then?
> >> From a certain POV, it does not seem that awfully unlogical to
> >> delegate this responsability to a TestCase.
> >> A TestCase is here to assert some rule.
> >>
> >> Nicolas
> >>
> >> 2013/1/23 Camillo Bruni <[hidden email]>:
> >>> for that we already have a fully working Phexample:
> >>>
> >>> http://www.squeaksource.com/phexample.html
> >>>
> >>> which I will push in 3.0, cause I never really liked #assert: and friends being
> >>> sent to self. Furthermore we could finally build up decent messages!
> >>>
> >>> On 2013-01-22, at 18:24, Stéphane Ducasse <[hidden email]> wrote:
> >>>
> >>>> it would be nice to introduce the same syntax than Sunit
> >>>>
> >>>>     exp assert: exp2
> >>>>
> >>>>     [ exp ] shouldraise:
> >>>>
> >>>> Stef
> >>>>
> >>>>
> >>>> On Jan 21, 2013, at 4:41 AM, Benjamin wrote:
> >>>>
> >>>>> Hi guys,
> >>>>>
> >>>>> I am attending a python lecture and discovered DocTest[1], and I was wondering if such a tool exists for Pharo ? :)
> >>>>>
> >>>>>
> >>>>> Ben
> >>>>>
> >>>>> [1]http://docs.python.org/2/library/doctest.html
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>

Noury Bouraqadi
Ecole des Mines de Douai
http://car.mines-douai.fr/noury
--




Afin de contribuer au respect de l'environnement,
merci de n'imprimer ce courriel qu'en cas de necessite

Please consider the environment before you print