Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufuyanik1 committed Jan 3, 2024
1 parent 5efa1b1 commit e2d7166
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/tests/test_ADMDatamart.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Shape:
"""

def __new__(cls, ldf: pl.LazyFrame):
return (ldf.select(pl.first().count()).collect().item(), len(ldf.columns))
return (ldf.select(pl.first().len()).collect().item(), len(ldf.columns))


@pl.api.register_lazyframe_namespace("frame")
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_IO.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Shape:
"""

def __new__(cls, ldf: pl.LazyFrame):
return (ldf.select(pl.first().count()).collect().item(), len(ldf.columns))
return (ldf.select(pl.first().len()).collect().item(), len(ldf.columns))


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion python/tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Shape:
"""

def __new__(cls, ldf: pl.LazyFrame):
return (ldf.select(pl.first().count()).collect().item(), len(ldf.columns))
return (ldf.select(pl.first().len()).collect().item(), len(ldf.columns))


def test_import_CDHSample():
Expand Down
9 changes: 5 additions & 4 deletions python/tests/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import sys
import pathlib

basePath = pathlib.Path(__file__).parent.parent.parent
sys.path.append(f"{str(basePath)}/python")
import polars as pl
Expand All @@ -20,7 +21,7 @@ class Shape:
"""

def __new__(cls, ldf: pl.LazyFrame):
return (ldf.select(pl.first().count()).collect().item(), len(ldf.columns))
return (ldf.select(pl.first().len()).collect().item(), len(ldf.columns))


def test_end_to_end():
Expand Down Expand Up @@ -65,7 +66,7 @@ def test_end_to_end():
"BinAdjustedPropensity",
"Contents",
"PredictorCategory",
"GroupIndex"
"GroupIndex",
}
assert set(datamart.predictorData.columns) == predcols

Expand All @@ -90,7 +91,7 @@ def test_end_to_end():
"EntryType",
"BinNegatives",
"Contents",
"GroupIndex"
"GroupIndex",
}

assert datamart.missing_preds == {
Expand Down Expand Up @@ -134,7 +135,7 @@ def test_end_to_end():
"BinResponseCount",
"PredictorName",
"Contents",
"GroupIndex"
"GroupIndex",
}

assert isinstance(datamart.plotPerformanceSuccessRateBubbleChart(), Figure)
Expand Down

0 comments on commit e2d7166

Please sign in to comment.