Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
Jupyter Docker Stacks
Commits
8b4d6f6a
Commit
8b4d6f6a
authored
Apr 20, 2020
by
Peter Parente
Committed by
GitHub
Apr 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1067 from romainx/test_improvements
Added basic tests on some important components
parents
584e9ab3
730b96bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
scipy-notebook/test/test_pandas.py
scipy-notebook/test/test_pandas.py
+26
-0
tensorflow-notebook/test/test_tensorflow.py
tensorflow-notebook/test/test_tensorflow.py
+30
-0
No files found.
scipy-notebook/test/test_pandas.py
0 → 100644
View file @
8b4d6f6a
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import
logging
import
pytest
LOGGER
=
logging
.
getLogger
(
__name__
)
@
pytest
.
mark
.
parametrize
(
"name,command"
,
[
(
"Sum series"
,
"import pandas as pd; import numpy as np; np.random.seed(0); print(pd.Series(np.random.randint(0, 7, size=10)).sum())"
,
),
],
)
def
test_pandas
(
container
,
name
,
command
):
"""Basic pandas tests"""
LOGGER
.
info
(
f
"Testing pandas: {name} ..."
)
c
=
container
.
run
(
tty
=
True
,
command
=
[
"start.sh"
,
"python"
,
"-c"
,
command
])
rv
=
c
.
wait
(
timeout
=
30
)
assert
rv
==
0
or
rv
[
"StatusCode"
]
==
0
logs
=
c
.
logs
(
stdout
=
True
)
.
decode
(
"utf-8"
)
LOGGER
.
debug
(
logs
)
tensorflow-notebook/test/test_tensorflow.py
0 → 100644
View file @
8b4d6f6a
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import
logging
import
pytest
LOGGER
=
logging
.
getLogger
(
__name__
)
@
pytest
.
mark
.
parametrize
(
"name,command"
,
[
(
"Hello world"
,
"import tensorflow as tf;print(tf.constant('Hello, TensorFlow'))"
,
),
(
"Sum"
,
"import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
,
),
],
)
def
test_tensorflow
(
container
,
name
,
command
):
"""Basic tensorflow tests"""
LOGGER
.
info
(
f
"Testing tensorflow: {name} ..."
)
c
=
container
.
run
(
tty
=
True
,
command
=
[
"start.sh"
,
"python"
,
"-c"
,
command
])
rv
=
c
.
wait
(
timeout
=
30
)
assert
rv
==
0
or
rv
[
"StatusCode"
]
==
0
logs
=
c
.
logs
(
stdout
=
True
)
.
decode
(
"utf-8"
)
LOGGER
.
debug
(
logs
)
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