Skip to content

Commit 44c1df7

Browse files
authored
ENH: Suppress Numpy warnings (#120)
1 parent d9cba60 commit 44c1df7

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

python/xorbits/numpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def _install():
7979
# suppress numpy warnings on types
8080
with warnings.catch_warnings():
8181
warnings.simplefilter("ignore", DeprecationWarning)
82+
warnings.simplefilter("ignore", FutureWarning)
8283
# noinspection PyUnresolvedReferences
8384
from numpy import bool, float, int, object # type: ignore[attr-defined]
8485
except ImportError: # pragma: no cover

python/xorbits/web/tests/test_request_web.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
import pytest
1818

1919
from ..._mars.deploy.oscar.session import get_default_session
20-
from ...deploy import init, shutdown
20+
from ...tests.core import init_test
2121

2222

2323
@pytest.fixture
2424
def init_with_web():
25-
init(n_cpu=2, web=True)
25+
sess = init_test(n_cpu=2, web=True)
26+
sess.as_default()
2627
yield
27-
shutdown()
28+
sess.stop_server()
2829

2930

3031
def test_web_ui(init_with_web):
@@ -34,4 +35,3 @@ def test_web_ui(init_with_web):
3435
response = urllib.request.urlopen(req)
3536
assert response.code == 200
3637
assert b"Xorbits" in response.read()
37-
sess.stop_server()

0 commit comments

Comments
 (0)