Skip to content

Commit

Permalink
Refactor pytest workflow and improve test documentation
Browse files Browse the repository at this point in the history
- Updated the GitHub Actions workflow for pytest to streamline Python setup and dependency installation.
- Enhanced test documentation in test_spot_symbols.py by translating comments to English for better clarity and consistency.
- Removed unnecessary comments to improve code readability.
  • Loading branch information
aoki-h-jp committed Jan 4, 2025
1 parent 0595838 commit 5b99589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9 # 使用するPythonのバージョンを指定してください
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install git+https://github.com/aoki-h-jp/binance-bulk-downloader
pipenv install --dev # Pipenvを使用して依存関係をインストール
pipenv install --dev
- name: Run pytest
run: |
pipenv run pytest -v -s # pytestを実行するコマンドを指定
pipenv run pytest -v -s
6 changes: 3 additions & 3 deletions tests/test_spot_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"""

import pytest
from unittest.mock import patch, MagicMock
from unittest.mock import patch

from binance_bulk_downloader.downloader import BinanceBulkDownloader


@pytest.fixture
def mock_s3_response():
"""モックのS3レスポンスを生成するフィクスチャ"""
"""Mock S3 response"""
return {
"BTCUSDT": [
"data/spot/daily/klines/BTCUSDT/1h/BTCUSDT-1h-2024-01-01.zip",
Expand Down Expand Up @@ -75,7 +75,7 @@ def test_spot_symbols(
):
"""
Test spot market symbols filtering
:param mock_s3_response: モックのS3レスポンス
:param mock_s3_response: mock S3 response
:param tmpdir: temporary directory
:param data_type: type of data to download
:param data_frequency: frequency of data
Expand Down

0 comments on commit 5b99589

Please sign in to comment.