mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 02:01:24 +08:00
Fix modin test (#4069)
This commit is contained in:
committed by
Robert Nishihara
parent
6e46d75554
commit
cfc7e2c5a9
@@ -2,10 +2,30 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import ray # noqa F401
|
||||
import pytest
|
||||
|
||||
import ray
|
||||
|
||||
|
||||
def test_modin_import():
|
||||
@pytest.fixture
|
||||
def shutdown_only():
|
||||
yield None
|
||||
# The code after the yield will run as teardown code.
|
||||
ray.shutdown()
|
||||
|
||||
|
||||
def test_modin_import_with_ray_init(shutdown_only):
|
||||
ray.init(num_cpus=1)
|
||||
import modin.pandas as pd
|
||||
frame_data = [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
frame = pd.DataFrame(frame_data)
|
||||
assert frame.sum().squeeze() == sum(frame_data)
|
||||
|
||||
|
||||
# The following can be activated once we have a modin release that
|
||||
# includes https://github.com/modin-project/modin/pull/472.
|
||||
@pytest.mark.skip(reason="needs #472 in modin")
|
||||
def test_modin_import(shutdown_only):
|
||||
import modin.pandas as pd
|
||||
frame_data = [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
frame = pd.DataFrame(frame_data)
|
||||
|
||||
+9
-1
@@ -84,7 +84,13 @@ class build_ext(_build_ext.build_ext):
|
||||
for name in filenames:
|
||||
pyarrow_files.append(os.path.join(root, name))
|
||||
|
||||
files_to_include = ray_files + pyarrow_files
|
||||
# Make sure the relevant files for modin get copied.
|
||||
modin_files = []
|
||||
for (root, dirs, filenames) in os.walk("./ray/modin"):
|
||||
for name in filenames:
|
||||
modin_files.append(os.path.join(root, name))
|
||||
|
||||
files_to_include = ray_files + pyarrow_files + modin_files
|
||||
|
||||
# Copy over the autogenerated flatbuffer Python bindings.
|
||||
for directory in generated_python_directories:
|
||||
@@ -144,6 +150,8 @@ requires = [
|
||||
"redis",
|
||||
# The six module is required by pyarrow.
|
||||
"six >= 1.0.0",
|
||||
# The typing module is required by modin.
|
||||
"typing",
|
||||
"flatbuffers",
|
||||
"faulthandler;python_version<'3.3'",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user