Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Yusei Tahara
wendelin
Commits
8bde5dac
Commit
8bde5dac
authored
Sep 12, 2017
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
cef88396
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
...tTemplateItem/portal_components/test.erp5.testWendelin.py
+18
-4
No files found.
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
View file @
8bde5dac
...
@@ -131,8 +131,15 @@ class Test(ERP5TypeTestCase):
...
@@ -131,8 +131,15 @@ class Test(ERP5TypeTestCase):
# make sure real_data tail is also a full line
# make sure real_data tail is also a full line
real_data
+=
'
\
n
'
real_data
+=
'
\
n
'
_
,
_
,
data_stream
,
data_array
=
self
.
stepSetupIngestion
(
reference
)
data_stream
=
portal
.
data_stream_module
.
newContent
(
portal_type
=
'Data Stream'
,
reference
=
reference
)
data_stream
.
validate
()
data_stream
.
appendData
(
real_data
)
data_stream
.
appendData
(
real_data
)
data_array
=
portal
.
data_array_module
.
newContent
(
portal_type
=
'Data Array'
,
reference
=
reference
)
data_array
.
validate
()
self
.
tic
()
self
.
tic
()
self
.
assertEqual
(
None
,
data_array
.
getArray
())
self
.
assertEqual
(
None
,
data_array
.
getArray
())
...
@@ -154,6 +161,7 @@ context.activate().DataStream_readChunkListAndTransform( \
...
@@ -154,6 +161,7 @@ context.activate().DataStream_readChunkListAndTransform( \
portal
.
portal_skins
.
custom
,
portal
.
portal_skins
.
custom
,
script_id
,
script_id
,
*
script_content_list
)
*
script_content_list
)
self
.
tic
()
number_string_list
=
[]
number_string_list
=
[]
for
my_list
in
list
(
chunks
(
range
(
10001
,
200001
),
10
)):
for
my_list
in
list
(
chunks
(
range
(
10001
,
200001
),
10
)):
...
@@ -168,6 +176,7 @@ context.activate().DataStream_readChunkListAndTransform( \
...
@@ -168,6 +176,7 @@ context.activate().DataStream_readChunkListAndTransform( \
# test that extracted array contains same values as input CSV
# test that extracted array contains same values as input CSV
zarray
=
data_array
.
getArray
()
zarray
=
data_array
.
getArray
()
self
.
assertNotEqual
(
None
,
data_array
.
getArray
())
expected_numpy_array
=
np
.
arange
(
10001
,
200001
)
expected_numpy_array
=
np
.
arange
(
10001
,
200001
)
self
.
assertEqual
(
np
.
average
(
zarray
),
np
.
average
(
expected_numpy_array
))
self
.
assertEqual
(
np
.
average
(
zarray
),
np
.
average
(
expected_numpy_array
))
self
.
assertTrue
(
np
.
array_equal
(
zarray
,
expected_numpy_array
))
self
.
assertTrue
(
np
.
array_equal
(
zarray
,
expected_numpy_array
))
...
@@ -213,10 +222,15 @@ context.activate().DataStream_readChunkListAndTransform( \
...
@@ -213,10 +222,15 @@ context.activate().DataStream_readChunkListAndTransform( \
number_string_list
=
[
row
]
*
20
number_string_list
=
[
row
]
*
20
real_data
=
'
\
n
'
.
join
(
number_string_list
)
real_data
=
'
\
n
'
.
join
(
number_string_list
)
portal
.
log
(
real_data
)
data_stream
=
portal
.
data_stream_module
.
newContent
(
portal_type
=
'Data Stream'
,
_
,
_
,
data_stream
,
_
=
self
.
stepSetupIngestion
(
reference
)
reference
=
reference
)
data_stream
.
appendData
(
real_data
)
data_stream
.
appendData
(
real_data
)
data_stream
.
validate
()
data_array
=
portal
.
data_array_module
.
newContent
(
portal_type
=
'Data Array'
,
reference
=
reference
)
data_array
.
validate
()
self
.
tic
()
self
.
tic
()
data_stream
.
DataStream_transform
(
\
data_stream
.
DataStream_transform
(
\
...
...
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