• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / grokcore.viewlet / 5776423262

pending completion
5776423262

push

github

web-flow
Config with pure python template (#7)

* Drop support for Python 2.7, 3.5, 3.6.

46 of 54 branches covered (85.19%)

Branch coverage included in aggregate %.

81 of 81 new or added lines in 21 files covered. (100.0%)

580 of 604 relevant lines covered (96.03%)

0.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/src/grokcore/viewlet/tests/base/viewlet/viewlet_ambiguous_manager.py
1
"""
2
When there are two or more viewletmanagers available in the module,
3
a viewlet will not auto-associate but instead raise an error.
4

5
  >>> grok.testing.grok(__name__)
6
  Traceback (most recent call last):
7
    ...
8
  martian.error.GrokError: Multiple possible viewletmanagers for \
9
  <class 'grokcore.viewlet.tests.base.viewlet.viewlet_ambiguous_manager.Viewlet'>, \
10
  please use the 'viewletmanager' directive.
11

12
"""  # noqa: E501 line too long
13

14
from zope.interface import Interface
1✔
15

16
import grokcore.viewlet as grok
1✔
17

18

19
class ViewletManager(grok.ViewletManager):
1✔
20
    grok.name('foo')
1✔
21
    grok.context(Interface)
1✔
22

23

24
class ViewletManager2(grok.ViewletManager):
1✔
25
    grok.name('bar')
1✔
26
    grok.context(Interface)
1✔
27

28

29
class Viewlet(grok.Viewlet):
1✔
30
    grok.context(Interface)
1✔
31

32
    def render(self):
1✔
33
        return "Render method"
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc