Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
b36d4e11
Commit
b36d4e11
authored
Jun 23, 2007
by
Stefan H. Holek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hasPackage consulted the wrong registry, oops.
parent
cf0a8834
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
lib/python/Testing/ZopeTestCase/ZopeLite.py
lib/python/Testing/ZopeTestCase/ZopeLite.py
+1
-1
lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
.../Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
+5
-0
No files found.
lib/python/Testing/ZopeTestCase/ZopeLite.py
View file @
b36d4e11
...
@@ -168,7 +168,7 @@ def installProduct(name, quiet=0):
...
@@ -168,7 +168,7 @@ def installProduct(name, quiet=0):
def
hasPackage
(
name
):
def
hasPackage
(
name
):
'''Checks if a package has been registered with five:registerPackage.'''
'''Checks if a package has been registered with five:registerPackage.'''
return
name
in
[
m
.
__name__
for
m
,
f
in
Products
.
_packages_to_initialize
]
return
name
in
[
m
.
__name__
for
m
in
getattr
(
Products
,
'_registered_packages'
,
[])
]
def
installPackage
(
name
,
quiet
=
0
):
def
installPackage
(
name
,
quiet
=
0
):
'''Installs a registered Python package like a Zope product.'''
'''Installs a registered Python package like a Zope product.'''
...
...
lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
View file @
b36d4e11
...
@@ -74,6 +74,11 @@ def testInstallPackage():
...
@@ -74,6 +74,11 @@ def testInstallPackage():
True
True
>>> ZopeTestCase.close(app)
>>> ZopeTestCase.close(app)
hasPackage still returns True
>>> ZopeTestCase.hasPackage('testpackage')
True
Clean up
Clean up
>>> import testpackage
>>> import testpackage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment