[Zope-Coders] Re: Zope tests: 4 OK, 4 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martijn Pieters wrote: Martijn Pieters wrote: The error occurs in Products/Five/tests/forms.txt, which means it needs to be fixed in the Five repository, not in the Zope repository (at least not permanently). Indeed nearly all the functional tests there set handle_errors=False, which can be dropped to handle this situation better. Alternatively the test can be altered to expect a Traceback ... Unauthorized. I see you already checked in a fix to the Five codebase, but because you didn't propagate this to the Zope codebase the test fails there. I checked in a fix there before I learned of you Five checkin. Here is my patch, which changes the test to expect Unauthorized to be raised: --- lib/python/Products/Five/tests/forms.txt(revision 38617) +++ lib/python/Products/Five/tests/forms.txt(working copy) @@ -36,8 +36,9 @@ ... GET /test_folder_1_/ftf/+/protectedaddform.html HTTP/1.1 ... Authorization: Basic viewer:secret ... , handle_errors=False) - HTTP/1.1 401 Unauthorized + Traceback (most recent call last): ... + Unauthorized: ... Now let's add a piece of our sample content object to test more things on it: This is the direct opposite of your fix in the Five codebase, where you removed the handle_errors=False flag instead. I assumed the keyword was there for a reason (propagate unexpected exceptions during testing?) so I used the Traceback approach instead. Do the Five ppl want this approach instead? If not, just ignore my change to the Zope codebase and have a future version of Five overwrite it. I'm fine with either way; 'handle_errors=False' is a signal (to me, anyway) that the test is more a unit test (which cares about exceptions for edge cases) than a functional test (which cares that appropriate error pages are returned to the users). Feel free to port your change to the Five/branch/Five-1.1 and Five/trunk, AFAIAC. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDOYG5+gerLs4ltQ4RAkdcAJ0SdXOZey8GaJ7aX43ruUIYFI+oyACbBr0Z HdzWV/cYGVd8ExSe72G7zNA= =OAf4 -END PGP SIGNATURE- ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] Re: Zope tests: 4 OK, 4 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zope tests summarizer wrote: Summary of messages to the zope-tests list. Period Sun Sep 25 11:01:02 2005 UTC to Mon Sep 26 11:01:02 2005 UTC. There were 8 messages: 8 from Zope Unit Tests. Test failures - Subject: FAILED (failures=1) : Zope-2_8-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:32:19 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003179.html Subject: FAILED (failures=1) : Zope-2_8-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:33:49 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003180.html Subject: FAILED (failures=1) : Zope-trunk Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:35:19 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003181.html Subject: FAILED (failures=1) : Zope-trunk Python-2.4.1 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:36:49 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003182.html Tests passed OK --- Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:26:19 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003175.html Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:27:49 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003176.html Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:29:19 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003177.html Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux From: Zope Unit Tests Date: Sun Sep 25 22:30:49 EDT 2005 URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003178.html These errors are my fault, I think: I changed the underlying 'publish_method' to behave correctly, i.e. not capturing exceptions when 'handle_errors' was passed as False. I'll look at this when I'm back in the states, unless somebody finds the test which expects an error page rather than an exception / traceback first, and either turns off 'handle_errors=False' or changes the expected output. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDN9cZ+gerLs4ltQ4RAuZmAJ45zextAGP3n2chks93a3bkz4X03gCfXLTW PNCtB1cW0wZAhkiHk+XhuPg= =Qw8L -END PGP SIGNATURE- ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] Re: Zope tests: 4 OK, 4 Failed
Tres Seaver wrote: These errors are my fault, I think: I changed the underlying 'publish_method' to behave correctly, i.e. not capturing exceptions when 'handle_errors' was passed as False. I'll look at this when I'm back in the states, unless somebody finds the test which expects an error page rather than an exception / traceback first, and either turns off 'handle_errors=False' or changes the expected output. The error occurs in Products/Five/tests/forms.txt, which means it needs to be fixed in the Five repository, not in the Zope repository (at least not permanently). Indeed nearly all the functional tests there set handle_errors=False, which can be dropped to handle this situation better. Alternatively the test can be altered to expect a Traceback ... Unauthorized. Martijn ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders
[Zope-Coders] Re: Zope tests: 4 OK, 4 Failed
Martijn Pieters wrote: The error occurs in Products/Five/tests/forms.txt, which means it needs to be fixed in the Five repository, not in the Zope repository (at least not permanently). Indeed nearly all the functional tests there set handle_errors=False, which can be dropped to handle this situation better. Alternatively the test can be altered to expect a Traceback ... Unauthorized. I see you already checked in a fix to the Five codebase, but because you didn't propagate this to the Zope codebase the test fails there. I checked in a fix there before I learned of you Five checkin. Here is my patch, which changes the test to expect Unauthorized to be raised: --- lib/python/Products/Five/tests/forms.txt(revision 38617) +++ lib/python/Products/Five/tests/forms.txt(working copy) @@ -36,8 +36,9 @@ ... GET /test_folder_1_/ftf/+/protectedaddform.html HTTP/1.1 ... Authorization: Basic viewer:secret ... , handle_errors=False) - HTTP/1.1 401 Unauthorized + Traceback (most recent call last): ... + Unauthorized: ... Now let's add a piece of our sample content object to test more things on it: This is the direct opposite of your fix in the Five codebase, where you removed the handle_errors=False flag instead. I assumed the keyword was there for a reason (propagate unexpected exceptions during testing?) so I used the Traceback approach instead. Do the Five ppl want this approach instead? If not, just ignore my change to the Zope codebase and have a future version of Five overwrite it. Martijn ___ Zope-Coders mailing list Zope-Coders@zope.org http://mail.zope.org/mailman/listinfo/zope-coders