-----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