[Zope3-dev] Re: Deleting utilities in site management doesn't work correct

2005-10-08 Thread jürgen Kartnaller
Thanks Tres,
I'll give it a try.

Jürgen

Tres Seaver wrote:
 jürgen Kartnaller wrote:
 
Hi Tres,
I would really like to make a test for this but I have no idea how to start.

It took me 10 minutes to fix the problem but I think it will take me 10
hours to write the test.

If you can point me to a starting direction or just give me an example
test somewhere I will give it a try !
 
 
 Hmmm, the code in src/zope/app/component/browser has no tests at all.
 There is a 'xxx_tests' directory, which looks to have a bunch of
 now-invalid tests, moved aside by Stephan during servicegeddon.  I'll CC
 him just in case some of those tests were supposed to come back online.
 
 For your bug, I would start by writing a doctest for the tools.py
 module, something like:
 
  1. Create a 'tests' subdirectory in the 'browser' directory, and
 give it an empty '__init__.py'::
 
 $ mkdir src/zope/app/component/browser/tests
 $ cat  src/zope/app/component/browser/tests/__init__.py
 # Python package
 ^D
 
  2. Add a 'tests/test_tools.py' module, with boilerplate to run
 the doctests in 'tools.txt':
 
 $ cat  src/zope/app/component/browser/tests/test_tools.py
 import unittest
 from zope.testing import doctest
 from zope.app.testing.placelesssetup import setUp
 from zope.app.testing.placelesssetup import tearDown
 
 def test_suite():
 return unittest.TestSuite((
 doctest.DocFileSuite('../tools.txt',
  setUp=setUp,
  tearDown=tearDown),
 ))
 
 if __name__ == __main__:
 unittest.main(defaultTest='test_suite')
 ^D
 
  3. Start writing 'tools.txt', documenting the behavior of the
 methods of the SiteManagementView class.  You could write only
 a test for 'delete' first, which should fail until you apply
 your patch.  Look at 'src/zope/app/component/adapterregistry.txt'
 for an example doctest file.
 
 $ vim src/zope/app/component/browser/tools.txt
 
  4. Run the tests, iteratively, during development:
 
 $ python test.py -u zope.app.component.browser
 
  5. Check in the new tools.txt and tests/ directory:
 
 $ svn add src/zope/app/component/browser/tools.txt
 $ svn add src/zope/app/component/browser/tests
 $ svn commit -m Ensure that SiteManagerView.delete doesn't\
 bite it's own tail.
 
 
 Hope that helps,
 
 
 Tres.
 --
 ===
 Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
 Palladion Software   Excellence by Designhttp://palladion.com

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] fssync and export/import for Zope 3

2005-10-08 Thread Andreas Jung



--On 7. Oktober 2005 11:25:00 -0500 Garrett Smith [EMAIL PROTECTED] 
wrote:




- The export/import functionality people are used to with Zope 2

I suspect the export/import feature alone will be attractive to anyone
with production servers, as it enables object-specific backup and restore.


Export/import is likely much more important than being able to edit content 
on the filesystem. Writing simple mechanisms for exporting/importing 
schema-based content to XML/from XML should not be so hard.


-aj



pgpkOWZo95InH.pgp
Description: PGP signature
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Debugging Zope

2005-10-08 Thread Florian Lindner
Hello,
what tools do you use for debugging your Zope applications and/or the Zope 
source? Is there something more comforable (more graphical) than pdb 
available? I've tried eric3 but it does not work, probably due to Zope3 
spawning processes.

Thanks,

Florian
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com