121: Renamed API.__call__() method to API.finalize()

This commit is contained in:
Jason Gerard DeRose 2008-08-12 22:52:37 +00:00
parent f767543fe7
commit b72cfa5dcc
4 changed files with 4 additions and 4 deletions

View File

@ -485,7 +485,7 @@ class API(ReadOnly):
self.register = Registrar(*allowed) self.register = Registrar(*allowed)
self.__lock__() self.__lock__()
def __call__(self): def finalize(self):
""" """
Finalize the registration, instantiate the plugins. Finalize the registration, instantiate the plugins.
""" """

View File

@ -28,4 +28,4 @@ unnecessary side effects (needed for unit tests, among other things).
from run import api from run import api
import plugins import plugins
api() api.finalize()

View File

@ -601,7 +601,7 @@ def test_API():
r(base1_plugin2) r(base1_plugin2)
# Test API instance: # Test API instance:
api() # Calling instance performs finalization api.finalize()
def get_base(b): def get_base(b):
return 'base%d' % b return 'base%d' % b

View File

@ -374,4 +374,4 @@ def test_PublicAPI():
pass pass
api.register(cmd2) api.register(cmd2)
api() api.finalize()