zopefoundation / zope.configuration

Extensible system for supporting various kinds of configurations
https://zopeconfiguration.readthedocs.io
Other
1 stars 6 forks source link

Doctests broken with zope.schema 4.7 #21

Closed jamadden closed 5 years ago

jamadden commented 6 years ago

One must run tox -e docs to catch this, though, it's not normally tested with a simple run of zope-testrunner.

Document: api/fields
--------------------
**********************************************************************
File "api/fields.rst", line 120, in default
Failed example:
    gg.fromUnicode('Foo')
Expected:
    Traceback (most recent call last):
    ...
    WrongType: ('An interface is required', ...
Got:
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest default[5]>", line 1, in <module>
        gg.fromUnicode('Foo')
      File "//zope.configuration/.tox/docs/lib/python2.7/site-packages/zope/configuration/fields.py", line 77, in fromUnicode
        self.validate(value)
      File "//zope.configuration/.tox/docs/lib/python2.7/site-packages/zope/schema/_bootstrapfields.py", line 291, in validate
        self._validate(value)
      File "//zope.configuration/.tox/docs/lib/python2.7/site-packages/zope/configuration/fields.py", line 63, in _validate
        self.value_type.validate(value)
      File "//zope.configuration/.tox/docs/lib/python2.7/site-packages/zope/schema/_bootstrapfields.py", line 291, in validate
        self._validate(value)
      File "//zope.configuration/.tox/docs/lib/python2.7/site-packages/zope/schema/_field.py", line 638, in _validate
        ).with_field_and_value(self, value)
    NotAnInterface: (<class 'Foo'>, <InterfaceClass zope.interface.interfaces.IInterface>, '')
**********************************************************************