Skip to content

Add dataset downloading#79

Merged
vhaldemar merged 7 commits intoyandex-cloud:masterfrom
ArtoLord:feature/dataset_downloading
Apr 3, 2025
Merged

Add dataset downloading#79
vhaldemar merged 7 commits intoyandex-cloud:masterfrom
ArtoLord:feature/dataset_downloading

Conversation

@ArtoLord
Copy link
Copy Markdown
Collaborator

@ArtoLord ArtoLord commented Apr 2, 2025

No description provided.

@pytest.fixture
def mock_dataset(mocker, tmp_path: Path) -> AsyncDataset:
"""Create a mock dataset for testing."""
sdk_mock = mocker.MagicMock()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, what the benefits of the python-mock against the unittest.mock.MagicMock?

Copy link
Copy Markdown
Collaborator Author

@ArtoLord ArtoLord Apr 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python-mock is integrated with pytest and removes mocks after test method

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, you use fixture for this, it is also removes everething.
Also, instead of mocker.patch there is builtin monkeypatch in pytest

@vhaldemar vhaldemar merged commit 1edbb8b into yandex-cloud:master Apr 3, 2025
10 checks passed
GBocharov pushed a commit that referenced this pull request Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants