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

zopefoundation / grokcore.formlib / 16861221675

18 Jun 2025 06:33AM UTC coverage: 96.005%. Remained the same
16861221675

push

github

icemac
Back to development: 5.1

92 of 106 branches covered (86.79%)

Branch coverage included in aggregate %.

701 of 720 relevant lines covered (97.36%)

0.97 hits per line

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

85.71
/src/grokcore/formlib/tests/base/form/norender.py
1
"""
2
Forms cannot define a render method. Here we show the case where the
3
EditForm has an explicit template associate with it.
4

5
  >>> grok.testing.grok(__name__)
6
  Traceback (most recent call last):
7
  ...
8
  martian.error.GrokError: It is not allowed to specify a custom 'render' \
9
  method for form <class 'grokcore.formlib.tests.base.form.norender.Edit'>. \
10
  Forms either use the default template or a custom-supplied one.
11

12
"""
13

14
import grokcore.formlib as grok
1✔
15

16

17
class Mammoth(grok.Context):
1✔
18
    pass
1✔
19

20

21
class Edit(grok.EditForm):
1✔
22
    # not allowed to have a render method
23
    def render(self):
1✔
24
        return "this cannot be"
×
25

26

27
edit = grok.PageTemplate('Foo!')
1✔
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