• 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

89.74
/src/grokcore/formlib/tests/test_base.py
1
import doctest
1✔
2
import unittest
1✔
3

4
from pkg_resources import resource_listdir
1✔
5

6
import zope.component.eventtesting
1✔
7
from zope.testing import cleanup
1✔
8

9

10
def setUpZope(test):
1✔
11
    zope.component.eventtesting.setUp(test)
1✔
12

13

14
def cleanUpZope(test):
1✔
15
    cleanup.cleanUp()
1✔
16

17

18
def suiteFromPackage(name):
1✔
19
    layer_dir = 'base'
1✔
20
    files = resource_listdir(__name__, f'{layer_dir}/{name}')
1✔
21
    suite = unittest.TestSuite()
1✔
22
    for filename in files:
1✔
23
        if not filename.endswith('.py'):
1!
24
            continue
×
25
        if filename.endswith('_fixture.py'):
1!
26
            continue
×
27
        if filename == '__init__.py':
1✔
28
            continue
1✔
29
        dottedname = 'grokcore.formlib.tests.{}.{}.{}'.format(
1✔
30
            layer_dir, name, filename[:-3])
31
        test = doctest.DocTestSuite(
1✔
32
            dottedname,
33
            setUp=setUpZope,
34
            tearDown=cleanUpZope,
35
            optionflags=(
36
                doctest.ELLIPSIS +
37
                doctest.NORMALIZE_WHITESPACE))
38
        suite.addTest(test)
1✔
39
    return suite
1✔
40

41

42
def test_suite():
1✔
43
    suite = unittest.TestSuite()
1✔
44
    for name in ['form']:
1✔
45
        suite.addTest(suiteFromPackage(name))
1✔
46
    return suite
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