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

zopefoundation / zope.component / 10279940742

07 Aug 2024 07:22AM UTC coverage: 99.715% (+0.01%) from 99.705%
10279940742

Pull #73

github

icemac
Make isort happy.
Pull Request #73: - Add support for Python 3.12. - Drop support for Python 3.7.

630 of 645 branches covered (97.67%)

Branch coverage included in aggregate %.

15 of 15 new or added lines in 5 files covered. (100.0%)

4615 of 4615 relevant lines covered (100.0%)

1.0 hits per line

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

87.5
/src/zope/component/tests/__init__.py
1
import unittest
1✔
2

3

4
def skipIfNoSecurity(testfunc):
1✔
5
    from zope.component._compat import ZOPE_SECURITY_NOT_AVAILABLE_EX
1✔
6

7
    try:
1✔
8
        import zope.security  # noqa: F401 imported but unused
1✔
9
    except ZOPE_SECURITY_NOT_AVAILABLE_EX:  # pragma: no cover
10
        return unittest.skip("zope.security not installed")(testfunc)
11
    return testfunc
1✔
12

13

14
def fails_if_called(test, msg="This function must not be called.",
1✔
15
                    arguments=True):
16
    """
17
    Return a new function (accepting any arguments)
18
    that will call test.fail(msg) if it is called.
19

20
    :keyword bool arguments: If set to ``False``, then we will
21
        not accept any arguments. This can avoid
22
        masking when we would expect a TypeError to be raised by
23
        calling an instance method against a class.
24
    """
25
    if not arguments:
1✔
26
        return lambda: test.fail(msg)
1!
27
    return lambda *_args, **__kwargs: test.fail(msg)
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