/usr/share/pyshared/grokcore/component/tests/grokker/onlyonce.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 26 27 | """
We define a grokker AlphaGrokker for a component called Alpha. We first need to
grok the module defining the grokkers, in order to get them registered.
Usually this would be triggered from a meta.zcml in a package, that would grok
the module containing the grokkers (e.g. meta.py).
We do it manually now::
>>> import grokcore.component as grok
>>> grok.testing.grok('grokcore.component.tests.grokker.onlyonce_fixture._meta')
This _meta.py module then will be grokked again during 'normal' grok time. Grok
will not re-register the grokkers as this could have unwanted side-effects. It
will grok the components of course.
NOTE: the module is called _meta to make sure it is grokked (although its
grokker registration should be ignored) before the other files. The modules are
picked up in alphabetical order.
To simulate this, we grok the whole package::
>>> grok.testing.grok('grokcore.component.tests.grokker.onlyonce_fixture')
alpha
"""
|