Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
slapos.core
Commits
3a43ca13
Commit
3a43ca13
authored
Jul 05, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
Add SlapOSDoc test suite class to tests/__init__.py
See merge request
!312
parents
94c9a1fa
4f7ff125
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
master/tests/__init__.py
master/tests/__init__.py
+23
-0
No files found.
master/tests/__init__.py
View file @
3a43ca13
...
...
@@ -126,3 +126,26 @@ class SlapOSCloud(SavedTestSuite, ProjectTestSuite):
status_dict
[
'test_count'
]
=
int
(
group_dict
[
'total'
])
status_dict
[
'skip_count'
]
=
int
(
group_dict
[
'expected_failure'
])
return
status_dict
class
SlapOSDocTestSuite
(
SlapOSCloud
):
_product_list
=
[]
_saved_test_id
=
'erp5_slapos_tutorial:testFunctionalStandaloneSlapOSTutorial'
_bt_list
=
[
'erp5_slapos_tutorial'
]
def
getTestList
(
self
):
test_list
=
[]
path
=
sys
.
path
[
0
]
erp5_doc_path
=
sys
.
path
[
1
]
component_re
=
re
.
compile
(
".*/([^/]+)/TestTemplateItem/portal_components"
"/test
\
.[^.]+
\
.([^.]+).py$"
)
for
test_path
in
(
glob
(
'%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py'
%
erp5_doc_path
)):
component_re_match
=
component_re
.
match
(
test_path
)
if
component_re_match
is
not
None
:
test_case
=
"%s:%s"
%
(
component_re_match
.
group
(
1
),
component_re_match
.
group
(
2
))
else
:
test_case
=
test_path
.
split
(
os
.
sep
)[
-
1
][:
-
3
]
# remove .py
test_list
.
append
(
test_case
)
return
test_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