Hash: SHA1

Paul Winkler wrote:
> On Thu, Apr 06, 2006 at 12:06:25PM -0400, Paul Winkler wrote:
>>On Thu, Apr 06, 2006 at 10:45:11AM +0200, Stefan H. Holek wrote:
>>>The VHM tests in Zope 2.9 and trunk broke last night:
>>I'm assuming this was me, but I ran test.py -q -all before checking in
>>so I'm not sure how that happened. Investigating.
> Must've run the tests in the wrong sandbox :-\
> This failure was a side-effect of the changes I made:
> - The unit tests in Products/Session were polluting os.environ
>   with SERVER_NAME and SERVER_PORT keys.
> - The unit tests in Products/SiteAccess were relying on the old
>   behavior of Testing.makerequest to unconditionally set those
>   keys in the request.
> - My change allowed the values from the Sessions tests to show up
>   in the SiteAccess tests.
> I've fixed the Sessions tests to use a dict instead of os.environ.
> But I'm also concerned that similarly indirect breakage might happen
> in other projects if they use os.environ carelessly.
> This part of my change was an effort to remove redundancy,
> not a bugfix; so on second thought, given the demonstrated
> potential for breakage in other test suites, it doesn't
> belong on the stable 2.9 branch and I'll revert that change there.
> But I'll leave it on the trunk.

+1 for getting rid of *anything* in Testing which does something as
Utterly Evil (tm) as scribbling on 'os.environ'.

Any tests which break on that account should be fixed, not covered over.
 You don't risk breaking production code, only tests, and those *need*
to be fixed, even when running against the "stable" tree (I would even
think backporting to 2.8 was worthwhile, just for the  testing bugs it
would expose).

- --
Tres Seaver          +1 202-558-7113          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to