Skip to content

Fix broken tests by including required assets in package_data#532

Closed
carlthome wants to merge 2 commits intoCPJKU:mainfrom
carlthome:log-subprocess
Closed

Fix broken tests by including required assets in package_data#532
carlthome wants to merge 2 commits intoCPJKU:mainfrom
carlthome:log-subprocess

Conversation

@carlthome
Copy link
Contributor

Working on packaging madmom in nixpkgs (WIP here) and noticed that specific tests failed when testing the installed (non-editable) package by:

MCVE

git clone https://github.com/CPJKU/madmom.git
cd madmom

git submodule init
git submodule update

python -m venv .venv
source .venv/bin/activate

pip install .
pip install pytest

rm -r madmom

pytest

Output

====================================================== short test summary info ======================================================
FAILED tests/test_bin.py::TestTCNBeatTrackerProgram::test_binary - IndexError: list index out of range
FAILED tests/test_bin.py::TestTCNBeatTrackerProgram::test_run - IndexError: list index out of range
FAILED tests/test_bin.py::TestTCNTempoDetectorProgram::test_binary - IndexError: list index out of range
FAILED tests/test_bin.py::TestTCNTempoDetectorProgram::test_run - IndexError: list index out of range
FAILED tests/test_features_beats.py::TestTCNBeatProcessorClass::test_process_tcn - IndexError: list index out of range
====================================== 5 failed, 806 passed, 188 warnings in 60.53s (0:01:00) =======================================

Turns out these tests depend on static assets (2019 models) that are currently not included in package_data. This PR fixes that such that the installed package passes its tests.

@carlthome
Copy link
Contributor Author

Already fixed in #531 - closing!

@carlthome carlthome closed this Nov 28, 2023
@carlthome carlthome deleted the log-subprocess branch November 28, 2023 23:17
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.

1 participant