Skip to content

test: add CLI test suite and test datasets#2

Merged
mitsuki31 merged 3 commits intomasterfrom
chore/add-test-module
Apr 25, 2026
Merged

test: add CLI test suite and test datasets#2
mitsuki31 merged 3 commits intomasterfrom
chore/add-test-module

Conversation

@mitsuki31
Copy link
Copy Markdown
Owner

@mitsuki31 mitsuki31 commented Apr 25, 2026

Overview

This PR introduces an initial testing setup for the CLI, including dataset fixtures and development dependencies. It establishes a foundation for validating functionality and preventing regressions.


Changes Made

Test Suite

  • Added initial test module for CLI using pytest and CliRunner
  • Covers basic command execution and file conversion flows

Test Data

  • Added Excel datasets under tests/data for various scenarios:
    • basic data
    • multi-sheet
    • empty (including NULL values) and header-only files
    • financial data
    • special characters and encoding
    • large numbers and long text

Note

Inside test suite module, there's a test function which converts an empty Excel file into CSV, but the test itself will returns success due to the Excel file having a sheet. The tool will only fails if the Excel file has no sheet at all, throwing xls2csv.exception.NoSheetFoundError exception.

Development Dependencies

  • Added pytest as a development dependency in pyproject.toml
  • Added pytest to requirements.txt

Impact

  • Enables automated testing for CLI behavior
  • Improves reliability by covering common and edge-case inputs
  • No impact on runtime users (dev dependency only)

Summary

This PR sets up a basic but practical testing framework for the CLI, backed by realistic Excel datasets. It provides a starting point for expanding test coverage and improving code quality over time.

@mitsuki31 mitsuki31 self-assigned this Apr 25, 2026
@mitsuki31 mitsuki31 marked this pull request as ready for review April 25, 2026 18:34
@mitsuki31 mitsuki31 merged commit 9fdf3c5 into master Apr 25, 2026
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.

1 participant