Skip to content

Commit

Permalink
Fix some issues in the test code found by np2.0.0 (#5621) (#5632)
Browse files Browse the repository at this point in the history
Co-authored-by: Jianfeng Mao <4297243+jmao-denver@users.noreply.github.com>
  • Loading branch information
mofojed and jmao-denver authored Jun 18, 2024
1 parent 00083d3 commit 38b9241
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion py/client/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def test_agg_with_options(self):
self.assertEqual(rt.size, test_table.select_distinct(["c"]).size)

with self.assertRaises(TypeError):
aggs = [unique(cols=["ua = a", "ub = b"], include_nulls=True, non_unique_sentinel=np.uint32(-1))]
aggs = [unique(cols=["ua = a", "ub = b"], include_nulls=True, non_unique_sentinel=np.uint32(128))]

aggs_default = [
median(cols=["ma = a", "mb = b"]),
Expand Down
2 changes: 1 addition & 1 deletion py/server/tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def setUp(self):
"NPLong": np.array([1, -1], dtype=np.int8),
"Float": np.array([1.01, -1.01], dtype=np.float32),
"Double": np.array([1.01, -1.01]),
"String": np.array(["foo", "bar"], dtype=np.string_),
"String": np.array(["foo", "bar"], dtype=np.str_),
"Datetime": np.array([1, -1], dtype=np.dtype("datetime64[ns]")),
"PyObj": np.array([CustomClass(1, "1"), CustomClass(-1, "-1")]),
"PyObj1": np.array([[1, 2, 3], CustomClass(-1, "-1")], dtype=np.object_),
Expand Down
2 changes: 1 addition & 1 deletion py/server/tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def test_arrow_backend(self):
),
'pa_byte': pandas.Series([1, None], dtype='int8[pyarrow]'),
'py_string': pandas.Series(['text1', None], dtype=pd.StringDtype()),
'pa_byte1': pandas.Series(np.array([1, 255], dtype=np.int8)),
'pa_byte1': pandas.Series(np.array([1, 127], dtype=np.int8)),
})
dh_table = to_table(df)
self.assertEqual(dh_table.to_string().count('null'), 5)
Expand Down

0 comments on commit 38b9241

Please sign in to comment.