
---------- Forwarded message ---------- From: Guilherme Polo <ggpolo@gmail.com> Date: Wed, Mar 11, 2009 at 8:04 PM Subject: Re: [Python-ideas] Adding a test discovery into Python To: Raymond Hettinger <python@rcn.com>, python-dev@python.org On Wed, Mar 11, 2009 at 7:37 PM, Raymond Hettinger <python@rcn.com> wrote:
Interesting or not, it is a problem that is asking for a solution, this kind of code is being duplicated in several places for no good reason.
Axiom: The more work involved in writing tests, the fewer tests that will get written.
At some point you will have to run them too, I don't think you want to reimplement the discovery part yet another time. -- -- Guilherme H. Polo Goncalves

On Mar 11, 2009, at 8:05 PM, Guilherme Polo wrote:
What I think he was getting at is that 20-30 lines of test discovery have to be written once for each project (or none if using py.test/ nose), but self.assertequals and all of the other quirks of unittest are all over a test suite and you need to write all of it each time you have to make a test. Not that what you are trying to do is pointless, but fixing this other problem is so much more interesting... -- Leonardo Santagada santagada at gmail.com

On Thu, Mar 12, 2009 at 12:04 AM, Leonardo Santagada <santagada@gmail.com> wrote:
This is incredible pointless if you think it this way, "only 20-30 lines". I really don't believe you will come up with something decent in 20-30 lines if you intend this to be reusable for nose and maybe py.test (although I haven't looked much into py.test), it is not just about finding files, have you read the previous emails in the discussion ?
-- -- Guilherme H. Polo Goncalves

Guilherme Polo <ggpolo@...> writes:
+1. self.assertEqual is just a typing annoyance compared to the burden of getting the aforementioned "20-30 lines" right. (you can probably even rip off the nose.tools module and use its convenience functions within unittest-driven tests: ok_, eq_, etc.)

On Mar 11, 2009, at 8:05 PM, Guilherme Polo wrote:
What I think he was getting at is that 20-30 lines of test discovery have to be written once for each project (or none if using py.test/ nose), but self.assertequals and all of the other quirks of unittest are all over a test suite and you need to write all of it each time you have to make a test. Not that what you are trying to do is pointless, but fixing this other problem is so much more interesting... -- Leonardo Santagada santagada at gmail.com

On Thu, Mar 12, 2009 at 12:04 AM, Leonardo Santagada <santagada@gmail.com> wrote:
This is incredible pointless if you think it this way, "only 20-30 lines". I really don't believe you will come up with something decent in 20-30 lines if you intend this to be reusable for nose and maybe py.test (although I haven't looked much into py.test), it is not just about finding files, have you read the previous emails in the discussion ?
-- -- Guilherme H. Polo Goncalves

Guilherme Polo <ggpolo@...> writes:
+1. self.assertEqual is just a typing annoyance compared to the burden of getting the aforementioned "20-30 lines" right. (you can probably even rip off the nose.tools module and use its convenience functions within unittest-driven tests: ok_, eq_, etc.)
participants (3)
-
Antoine Pitrou
-
Guilherme Polo
-
Leonardo Santagada