Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
103eb40f
Commit
103eb40f
authored
Feb 11, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetic: remove trailing whitespaces.
parent
3c2e966d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
11 deletions
+10
-11
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+1
-1
product/ERP5Type/Core/Component.py
product/ERP5Type/Core/Component.py
+4
-4
product/ERP5Type/Core/TestDocument.py
product/ERP5Type/Core/TestDocument.py
+0
-1
product/ERP5Type/Tool/ComponentTool.py
product/ERP5Type/Tool/ComponentTool.py
+1
-1
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+4
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
103eb40f
...
...
@@ -3780,7 +3780,7 @@ class DocumentTemplateItem(FilesystemToZodbTemplateItem):
"%s.py"
%
class_id
)
def
_importFile
(
self
,
file_name
,
file_obj
):
if
(
file_name
.
endswith
(
'.py'
)
and
if
(
file_name
.
endswith
(
'.py'
)
and
file_obj
.
name
.
rsplit
(
os
.
path
.
sep
,
2
)[
-
2
]
==
'portal_components'
):
return
...
...
product/ERP5Type/Core/Component.py
View file @
103eb40f
...
...
@@ -34,7 +34,7 @@ from Products.ERP5Type.Base import Base
from
Products.ERP5Type.Accessor.Constant
import
PropertyGetter
as
ConstantGetter
from
Products.ERP5Type.ConsistencyMessage
import
ConsistencyMessage
from
zLOG
import
LOG
,
INFO
from
zLOG
import
LOG
,
INFO
class
Component
(
Base
):
# CMF Type Definition
...
...
@@ -93,7 +93,7 @@ class Component(Base):
"""
Add the Component to its appropriate module registry
"""
namespace_fullname
=
self
.
_getDynamicModuleNamespace
()
namespace_fullname
=
self
.
_getDynamicModuleNamespace
()
namespace_module
=
__import__
(
namespace_fullname
,
{},
{},
fromlist
=
[
namespace_fullname
])
...
...
@@ -108,7 +108,7 @@ class Component(Base):
"""
Delete the Component from its appropriate module registry
"""
namespace_fullname
=
self
.
_getDynamicModuleNamespace
()
namespace_fullname
=
self
.
_getDynamicModuleNamespace
()
namespace_module
=
__import__
(
namespace_fullname
,
{},
{},
fromlist
=
[
namespace_fullname
])
...
...
@@ -221,7 +221,7 @@ class Component(Base):
Try to import all Components and returns error as a dict if any
"""
import
os.path
path_pattern
=
"%s%s*.py"
%
(
cls
.
_getFilesystemPath
(),
os
.
path
.
sep
)
path_pattern
=
"%s%s*.py"
%
(
cls
.
_getFilesystemPath
(),
os
.
path
.
sep
)
LOG
(
"ERP5Type.Core.Component"
,
INFO
,
"Importing from %s"
%
path_pattern
)
...
...
product/ERP5Type/Core/TestDocument.py
View file @
103eb40f
...
...
@@ -12,4 +12,3 @@ class TestDocument(Base):
"""
"""
return
"zozo"
product/ERP5Type/Tool/ComponentTool.py
View file @
103eb40f
...
...
@@ -43,7 +43,7 @@ from zLOG import LOG, INFO, WARNING
_last_sync
=
-
1
class
ComponentTool
(
BaseTool
):
"""
This tool provides methods to load the the different types
This tool provides methods to load the the different types
of components of the ERP5 framework: Document classes, interfaces,
mixin classes, fields, accessors, etc.
"""
...
...
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
103eb40f
...
...
@@ -1241,7 +1241,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
pass
def
_getComponentFullModuleName
(
self
,
module_name
):
return
"%s.%s"
%
(
self
.
_getComponentModuleName
(),
module_name
)
return
"%s.%s"
%
(
self
.
_getComponentModuleName
(),
module_name
)
def
failIfModuleImportable
(
self
,
module_name
):
full_module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
...
...
@@ -1256,7 +1256,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
full_module_name
)
def
assertModuleImportable
(
self
,
module_name
):
full_module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
full_module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
try
:
__import__
(
full_module_name
,
fromlist
=
[
self
.
_getComponentModuleName
()],
...
...
@@ -1335,7 +1335,7 @@ class _TestZodbComponent(ERP5TypeTestCase):
self
.
assertEquals
(
component
.
getValidationState
(),
'validated'
)
self
.
assertEquals
(
component
.
_getErrorMessage
(),
''
)
self
.
assertEquals
(
component
.
getTextContent
(),
valid_code
)
self
.
assertEquals
(
component
.
getTextContent
(
validated_only
=
True
),
valid_code
)
self
.
assertEquals
(
component
.
getTextContent
(
validated_only
=
True
),
valid_code
)
self
.
assertModuleImportable
(
'TestComponentWithSyntaxError'
)
from
Products.ERP5Type.Core.ExtensionComponent
import
ExtensionComponent
...
...
@@ -1466,7 +1466,7 @@ class TestPortalType(Person):
self
.
assertHasAttribute
(
person
,
'test42'
)
self
.
assertEquals
(
person
.
test42
(),
42
)
# The Portal Type class should not be in ghost state by now as we tried
# to access test42() defined in TestPortalType Document Component
self
.
assertModuleImportable
(
'TestPortalType'
)
...
...
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