Skip to content

test: add spec compliance validation against multibase.csv - #51

Merged
seetadev merged 1 commit into
multiformats:masterfrom
sumanjeet0012:fix-issue-37-spec-test
Jul 13, 2026
Merged

test: add spec compliance validation against multibase.csv#51
seetadev merged 1 commit into
multiformats:masterfrom
sumanjeet0012:fix-issue-37-spec-test

Conversation

@sumanjeet0012

Copy link
Copy Markdown
Contributor

Fixes #37

Description

This pull request adds an automated specification compliance test to ensure that py-multibase remains fully compliant with the upstream multibase specification.

By adding the multiformats/multibase spec repository as a Git submodule, we can now automatically validate our manually maintained ENCODINGS array against the authoritative multibase.csv.

Changes Made

  • Added https://github.com/multiformats/multibase as a Git submodule located at multibase-spec.
  • Updated GitHub Actions CI (.github/workflows/tox.yml) to initialize and checkout submodules via actions/checkout@v4.
  • Added tests/test_spec.py, which parsing multibase.csv and validates:
    1. Every encoding currently supported in ENCODINGS (excluding identity) is present in multibase.csv.
    2. The prefix codes exactly match the character specified in the CSV (including multi-byte emoji prefixes like 🚀).
    3. Every status == "final" encoding in the CSV is fully supported by py-multibase.

Verification

  • Ran the test suite pytest tests/test_spec.py locally and it executed successfully.
  • Code conforms to all project formatting and linting requirements (make lint).

@seetadev
seetadev merged commit 1607cec into multiformats:master Jul 13, 2026
21 checks passed
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.

No spec compliance test validating encodings against multibase.csv

2 participants