-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
import pandas as pd | ||
import polars_bio.overlap as overlap | ||
import polars_bio as pb | ||
from _expected import PL_DF_OVERLAP, PL_DF1, PL_DF2 | ||
|
||
|
||
class TestOverlapPolars: | ||
|
||
result_frame = pb.overlap(PL_DF1, PL_DF2, output_type="polars.DataFrame") | ||
result_lazy = pb.overlap(PL_DF1, PL_DF2, output_type="polars.LazyFrame").collect() | ||
expected = PL_DF_OVERLAP | ||
|
||
def test_overlap_count(self): | ||
assert len(self.result_frame) == 16 | ||
assert len(self.result_lazy) == 16 | ||
|
||
def test_overlap_schema_rows(self): | ||
result = self.result_frame.sort(by=self.result_frame.columns) | ||
assert self.expected.equals(result) | ||
|
||
def test_overlap_schema_rows_lazy(self): | ||
result = self.result_lazy.sort(by=self.result_lazy.columns) | ||
assert self.expected.equals(result) |