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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Iliya Manolov
erp5
Commits
bca64206
Commit
bca64206
authored
Aug 07, 2017
by
Iliya Manolov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for eggs in Jupyter.
parent
7a1d2f7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
1 deletion
+41
-1
bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py
...ateItem/portal_components/test.erp5.testExecuteJupyter.py
+41
-1
No files found.
bt5/erp5_data_notebook/TestTemplateItem/portal_components/test.erp5.testExecuteJupyter.py
View file @
bca64206
...
@@ -990,4 +990,44 @@ print os.path
...
@@ -990,4 +990,44 @@ print os.path
self
.
tic
()
self
.
tic
()
result
=
json
.
loads
(
result
)
result
=
json
.
loads
(
result
)
self
.
assertEquals
(
result
[
'status'
],
'ok'
)
self
.
assertEquals
(
result
[
'status'
],
'ok'
)
\ No newline at end of file
def
testEgg
(
self
,
import_code
=
'import scipy as _'
,
no_login
=
False
):
'''
Test whether an egg is available.
'''
if
not
no_login
:
self
.
login
(
'dev_user'
)
reference
=
'Test.Notebook.EnvironmentObject.Errors.EggImport'
result
=
self
.
portal
.
Base_executeJupyter
(
reference
=
reference
,
python_expression
=
import_code
)
self
.
tic
()
result
=
json
.
loads
(
result
)
self
.
assertEquals
(
result
[
'status'
],
'ok'
)
def
testEggs
(
self
):
'''
Test whether essential modules are available.
'''
self
.
login
(
'dev_user'
)
self
.
testEgg
(
'import scipy as _'
,
True
)
self
.
testEgg
(
'import sklearn as _'
,
True
)
self
.
testEgg
(
'import pandas as _'
,
True
)
self
.
testEgg
(
'import matplotlib as _'
,
True
)
self
.
testEgg
(
'import math as _'
,
True
)
self
.
testEgg
(
'import sympy as _'
,
True
)
self
.
testEgg
(
'import pylab as _'
,
True
)
self
.
testEgg
(
'import openpyxl as _'
,
True
)
self
.
testEgg
(
'import statsmodels as _'
,
True
)
self
.
testEgg
(
'import zipfile as _'
,
True
)
self
.
testEgg
(
'import ftplib as _'
,
True
)
self
.
testEgg
(
'import datetime as _'
,
True
)
self
.
testEgg
(
'import h5py as _'
,
True
)
\ No newline at end of file
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