On Fri, 2009-03-13 at 13:28 +0300, Dan Korostelev wrote:
> 2009/3/13 Christian Theune <c...@gocept.com>:
> > On Thu, 2009-03-12 at 22:00 +0300, Dan Korostelev wrote:
> >> Please, can someone review the current zope.site's trunk? It fails the
> >> "persistent_interfaces" tests.
> >>
> >> I didn't ever work with persistent code, so I don't have idea about
> >> what's going on. But I'd like to make a release of this package.
> >
> > For me this t est works but the following tests fail:
> >
> > zope.site.tests.test_folder
> > zope.site.tests.test_localsitemanager
> > zope.site.tests.test_registration
> > zope.site.tests.test_site
> 
> That's strange. Are you sure that you're testing with latest versions
> of other packages?

Here's how it fails for me:

Running zope.testing.testrunner.layer.UnitTests tests:
  Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.


Failure in test test_persistent_interfaces
(zope.site.tests.test_registration)
Failed doctest test for
zope.site.tests.test_registration.test_persistent_interfaces
  File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 162, in test_persistent_interfaces

----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 193, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    commit()
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[14]>", line
1, in ?
        commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_manager.py",
 line 93, in commit
        return self.get().commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 322, in commit
        self._commitResources()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 416, in _commitResources
        rm.commit(self)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 532, in commit
        self._commit(transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 580, in _commit
        self._store_objects(ObjectWriter(obj), transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 614, in _store_objects
        p = writer.serialize(obj)  # This calls __getstate__ of obj
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 407, in serialize
        return self._dump(meta, obj.__getstate__())
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 416, in _dump
        self._p.dump(state)
    PicklingError: Can't pickle <InterfaceClass barmodule.IBaz>: import
of module barmodule failed
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 198, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    manager.registerAdapter(Baz, [barmodule.IBar], barmodule.IBaz)
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[16]>", line
1, in ?
        manager.registerAdapter(Baz, [barmodule.IBar], barmodule.IBaz)
      File
"/home/ctheune/.buildout/eggs/zope.component-3.6.0-py2.4.egg/zope/component/registry.py",
 line 177, in registerAdapter
        self._adapter_registrations[(required, provided, name)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/persistent/mapping.py",
 line 53, in __setitem__
        self._p_changed = 1
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 962, in register
        self._register(obj)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 972, in _register
        self.transaction_manager.get().join(self)
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 213, in join
        self._prior_operation_failed() # doesn't return
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 207, in _prior_operation_failed
        raise TransactionFailedError("An operation previously failed, "
    TransactionFailedError: An operation previously failed, with
traceback:

      File "bin/test", line 84, in ?
        zope.testing.testrunner.run([
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/__init__.py",
 line 33, in run
        runner.run()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 134, in run
        self.run_tests()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 214, in run_tests
        setup_layers, self.failures, self.errors)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 370, in run_layer
        return run_tests(options, tests, layer_name, failures, errors)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 303, in run_tests
        test(result)
      File "/home/ctheune/lib/python2.4/unittest.py", line 281, in
__call__
        return self.run(*args, **kwds)
      File "/home/ctheune/lib/python2.4/unittest.py", line 260, in run
        testMethod()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 2317, in runTest
        failures, tries = runner.run(
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1491, in run
        return self.__run(test, compileflags, out)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[14]>", line
1, in ?
        commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_manager.py",
 line 93, in commit
        return self.get().commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 325, in commit
        t, v, tb = self._saveAndGetCommitishError()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 322, in commit
        self._commitResources()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 416, in _commitResources
        rm.commit(self)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 532, in commit
        self._commit(transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 580, in _commit
        self._store_objects(ObjectWriter(obj), transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 614, in _store_objects
        p = writer.serialize(obj)  # This calls __getstate__ of obj
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 407, in serialize
        return self._dump(meta, obj.__getstate__())
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 416, in _dump
        self._p.dump(state)
    PicklingError: Can't pickle <InterfaceClass barmodule.IBaz>: import
of module barmodule failed

----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 199, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    manager.getAdapter(bar, barmodule.IBaz) # doctest: +ELLIPSIS
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[17]>", line
1, in ?
        manager.getAdapter(bar, barmodule.IBaz) # doctest: +ELLIPSIS
      File
"/home/ctheune/.buildout/eggs/zope.component-3.6.0-py2.4.egg/zope/component/registry.py",
 line 227, in getAdapter
        raise ComponentLookupError(object, interface, name)
    ComponentLookupError: (<zope.site.tests.test_registration.Bar object
at 0xb72d6dac>, <InterfaceClass barmodule.IBaz>, u'')
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 206, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    registry2 = root2['registry']
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[20]>", line
1, in ?
        registry2 = root2['registry']
      File "/home/ctheune/lib/python2.4/UserDict.py", line 17, in
__getitem__
        def __getitem__(self, key): return self.data[key]
    KeyError: 'registry'
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 207, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    barmodule2 = registry2.findModule('barmodule')
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[21]>", line
1, in ?
        barmodule2 = registry2.findModule('barmodule')
    NameError: name 'registry2' is not defined
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 208, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    bar2 = root2['bar']
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[22]>", line
1, in ?
        bar2 = root2['bar']
      File "/home/ctheune/lib/python2.4/UserDict.py", line 17, in
__getitem__
        def __getitem__(self, key): return self.data[key]
    KeyError: 'bar'
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 209, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    manager2 = root2['manager']
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[23]>", line
1, in ?
        manager2 = root2['manager']
      File "/home/ctheune/lib/python2.4/UserDict.py", line 17, in
__getitem__
        def __getitem__(self, key): return self.data[key]
    KeyError: 'manager'
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 210, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    manager2.queryAdapter(bar2, barmodule2.IBaz)
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[24]>", line
1, in ?
        manager2.queryAdapter(bar2, barmodule2.IBaz)
    NameError: name 'manager2' is not defined
----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 214, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    commit()
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[25]>", line
1, in ?
        commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_manager.py",
 line 93, in commit
        return self.get().commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 314, in commit
        self._prior_operation_failed() # doesn't return
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 207, in _prior_operation_failed
        raise TransactionFailedError("An operation previously failed, "
    TransactionFailedError: An operation previously failed, with
traceback:

      File "bin/test", line 84, in ?
        zope.testing.testrunner.run([
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/__init__.py",
 line 33, in run
        runner.run()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 134, in run
        self.run_tests()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 214, in run_tests
        setup_layers, self.failures, self.errors)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 370, in run_layer
        return run_tests(options, tests, layer_name, failures, errors)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/testrunner/runner.py",
 line 303, in run_tests
        test(result)
      File "/home/ctheune/lib/python2.4/unittest.py", line 281, in
__call__
        return self.run(*args, **kwds)
      File "/home/ctheune/lib/python2.4/unittest.py", line 260, in run
        testMethod()
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 2317, in runTest
        failures, tries = runner.run(
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1491, in run
        return self.__run(test, compileflags, out)
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[14]>", line
1, in ?
        commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_manager.py",
 line 93, in commit
        return self.get().commit()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 325, in commit
        t, v, tb = self._saveAndGetCommitishError()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 322, in commit
        self._commitResources()
      File
"/home/ctheune/.buildout/eggs/transaction-1.0a1-py2.4.egg/transaction/_transaction.py",
 line 416, in _commitResources
        rm.commit(self)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 532, in commit
        self._commit(transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 580, in _commit
        self._store_objects(ObjectWriter(obj), transaction)
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/Connection.py",
 line 614, in _store_objects
        p = writer.serialize(obj)  # This calls __getstate__ of obj
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 407, in serialize
        return self._dump(meta, obj.__getstate__())
      File
"/home/ctheune/.buildout/eggs/ZODB3-3.9.0a12-py2.4-linux-i686.egg/ZODB/serialize.py",
 line 416, in _dump
        self._p.dump(state)
    PicklingError: Can't pickle <InterfaceClass barmodule.IBaz>: import
of module barmodule failed

----------------------------------------------------------------------
File
"/home/ctheune/Development/zope.site/src/zope/site/tests/test_registration.py", 
line 216, in zope.site.tests.test_registration.test_persistent_interfaces
Failed example:
    manager2.getAdapter(bar2, barmodule2.IBaz)
    # doctest: +ELLIPSIS
Exception raised:
    Traceback (most recent call last):
      File
"/home/ctheune/.buildout/eggs/zope.testing-3.7.1-py2.4.egg/zope/testing/doctest.py",
 line 1356, in __run
        compileflags, 1) in test.globs
      File "<doctest
zope.site.tests.test_registration.test_persistent_interfaces[27]>", line
1, in ?
        manager2.getAdapter(bar2, barmodule2.IBaz)
    NameError: name 'manager2' is not defined

  Ran 71 tests with 1 failures and 0 errors in 0.085 seconds.
Tearing down left over layers:
  Tear down zope.testing.testrunner.layer.UnitTests in 0.000 seconds.

-- 
Christian Theune · c...@gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development

Attachment: signature.asc
Description: This is a digitally signed message part

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

Reply via email to