Skip to content

De-duplicate test WAVs against scipy's bundled test data #46

Description

@endolith

19 of the 24 WAV files in tests/test_files/ are byte-identical duplicates of scipy's bundled test fixtures at scipy/io/tests/data/ (verified byte-for-byte). scipy is a hard dependency (requirements.txt), installed in every CI job, so these could be referenced directly instead of duplicated.

Affected files (present in both locations): all of the test-44/48/8k*.wav files; the unique repo-only files are the two Ocenaudio files, short_sine.flac/mp3, and test-1234Hz-le-1ch-10S-20bit-extra.wav.

Proposal:

  1. Add a helper (e.g. tests/subprocess_helpers.py) that resolves a test WAV to scipy/io/tests/data/ when present, else tests/test_files/.
  2. Route test_files_dir references in the 6 test files through it.
  3. Delete the duplicated files, keep the 5 unique ones.

Caveats:

  • scipy/io/tests/data/ is a private path, not a stable public API.
  • Files are used as property references (1 kHz, -3.01 dBFS, channel counts), so fixture content must stay stable.
  • The 2 on-the-fly generated tests (int32 scaling in test_common.py, subsecond in test_scripts_invoked.py) need known signal content; verify before switching.

Cleanup only; no behavior change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions