This release is a pre-release and may not be stable for production use.
Multipart Form-Data Conformance Test Suite
⚠️ EARLY ALPHA - DO NOT USE
This test suite is in very early development and has not been verified against real-world implementations. The test cases, expected results, and tooling may contain errors. Do not rely on this for validating parser conformance until it has been thoroughly reviewed and tested.
A language-independent test suite for validating HTTP multipart/form-data parsers and generators.
Goals
- Language-independent - Raw binary test files with JSON metadata
- Bidirectional - Test both parsing and generation
- Comprehensive - Cover spec requirements, edge cases, and browser variations
- Self-describing - Each test case explains what it's testing
Quick Start
Running Tests Against Your Implementation
- Iterate through test directories in
tests/ - For each test:
- Read
headers.jsonto get the Content-Type header with boundary - Read
input.rawas binary data (the HTTP request body) - Parse using your implementation
- Compare results against
expectedintest.json
- Read
Test Case Structure
Each test case is a directory containing:
tests/category/NNN-test-name/
├── test.json # Metadata and expected results
├── headers.json # HTTP headers (Content-Type with boundary)
└── input.raw # Raw HTTP body bytes (binary)
Test Categories
| Category | ID Range | Description |
|---|---|---|
| basic | 001-019 | Essential parsing tests |
| filenames | 020-039 | Filename parameter handling |
| boundaries | 040-059 | Boundary detection and edge cases |
| line-endings | 060-079 | CRLF/LF handling |
| content-types | 080-099 | Content-Type and header parsing |
| edge-cases | 100-199 | Unusual but valid scenarios |
| malformed | 200-299 | Invalid input error handling |
| browser-variations | 300-399 | Real browser output patterns |
File Formats
test.json
{
"id": "001-single-text-field",
"name": "Single text field",
"description": "Basic test with one text form field",
"spec_references": ["RFC 7578 Section 4.2"],
"category": "basic",
"tags": ["required", "parsing"],
"expected": {
"valid": true,
"parts": [
{
"name": "username",
"filename": null,
"content_type": null,
"body_text": "john_doe"
}
]
}
}
headers.json
{
"content-type": "multipart/form-data; boundary=----TestBoundary123"
}
input.raw
Binary file containing exact HTTP body bytes. Use a hex editor or the provided tools to inspect.
Tools
tools/generate-raw.py- Create .raw files programmaticallytools/validate-suite.py- Validate test suite integritytools/run-reference.py- Reference parser implementation
Spec References
- RFC 7578 - Returning Values from Forms: multipart/form-data
- RFC 2046 - MIME Part Two: Media Types (multipart definition)
- RFC 5987 - Character Set and Language Encoding (filename*)
- HTML Living Standard - Form submission
License
This test suite is released under the MIT License. See LICENSE for details.
Release files for multipart-form-data-conformance 0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| multipart_form_data_conformance-0.1a0.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| multipart_form_data_conformance-0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.6 kB
Release files / multipart_form_data_conformance-0.1a0.tar.gz
| Download URL | multipart_form_data_conformance-0.1a0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60d06e38cedd7dbf272ca84742d9b9428da5e7fdebb9b75ee41b1a043d5e2824
|
|
BLAKE2b-256 checksum How to use checksums |
606534b50d307b2f764553b1961945c89e6baff9e35c14b2687d3c08f4b65980
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency logRelease files / multipart_form_data_conformance-0.1a0-py3-none-any.whl
| Download URL | multipart_form_data_conformance-0.1a0-py3-none-any.whl |
|---|---|
| Size | 85.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9250810800cb227da5bd4ae0a61cd7d92595f92968125dec3ee7c97b6cc37029
|
|
BLAKE2b-256 checksum How to use checksums |
3f186cb98310b7cb1f12843b54cbf639f96cc39c10ceec0f13a36de83e62c572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 22, 2026.
Transparency log