Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
0ed74510
Commit
0ed74510
authored
Mar 23, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CodingStyleTestCase: output errors for all business templates in test_rebuild_business_template.
parent
6a0c55f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
product/ERP5Type/tests/CodingStyleTestCase.py
product/ERP5Type/tests/CodingStyleTestCase.py
+10
-8
No files found.
product/ERP5Type/tests/CodingStyleTestCase.py
View file @
0ed74510
...
@@ -136,6 +136,8 @@ class CodingStyleTestCase(ERP5TypeTestCase):
...
@@ -136,6 +136,8 @@ class CodingStyleTestCase(ERP5TypeTestCase):
"""
"""
self
.
maxDiff
=
None
self
.
maxDiff
=
None
template_tool
=
self
.
portal
.
portal_templates
template_tool
=
self
.
portal
.
portal_templates
diff_line_list
=
[]
diff_files
=
[]
for
bt_title
in
self
.
getTestedBusinessTemplateList
():
for
bt_title
in
self
.
getTestedBusinessTemplateList
():
bt
=
template_tool
.
getInstalledBusinessTemplate
(
bt_title
,
strict
=
True
)
bt
=
template_tool
.
getInstalledBusinessTemplate
(
bt_title
,
strict
=
True
)
# run migrations on the business template, except for the BT used to
# run migrations on the business template, except for the BT used to
...
@@ -158,7 +160,6 @@ class CodingStyleTestCase(ERP5TypeTestCase):
...
@@ -158,7 +160,6 @@ class CodingStyleTestCase(ERP5TypeTestCase):
p
.
strip
()
for
p
in
self
.
rebuild_business_template_ignored_path
.
splitlines
()
p
.
strip
()
for
p
in
self
.
rebuild_business_template_ignored_path
.
splitlines
()
if
p
and
not
p
.
strip
().
startswith
(
"#"
)}
if
p
and
not
p
.
strip
().
startswith
(
"#"
)}
diff_line_list
=
[]
def
get_difference
(
path
,
has_old
=
True
,
has_new
=
True
):
def
get_difference
(
path
,
has_old
=
True
,
has_new
=
True
):
old
=
(
old
=
(
os
.
path
.
join
(
bt_base_path
,
path
)
os
.
path
.
join
(
bt_base_path
,
path
)
...
@@ -214,7 +215,8 @@ class CodingStyleTestCase(ERP5TypeTestCase):
...
@@ -214,7 +215,8 @@ class CodingStyleTestCase(ERP5TypeTestCase):
for
diff
in
get_differences
(
sub_dcmp
,
os
.
path
.
join
(
base
,
sub_path
)):
for
diff
in
get_differences
(
sub_dcmp
,
os
.
path
.
join
(
base
,
sub_path
)):
yield
diff
yield
diff
diff_files
=
list
(
get_differences
(
filecmp
.
dircmp
(
bt_dir
,
export_dir
),
bt_local_path
))
diff_files
.
extend
(
list
(
get_differences
(
filecmp
.
dircmp
(
bt_dir
,
export_dir
),
bt_local_path
)))
# dump a diff in log directory, to help debugging
# dump a diff in log directory, to help debugging
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
if
log_directory
and
diff_line_list
:
if
log_directory
and
diff_line_list
:
...
...
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