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

zopefoundation / z3c.checkversions / 12338632602

19 Jul 2024 07:25AM UTC coverage: 78.804% (-2.4%) from 81.218%
12338632602

push

github

web-flow
- Add support for Python 3.12.  - Drop support for Python 3.7. (#28)

35 of 46 branches covered (76.09%)

Branch coverage included in aggregate %.

3 of 5 new or added lines in 2 files covered. (60.0%)

110 of 138 relevant lines covered (79.71%)

0.8 hits per line

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

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

15
try:
1✔
16
    from zc.buildout.buildout import Buildout
1✔
NEW
17
except ModuleNotFoundError:
×
NEW
18
    raise ModuleNotFoundError(
×
19
        "zc.buildout is not installed! \n"
20
        "If you're in a buildout environment,\n"
21
        "enable the buildout extra requirement like this:\n"
22
        "eggs = z3c.checkversions [buildout]\n"
23
        "If you installed z3c.checkversions via pip,\n"
24
        "please make sure to also install zc.buildout.")
25

26
from z3c.checkversions import base
1✔
27

28

29
class Checker(base.Checker):
1✔
30
    """checker class for a buildout
31
    """
32

33
    def __init__(self, *args, **kw):
1✔
34
        self.filename = kw.pop('filename')
1✔
35
        super().__init__(*args, **kw)
1✔
36

37
    def get_versions(self):
1✔
38
        print("# Checking buildout file %s" % self.filename)
1✔
39

40
        buildout = Buildout(self.filename, '')
1✔
41

42
        # set the index URL from the buildout if not already provided
43
        buildout_index = buildout['buildout'].get('index')
1✔
44
        if not self.__custom_url:
1✔
45
            self._set_index_url(buildout_index)
1✔
46

47
        return buildout['versions']
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