-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
212c0ae
commit faa7904
Showing
107 changed files
with
693 additions
and
399 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
tests/safeds/data/tabular/containers/_lazy_vectorized_row/__snapshots__/test_hash.ambr
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# serializer version: 1 | ||
# name: TestContract.test_should_return_same_hash_in_different_processes[empty] | ||
1789859531466043636 | ||
# --- | ||
# name: TestContract.test_should_return_same_hash_in_different_processes[no rows] | ||
585695607399955642 | ||
# --- | ||
# name: TestContract.test_should_return_same_hash_in_different_processes[with data] | ||
909875695937937648 | ||
# --- |
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
22 changes: 22 additions & 0 deletions
22
tests/safeds/data/tabular/containers/_lazy_vectorized_row/test_column_names.py
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import pytest | ||
|
||
from safeds.data.tabular.containers import Table | ||
from safeds.data.tabular.containers._lazy_vectorized_row import _LazyVectorizedRow | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("table", "expected"), | ||
[ | ||
(Table({}), []), | ||
(Table({"col1": []}), ["col1"]), | ||
(Table({"col1": [1], "col2": [1]}), ["col1", "col2"]), | ||
], | ||
ids=[ | ||
"empty", | ||
"no rows", | ||
"with data", | ||
], | ||
) | ||
def test_should_return_column_names(table: Table, expected: list[str]) -> None: | ||
row = _LazyVectorizedRow(table) | ||
assert row.column_names == expected |
24 changes: 24 additions & 0 deletions
24
tests/safeds/data/tabular/containers/_lazy_vectorized_row/test_contains.py
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
|
||
from safeds.data.tabular.containers import Table | ||
from safeds.data.tabular.containers._lazy_vectorized_row import _LazyVectorizedRow | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("table", "column", "expected"), | ||
[ | ||
(Table({}), "C", False), | ||
(Table({"A": []}), "A", True), | ||
(Table({"A": []}), "B", False), | ||
(Table({"A": []}), 1, False), | ||
], | ||
ids=[ | ||
"empty", | ||
"has column", | ||
"doesn't have column", | ||
"key is not string", | ||
], | ||
) | ||
def test_should_return_if_column_is_in_row(table: Table, column: str, expected: bool) -> None: | ||
row = _LazyVectorizedRow(table) | ||
assert (column in row) == expected |
Oops, something went wrong.