Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread Stéphane Ducasse
+1 > > One could now start a new discussion on whether this use case is "unit > testing" or now, but I guess we can be glad when people write any kind of > test ;-) > Not every thing that should be improved can be improved by changing tools. > Sometimes it really is a people thing.

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread jtuc...@objektfabrik.de
Esteban, good point. I use Tests sometimes as a mixture of design help and living documentation. And there, test cases almost never match classes 1:1. And I also think that is a good thing. Especially when it comes to refactoring and major redesign where the API of some entry points to a certa

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread Camille Teruel
On 18 nov. 2013, at 13:07, Esteban A. Maringolo wrote: > I don't like having the Unit Tests so coupled with the code. > > Many times I implement Unit Tests that doesn't match 1:1 with a class. > It is... the TestCase subclass doesn't have a corresponding class (eg. > SomeFeatureTest, with no So

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread Esteban A. Maringolo
I don't like having the Unit Tests so coupled with the code. Many times I implement Unit Tests that doesn't match 1:1 with a class. It is... the TestCase subclass doesn't have a corresponding class (eg. SomeFeatureTest, with no SomeFeature class in the system). Regards, Esteban A. Maringolo 2

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread Camille Teruel
On 17 nov. 2013, at 15:16, Tudor Girba wrote: > I stumbled across this idea when Markus Gaelli chose it as a PhD topic about > ten years ago (man, I'm old). The main idea was not to provide tests, but > examples that happened to have assertions. The goal was twofold: (1) provide > live docume

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-18 Thread p...@highoctane.be
Agreed. And the more I use Pharo, the more I am looking into tests (especially "Debug Test" to understand how things do work) and writing tests first. That's not a natural thing to do in other environments but feels so great to do in Pharo. (Writing this after having looked at a ton of Seaside a

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-17 Thread jtuc...@objektfabrik.de
Hi, the good thing about the current practice of putting tests into another package/application is that you can separate them from your actual code for deployment (packaging), but you can also add them to your deliverable. If you mix code and tests, there may be good points about that, but in

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-17 Thread Andy Burnett
Esteban said <<< Hi, It does not really matters where you put the test. What matters is to have the tools that show them properly, and we are going in that direction. We already have ways to "jump to tests" in Nautilus, and we will continue improving that to show them together (for example). But

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-17 Thread Andy Burnett
Doru said: <<< I stumbled across this idea when Markus Gaelli chose it as a PhD topic about ten years ago (man, I'm old). The main idea was not to provide tests, but examples that happened to have assertions. The goal was twofold: (1) provide live documentation with real objects, (2) provide anothe

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-17 Thread Esteban Lorenzano
Hi, It does not really matters where you put the test. What matters is to have the tools that show them properly, and we are going in that direction. We already have ways to "jump to tests" in Nautilus, and we will continue improving that to show them together (for example). But I do not thin

Re: [Pharo-users] Pyret: adding tests directly into classes

2013-11-17 Thread Tudor Girba
I stumbled across this idea when Markus Gaelli chose it as a PhD topic about ten years ago (man, I'm old). The main idea was not to provide tests, but examples that happened to have assertions. The goal was twofold: (1) provide live documentation with real objects, (2) provide another way of compos