About deprecation and unit testing
http://stackoverflow.com/questions/20369972/about-deprecation-and-unit-testi... -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
On 04 Dec 2013, at 08:57, Damien Cassou <damien.cassou@gmail.com> wrote:
http://stackoverflow.com/questions/20369972/about-deprecation-and-unit-testi...
There is a related bug tracker entry: 11423 Running unit tests that raise deprecation warnings makes them fail incomprehensibly https://pharo.fogbugz.com/f/cases/11423
On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
There is a related bug tracker entry:
I will try to propose a slice that ignores deprecation warnings while running the tests. But this will make it harder for people to find deprecated message sends. -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Hi All, I think that trapping Deprecations silently is not a good idea. As you said, people will not see them and it will be hard to upgrade code. Why not having a Preference? or another button in the TestRunner such as: "Run ignoring Deprecation"? #Luc 2013/12/4 Damien Cassou <damien.cassou@gmail.com>
On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
There is a related bug tracker entry:
I will try to propose a slice that ignores deprecation warnings while running the tests. But this will make it harder for people to find deprecated message sends.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Hi guys, Deprecation is a subclass of Warning, not Error. And I think this is absolutely correct. So the basic question here is if the action on Warnings and Notifications in general in SUnit is correct or should be changed. This is not necessarily limited to Deprecation. Of course we need a possibility to test assertions about Deprecations and other Notifications as well, so it sure is not a good idea to make "transparent" changes and simply ignore Deprecation or any other kind of Notification/Warning. Just my 2 cents Joachim Am 05.12.13 10:41, schrieb btc@openinworld.com:
Luc Fabresse wrote:
Hi All, I think that trapping Deprecations silently is not a good idea. As you said, people will not see them and it will be hard to upgrade code. Why not having a Preference? or another button in the TestRunner such as: "Run ignoring Deprecation"?
#Luc
2013/12/4 Damien Cassou <damien.cassou@gmail.com <mailto:damien.cassou@gmail.com>>
On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> wrote: > There is a related bug tracker entry:
I will try to propose a slice that ignores deprecation warnings while running the tests. But this will make it harder for people to find deprecated message sends.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
Or adding a new reported category "Deprecations" to go with "Expected Failure"
-- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
On 04 Dec 2013, at 09:33, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
There is a related bug tracker entry:
I will try to propose a slice that ignores deprecation warnings while running the tests. But this will make it harder for people to find deprecated message sends.
No, I wouldnât do that by default: that would defeat the whole purpose of deprecation. If you want to ignore deprecations, you should do it yourself in your own tests, at your own risk, IMHO.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
On Wed, Dec 4, 2013 at 9:50 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
No, I wouldnât do that by default: that would defeat the whole purpose of deprecation. If you want to ignore deprecations, you should do it yourself in your own tests, at your own risk, IMHO.
what about: - when the preference #raiseWarning: is true, a test sending a deprecated message fails - when the preference #raiseWarning: is false, a test sending a deprecated message succeeds Implemented in: Name: SLICE-Issue-11423-Running-unit-tests-that-raise-deprecation-warnings-makes-them-fail-incomprehensibly-DamienCassou.1 Author: DamienCassou Time: 4 December 2013, 9:56:07.727774 am UUID: bc043b07-b57b-4b5c-b140-8805a4397d31 Ancestors: Dependencies: SUnit-Tests-DamienCassou.31, SUnit-Core-DamienCassou.107 - when the preference #raiseWarning: is true, a test sending a deprecated message fails - when the preference #raiseWarning: is false, a test sending a deprecated message succeeds -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
On 04 Dec 2013, at 09:56, Damien Cassou <damien.cassou@gmail.com> wrote:
On Wed, Dec 4, 2013 at 9:50 AM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
No, I wouldnât do that by default: that would defeat the whole purpose of deprecation. If you want to ignore deprecations, you should do it yourself in your own tests, at your own risk, IMHO.
what about:
- when the preference #raiseWarning: is true, a test sending a deprecated message fails - when the preference #raiseWarning: is false, a test sending a deprecated message succeeds
Implemented in:
Name: SLICE-Issue-11423-Running-unit-tests-that-raise-deprecation-warnings-makes-them-fail-incomprehensibly-DamienCassou.1 Author: DamienCassou Time: 4 December 2013, 9:56:07.727774 am UUID: bc043b07-b57b-4b5c-b140-8805a4397d31 Ancestors: Dependencies: SUnit-Tests-DamienCassou.31, SUnit-Core-DamienCassou.107
- when the preference #raiseWarning: is true, a test sending a deprecated message fails - when the preference #raiseWarning: is false, a test sending a deprecated message succeeds
OK, that sounds reasonable, Damien.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
You could do: [ 'foobar' asFileReference ensureDeleted ] on: Deprecation do: [ :exception | exception resume ] On 04 Dec 2013, at 08:57, Damien Cassou <damien.cassou@gmail.com> wrote:
http://stackoverflow.com/questions/20369972/about-deprecation-and-unit-testi...
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." Winston Churchill
participants (6)
-
btc@openinworld.com -
Damien Cassou -
jtuchel@objektfabrik.de -
Luc Fabresse -
Marcus Denker -
Sven Van Caekenberghe