Skip to content

Commit

Permalink
Addressing review. Removing unneeded jpy imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
chipkent committed Sep 1, 2023
1 parent 9fad38b commit aedc7b9
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion py/server/tests/test_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from datetime import datetime
from typing import List, Any

import jpy
import numpy as np
import pandas as pd
import pyarrow as pa
Expand Down
10 changes: 3 additions & 7 deletions py/server/tests/test_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
import unittest
from dataclasses import dataclass

import jpy

from deephaven import DHError, dtypes, new_table
from deephaven import DHError, dtypes, new_table, time as dhtime
from deephaven import empty_table
from deephaven.column import byte_col, char_col, short_col, bool_col, int_col, long_col, float_col, double_col, \
string_col, datetime_col, jobj_col, ColumnType
from deephaven.constants import MAX_BYTE, MAX_SHORT, MAX_INT, MAX_LONG
from deephaven.jcompat import j_array_list
from tests.testbase import BaseTestCase

_JDateTimeUtils = jpy.get_type("io.deephaven.time.DateTimeUtils")


class ColumnTestCase(BaseTestCase):

Expand Down Expand Up @@ -57,7 +53,7 @@ def test_column_error(self):
_ = string_col(name="String", data=[1, -1.01])

with self.assertRaises(DHError) as cm:
_ = datetime_col(name="Datetime", data=[_JDateTimeUtils.epochNanosToInstant(round(time.time())), False])
_ = datetime_col(name="Datetime", data=[round(time.time()), False])

with self.assertRaises(DHError) as cm:
_ = jobj_col(name="JObj", data=[jobj, CustomClass(-1, "-1")])
Expand Down Expand Up @@ -134,7 +130,7 @@ def get_x(i) -> int:
self.assertEqual(t_list_integers.columns[6].data_type, dtypes.float64)

def test_datetime_col(self):
inst = _JDateTimeUtils.epochNanosToInstant(round(time.time()))
inst = dhtime.to_j_instant(round(time.time()))
dt = datetime.datetime.now()
_ = datetime_col(name="Datetime", data=[inst, dt, None])

Expand Down
1 change: 0 additions & 1 deletion py/server/tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import unittest
from dataclasses import dataclass

import jpy
import numpy as np

from deephaven import DHError, new_table, dtypes
Expand Down
1 change: 0 additions & 1 deletion py/server/tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import unittest
from dataclasses import dataclass
import jpy

import numpy as np
import pandas
Expand Down
1 change: 0 additions & 1 deletion py/server/tests/test_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

import unittest
import jpy

from deephaven import DHError, new_table, TableReplayer, time
from deephaven.column import int_col, datetime_col
Expand Down
2 changes: 0 additions & 2 deletions py/server/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from types import SimpleNamespace
from typing import List, Any

import jpy

from deephaven import DHError, read_csv, empty_table, SortDirection, time_table, update_graph, new_table, dtypes
from deephaven.agg import sum_, weighted_avg, avg, pct, group, count_, first, last, max_, median, min_, std, abs_sum, \
var, formula, partition, unique, count_distinct, distinct
Expand Down
1 change: 0 additions & 1 deletion py/server/tests/test_update_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
#

import jpy
import unittest

from deephaven import time_table, DHError, merge
Expand Down

0 comments on commit aedc7b9

Please sign in to comment.