/usr/share/pyshared/grokcore/component/tests/utility/providesmany2.py is in python-grokcore.component 2.5-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | """
Subclasses of grok.GlobalUtility that are supposed to be registered
directly as utilities and which provide more than one interface must
specify which interface to use for the registration:
>>> grok.testing.grok(__name__)
Traceback (most recent call last):
...
GrokError: <class 'grokcore.component.tests.utility.providesmany2.Club'>
provides more than one interface (use grok.provides to specify which one
to use).
"""
import grokcore.component as grok
from zope import interface
class IClub(interface.Interface):
pass
class ISpikyClub(interface.Interface):
pass
class Club(object):
interface.classProvides(IClub, ISpikyClub)
grok.global_utility(Club, direct=True)
|