Skip to content

Commit dbc30ec

Browse files
author
Chinmay Chandak
committed
2 parents 94e52b4 + 6cb2f92 commit dbc30ec

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

streamz/dataframe/tests/test_cudf.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def test_attributes():
7979
df = cudf.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
8080
sdf = DataFrame(example=df)
8181

82-
assert 'x' in dir(sdf)
83-
assert 'z' not in dir(sdf)
84-
82+
assert getattr(sdf,'x',-1) != -1
83+
assert getattr(sdf,'z',-1) == -1
84+
8585
sdf.x
8686
with pytest.raises(AttributeError):
8787
sdf.z
@@ -437,25 +437,6 @@ def test_to_frame(stream):
437437
assert isinstance(a, DataFrame)
438438
assert list(a.columns) == ['x']
439439

440-
441-
def test_instantiate_with_dict(stream):
442-
df = cudf.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
443-
sdf = DataFrame(example=df, stream=stream)
444-
445-
sdf2 = DataFrame({'a': sdf.x, 'b': sdf.x * 2,
446-
'c': sdf.y % 2})
447-
L = sdf2.stream.gather().sink_to_list()
448-
assert len(sdf2.columns) == 3
449-
450-
sdf.emit(df)
451-
sdf.emit(df)
452-
453-
assert len(L) == 2
454-
for x in L:
455-
assert_eq(x[['a', 'b', 'c']],
456-
cudf.DataFrame({'a': df.x, 'b': df.x * 2, 'c': df.y % 2}))
457-
458-
459440
@pytest.mark.parametrize('op', ['cumsum', 'cummax', 'cumprod', 'cummin'])
460441
@pytest.mark.parametrize('getter', [lambda df: df, lambda df: df.x])
461442
def test_cumulative_aggregations(op, getter, stream):

0 commit comments

Comments
 (0)