makotest
Test and simulation toolkit for German market-communication (MaKo) platforms. It builds regulator-conformant EDIFACT, simulates the counterparties a platform talks to — answering in EDIFACT, late, or not at all — and asserts on the messages and the CloudEvents stream. It drives only public interfaces, so it can exercise any MaKo implementation, not only mako.
| Package | pip install makotest (no runtime dependencies); makotest[hypothesis] adds property-based strategies |
| Build | PyO3 extension over mako's Rust crates, built with maturin; one abi3 wheel for Python ≥ 3.11 |
| Rust core | edi-energy (EDIFACT, MIG/AHB validation), rubo4e (check digits), mako-fristen (Werktage, Fristen), mako-pruefung (Antwortcodes and the NB participation check), mako-events (CloudEvent types) |
| pytest | plugin via pytest11: simulator, clock and seed fixtures, @pytest.mark.regulatory |
| Fixtures | nb_sim, biko_sim, mgv_sim, imsys_sim, epex, lastgang, frozen_clock, makotest_seed, makotest_on, mako_endpoint |
| Options | --makotest-on ISO_DATE, --makotest-seed N, --mako-endpoint URL |
| CLI | makotest validate, frist, id, pids, codes, shadow reconcile, shadow rehearse, … |
Example
from makotest import antwort_obligation, malo_from_base, validate_edifact
malo_from_base("5123869601") # '51238696012' — BDEW check digit applied
o = antwort_obligation(55001) # what a Netzbetreiber owes on an Anmeldung
o.clock_time # '11:00' — a clock time, not n × 24 h
o.due_at("2026-03-02T09:00:00Z") # '2026-03-03T11:00:00+01:00'
report = validate_edifact(utilmd_bytes, "2026-10-01")
report.is_valid # receiver verdict
report.is_sendable # sender preflight for the entire interchange
Run makotest validate outbound.edi --on 2026-10-01 --for-sending before dispatch. Use --json to see both verdicts and the rule and field behind each finding.
def test_nb_bestaetigt(nb_sim, anmeldung):
nb_sim.on(55001).bestaetigung(antwort_code="A51", ebd="E_0623")
reply = nb_sim.receive(anmeldung, received_at="2026-03-02T09:00:00Z")
assert reply.pid == 55002 # the AHB answer PID — never Anfrage + 1
Generators are seeded, clocks injected and the format version is an argument,
so two runs produce byte-identical EDIFACT. AssertionError means the system
under test is wrong; ValueError means the test is.
Reconcile a shadow capture
From the repository root, run just test-makotest to install the development build, then compare the two independently prepared inputs and read the mirror on disk.
capture=makotest/tests/fixtures/shadow
makotest/.venv/bin/makotest shadow reconcile --journal "$capture/journal.json" \
--inventory "$capture/inventory.json" --mirror-root "$capture/mirror"
The fixture contains two synthetic Strom Anmeldungen received by an NB and a closed outbound interval with zero traffic. Exit 0 means the capture is complete or confirmed empty. Exit 1 identifies differences in sealed inputs. Exit 2 means coverage could not be established. Read eligible_for_comparison before comparing business outcomes. The report contains fingerprints, counts and reason codes and can be redirected to a file outside the mirror. Capture format and recovery steps
Replay one occurrence against the independent expected reply. The synthetic fixture yields two eligible Anmeldungen, one matching response and one unassessed occurrence.
capture=makotest/tests/fixtures/shadow
makotest/.venv/bin/makotest shadow rehearse \
--journal "$capture/journal.json" --inventory "$capture/inventory.json" \
--mirror-root "$capture/mirror" --coverage "$capture/reports/complete.json" \
--case "$capture/case.json" --expected "$capture/expected.json"
Add --emit summary to see the counts and the two answers. With makod on PATH, add --makod-workspace "$(mktemp -d)" to compare a reply from the daemon’s own workflow and capture its outbox locally.
For the isolated review installation, add --emit review --review-nb 9900357000003 to the daemon command and redirect stdout to a private file outside the mirror. Every inbound envelope must address that NB. Use --also CASE EXPECTED [OBSERVATION] for each additional assessment. Exit 1 produces a reviewable difference. Exit 2 withholds the private file contents. Review configuration
Compare a response present on only one side with makotest shadow pair --incumbent DIR --shadow DIR --case FILE. Both archives must cover the same inbound and outbound window. Assess an ESA invoice using makotest shadow invoice --invoice FILE --reference FILE. The bundled settlement example returns EUR 13.95 for the position and REMADV 33001. Capture and invoice contracts
Run
makotest is a member of the mako Cargo workspace:
python3.11 -m venv .venv # at the workspace root; PYO3_PYTHON points here (.cargo/config.toml)
just test-makotest # maturin develop + pytest
just lint-makotest # ruff
just build-makotest # release wheel
pyo3/extension-module is not a Cargo feature (maturin enables it), so
cargo test --workspace --all-features still links.
Licence: MIT OR Apache-2.0, matching mako.
The full reference — every builder, assertion, strategy and simulator, with the Fundstelle behind each rule — is makotest in the mako documentation.
Metadata
Release files for makotest 0.49.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| makotest-0.49.0.tar.gz | 3.1 MB | With provenance | Details for makotest-0.49.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| makotest-0.49.0-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details for makotest-0.49.0-cp311-abi3-win_amd64.whl |
| makotest-0.49.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ x86-64 | Details for makotest-0.49.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| makotest-0.49.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.17+ ARM64 | Details for makotest-0.49.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| makotest-0.49.0-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for makotest-0.49.0-cp311-abi3-macosx_11_0_arm64.whl |
| makotest-0.49.0-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details for makotest-0.49.0-cp311-abi3-macosx_10_12_x86_64.whl |
Total release size: 18.1 MB
Release files / makotest-0.49.0.tar.gz
| Download URL | makotest-0.49.0.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
784478acad4e48be9e8bf9e82c9308844c081c5348ef5bf09b83af07e9f2e9a0
|
|
BLAKE2b-256 checksum How to use checksums |
4b480025678b851723e616bc67ba830e54e3aeaffd98076d29364b701cee049f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logRelease files / makotest-0.49.0-cp311-abi3-win_amd64.whl
| Download URL | makotest-0.49.0-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3e3ea209df889f052e18bdc027c71af803378ac4d257bb7baadf19b26fbdc496
|
|
BLAKE2b-256 checksum How to use checksums |
62d4b7ae58e34eac217ffd1b8e3cd54090b375dbcce131a3e837a9803b0ed487
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logRelease files / makotest-0.49.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | makotest-0.49.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7702209c34860c18a0b02d758df287bc3376d1797e65aa2a8c8fb776a9bbd693
|
|
BLAKE2b-256 checksum How to use checksums |
c8137f3aab1b743a941efd8952bb0ebefb12165977f12daf09756f9567d10321
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logRelease files / makotest-0.49.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | makotest-0.49.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
92baaadd48a0b7e120568943ae1705f036742c33372e8c5f56f9f00658d9ef64
|
|
BLAKE2b-256 checksum How to use checksums |
a68050697ad8a1d8de01f3230c1043a05d355ff1a303e3a3941bfba2f0023b3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logRelease files / makotest-0.49.0-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | makotest-0.49.0-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.9 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4e35d02fa2aeca39c79a9a5fc2f7d14a4cac654c25946e48fd22436a186e089a
|
|
BLAKE2b-256 checksum How to use checksums |
f72ac8f3a4c123a51c315ca398d92a79866e04308fa179ff640debccc2c07376
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logRelease files / makotest-0.49.0-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | makotest-0.49.0-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.8 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
15a844a33b03e48da5e53e559e45799ceb57bc878f0e17d33ffbccc259fc9213
|
|
BLAKE2b-256 checksum How to use checksums |
cb0f8e513ca3c01c3d957df9822d275a32314f5591dd58b89a6c557ccf15af5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 30, 2026.
Transparency logSecurity for makotest 0.49.0
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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for makotest-0.49.0.tar.gz
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 Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.