mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-10 03:23:00 +00:00
Added basic tests on some important components
* tensorflow basic tests following #1002 * pandas basic tests following #1063
This commit is contained in:
27
scipy-notebook/test/test_pandas.py
Normal file
27
scipy-notebook/test/test_pandas.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
import time
|
||||
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)
|
Reference in New Issue
Block a user