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

zopefoundation / zope.interface / 16098775349

04 Mar 2025 10:16PM UTC coverage: 99.073% (+0.05%) from 99.022%
16098775349

push

github

web-flow
Merge pull request #338 from zopefoundation/config-with-c-code-template-3c1c588c

Apply latest meta templates, drop support for Python 3.8

2436 of 2464 branches covered (98.86%)

Branch coverage included in aggregate %.

12209 of 12318 relevant lines covered (99.12%)

6.93 hits per line

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

94.74
/src/zope/interface/common/tests/test_builtins.py
1
##############################################################################
2
# Copyright (c) 2020 Zope Foundation and Contributors.
3
# All Rights Reserved.
4
#
5
# This software is subject to the provisions of the Zope Public License,
6
# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
7
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10
# FOR A PARTICULAR PURPOSE.
11
##############################################################################
12

13
import unittest
7✔
14

15
from zope.interface._compat import PY313_OR_OLDER
7✔
16
from zope.interface.common import builtins
7✔
17

18
from . import VerifyClassMixin
7✔
19
from . import VerifyObjectMixin
7✔
20
from . import add_verify_tests
7✔
21

22

23
class TestVerifyClass(VerifyClassMixin,
7✔
24
                      unittest.TestCase):
25
    pass
7✔
26

27

28
VERIFY_TESTS = [
7✔
29
    (builtins.IList, (list,)),
30
    (builtins.ITuple, (tuple,)),
31
    (builtins.ITextString, (str,)),
32
    (builtins.INativeString, (str,)),
33
    (builtins.IBool, (bool,)),
34
    (builtins.IDict, (dict,)),
35
    (builtins.IFile, ()),
36

37
]
38
if PY313_OR_OLDER:
7✔
39
    VERIFY_TESTS.append(
6✔
40
        (builtins.IByteString, (bytes,))
41
    )
42

43
add_verify_tests(TestVerifyClass, tuple(VERIFY_TESTS))
7✔
44

45

46
class TestVerifyObject(VerifyObjectMixin,
7✔
47
                       TestVerifyClass):
48
    CONSTRUCTORS = {
7!
49
        builtins.IFile: lambda: open(__file__)
50
    }
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