Re: [Zope-CMF] Duplicate test in CMFDefault.browser.test_ursa?

2010-04-03 Thread Charlie Clark
Am 03.04.2010, 19:47 Uhr, schrieb Tres Seaver :

> Sounds right.  I'm probably the guilty part here (or at least those look
> like my style of testing ;).

At least they're in there! Still working on mine for my new "absolut" skin.

>> Do duplicate method names in tests mean that only one of the tests will
>> run?

> Yes:  Python doesn't treat such cases as errors:  it (silently) replaces
> the originally-bound name with a new binding.

I thought so, but I wanted to be sure. I sometimes run PyLint on my stuff  
which picks up on this kind of thing but somehow the bindings for my  
editor have got borked.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests


Re: [Zope-CMF] Duplicate test in CMFDefault.browser.test_ursa?

2010-04-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Charlie Clark wrote:
> Hi,
> 
> I've started working on some tests for a browser view and was looking at  
> the ursa globals tests for inspiration. It looks to me that there is a  
> duplicate test method
> 
> li. 278ff:
> 
>  def test_status_message_missing(self):
>  view = self._makeOne()
>  view.request.form = {}
>  self.assertEqual(view.status_message, None)
> 
>  def test_status_message_missing(self):
>  view = self._makeOne()
>  view.request.form = {'portal_status_message': 'FOO'}
>  self.assertEqual(view.status_message, 'FOO')
> 
> I think the second method should probably be called test_status_message.

Sounds right.  I'm probably the guilty part here (or at least those look
like my style of testing ;).

> Do duplicate method names in tests mean that only one of the tests will  
> run?

Yes:  Python doesn't treat such cases as errors:  it (silently) replaces
the originally-bound name with a new binding.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAku3fz8ACgkQ+gerLs4ltQ4VLQCgjav25c2Ed3UHuzBFh0DiLYQD
YH4AoJ/k1HPkNlHx0bohKjNd0zoiGBop
=FlK0
-END PGP SIGNATURE-

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests