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

zopefoundation / grokcore.layout / 16098815659

18 Jun 2025 06:34AM UTC coverage: 96.033%. Remained the same
16098815659

push

github

icemac
Back to development: 5.1

22 of 26 branches covered (84.62%)

Branch coverage included in aggregate %.

438 of 453 relevant lines covered (96.69%)

0.97 hits per line

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

94.87
/src/grokcore/layout/tests/test_package.py
1
import doctest
1✔
2
import unittest
1✔
3

4
import pkg_resources
1✔
5

6
from zope.testing import renormalizing
1✔
7

8
import grokcore.layout.tests
1✔
9

10

11
layer = grokcore.layout.tests.GrokcoreLayoutLayer(grokcore.layout.tests)
1✔
12

13

14
def make_test(dottedname):
1✔
15
    checker = renormalizing.RENormalizing()
1✔
16
    test = doctest.DocTestSuite(
1✔
17
        dottedname,
18
        checker=checker,
19
        optionflags=(
20
            doctest.ELLIPSIS +
21
            doctest.NORMALIZE_WHITESPACE))
22
    test.layer = layer
1✔
23
    return test
1✔
24

25

26
def suiteFromPackage(name):
1✔
27
    files = pkg_resources.resource_listdir(__name__, name)
1✔
28
    suite = unittest.TestSuite()
1✔
29
    for filename in files:
1✔
30
        if not filename.endswith('.py'):
1✔
31
            continue
1✔
32
        if filename.endswith('_fixture.py'):
1!
33
            continue
×
34
        if filename == '__init__.py':
1✔
35
            continue
1✔
36
        dottedname = f'grokcore.layout.tests.{name}.{filename[:-3]}'
1✔
37
        suite.addTest(make_test(dottedname))
1✔
38
    return suite
1✔
39

40

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