mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-16 06:07:17 -05:00
Add native Binder checks for LEGO formatting/unit/prose contracts, extend mlsysim formatter helpers, and normalize Vol1/Vol2 LEGO output strings through typed formatters. Validate precision-sensitive prose rendering across both volumes and promote direct math/string assembly to fmt_math, fmt_display_math, fmt_text, and domain-specific helpers.
13 lines
392 B
Python
13 lines
392 B
Python
import pytest
|
|
|
|
from mlsysim import Datasets
|
|
from mlsysim.core.units import byte, second
|
|
|
|
|
|
def test_mswc_audio_encoding_is_registry_backed():
|
|
mswc = Datasets.MSWC
|
|
|
|
assert mswc.sample_duration.to(second).magnitude == pytest.approx(1.0)
|
|
assert mswc.sample_rate.to(1 / second).magnitude == pytest.approx(16_000.0)
|
|
assert mswc.sample_width.to(byte).magnitude == pytest.approx(2.0)
|