-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added call to setup function of serializer class to set data format (#96
- Loading branch information
Showing
2 changed files
with
30 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from unittest.mock import MagicMock | ||
|
||
from litdata.streaming.item_loader import PyTreeLoader | ||
|
||
|
||
def test_serializer_setup(): | ||
config_mock = MagicMock() | ||
config_mock.__getitem__.return_value = ["fake:12"] | ||
serializer_mock = MagicMock() | ||
item_loader = PyTreeLoader() | ||
item_loader.setup(config_mock, [], {"fake": serializer_mock}) | ||
serializer_mock.setup._mock_mock_calls[0].args[0] == "fake:12" |