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
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
Léo-Paul Géneau
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
Hide 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):
"""
self
.
maxDiff
=
None
template_tool
=
self
.
portal
.
portal_templates
diff_line_list
=
[]
diff_files
=
[]
for
bt_title
in
self
.
getTestedBusinessTemplateList
():
bt
=
template_tool
.
getInstalledBusinessTemplate
(
bt_title
,
strict
=
True
)
# run migrations on the business template, except for the BT used to
...
...
@@ -158,7 +160,6 @@ class CodingStyleTestCase(ERP5TypeTestCase):
p
.
strip
()
for
p
in
self
.
rebuild_business_template_ignored_path
.
splitlines
()
if
p
and
not
p
.
strip
().
startswith
(
"#"
)}
diff_line_list
=
[]
def
get_difference
(
path
,
has_old
=
True
,
has_new
=
True
):
old
=
(
os
.
path
.
join
(
bt_base_path
,
path
)
...
...
@@ -214,13 +215,14 @@ class CodingStyleTestCase(ERP5TypeTestCase):
for
diff
in
get_differences
(
sub_dcmp
,
os
.
path
.
join
(
base
,
sub_path
)):
yield
diff
diff_files
=
list
(
get_differences
(
filecmp
.
dircmp
(
bt_dir
,
export_dir
),
bt_local_path
))
# dump a diff in log directory, to help debugging
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
if
log_directory
and
diff_line_list
:
with
open
(
os
.
path
.
join
(
log_directory
,
'%s.diff'
%
self
.
id
()),
'w'
)
as
f
:
f
.
writelines
(
diff_line_list
)
self
.
assertEqual
(
diff_files
,
[])
diff_files
.
extend
(
list
(
get_differences
(
filecmp
.
dircmp
(
bt_dir
,
export_dir
),
bt_local_path
)))
# dump a diff in log directory, to help debugging
from
Products.ERP5Type.tests.runUnitTest
import
log_directory
if
log_directory
and
diff_line_list
:
with
open
(
os
.
path
.
join
(
log_directory
,
'%s.diff'
%
self
.
id
()),
'w'
)
as
f
:
f
.
writelines
(
diff_line_list
)
self
.
assertEqual
(
diff_files
,
[])
def
test_run_upgrader
(
self
):
...
...
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