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

zopefoundation / Zope / 3956162881

pending completion
3956162881

push

github

Michael Howitz
Update to deprecation warning free releases.

4401 of 7036 branches covered (62.55%)

Branch coverage included in aggregate %.

27161 of 31488 relevant lines covered (86.26%)

0.86 hits per line

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

82.76
/src/Zope2/__init__.py
1
##############################################################################
2
#
3
# Copyright (c) 2001, 2002 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
"""Zope application package."""
1✔
15

16
import os
1✔
17

18

19
_began_startup = 0
1✔
20

21
# Zope2.App.startup.startup() sets the following variables in this module.
22
bobo_application = None
1✔
23
DB = None
1✔
24
opened = []
1✔
25

26

27
def startup_wsgi():
1✔
28
    """Initialize the Zope Package and provide a published module"""
29
    global _began_startup
30
    if _began_startup:
1✔
31
        # Already began (and maybe finished) startup, so don't run again
32
        return
1✔
33
    _began_startup = 1
1✔
34
    _configure_wsgi()
1✔
35
    from Zope2.App.startup import startup as _startup
1✔
36
    _startup()
1✔
37

38

39
def app(*args, **kw):
1✔
40
    """Utility for scripts to open a connection to the database"""
41
    startup_wsgi()
1✔
42
    return bobo_application(*args, **kw)
1✔
43

44

45
def debug(*args, **kw):
1✔
46
    """Utility to try a Zope request using the interactive interpreter"""
47
    startup_wsgi()
×
48
    import ZPublisher
×
49
    return ZPublisher.test('Zope2', *args, **kw)
×
50

51

52
def _configure_wsgi():
1✔
53
    from Zope2.Startup.run import configure_wsgi
1✔
54
    configfile = os.environ.get('ZOPE_CONFIG')
1✔
55
    if configfile is not None:
1!
56
        configure_wsgi(configfile)
×
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