Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
47dcd0b9
Commit
47dcd0b9
authored
Mar 13, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add further checks in testImportVersionedComponentOnly.
parent
19873b35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+13
-1
No files found.
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
47dcd0b9
...
@@ -1619,14 +1619,19 @@ class _TestZodbComponent(SecurityTestCase):
...
@@ -1619,14 +1619,19 @@ class _TestZodbComponent(SecurityTestCase):
"""from %s.erp5_version.TestImportedVersionedComponentOnly import foo
"""from %s.erp5_version.TestImportedVersionedComponentOnly import foo
def bar(*args, **kwargs):
def bar(*args, **kwargs):
return foo(*args, **kwargs)
return
'Bar' +
foo(*args, **kwargs)
"""
%
top_module_name
)
"""
%
top_module_name
)
component_import
.
validate
()
component_import
.
validate
()
transaction
.
commit
()
transaction
.
commit
()
self
.
tic
()
self
.
tic
()
# Versioned package and its alias must be available
self
.
assertModuleImportable
(
'TestImportVersionedComponentOnly'
)
self
.
assertModuleImportable
(
'TestImportVersionedComponentOnly'
)
self
.
assertModuleImportable
(
'erp5_version.TestImportVersionedComponentOnly'
)
# Versioned Component of imported Component must be importable and check
# later that the module has not been added to the top-level package
self
.
assertModuleImportable
(
'erp5_version.TestImportedVersionedComponentOnly'
)
self
.
assertModuleImportable
(
'erp5_version.TestImportedVersionedComponentOnly'
)
top_module
=
__import__
(
top_module_name
,
level
=
0
,
top_module
=
__import__
(
top_module_name
,
level
=
0
,
...
@@ -1644,6 +1649,13 @@ def bar(*args, **kwargs):
...
@@ -1644,6 +1649,13 @@ def bar(*args, **kwargs):
# only the versioned Component has been used
# only the versioned Component has been used
self
.
failIfHasAttribute
(
top_module
,
'TestImportedVersionedComponentOnly'
)
self
.
failIfHasAttribute
(
top_module
,
'TestImportedVersionedComponentOnly'
)
# As well as functions defined on unversioned Component
self
.
assertHasAttribute
(
top_module
.
TestImportVersionedComponentOnly
,
'bar'
)
self
.
assertEquals
(
top_module
.
TestImportVersionedComponentOnly
.
bar
(),
'BarTestImportedVersionedComponentOnly'
)
def
testVersionPriority
(
self
):
def
testVersionPriority
(
self
):
"""
"""
Check whether Version priorities properly works by adding and removing
Check whether Version priorities properly works by adding and removing
...
...
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