Repository: mir-evaluation/mir_eval
Issue: Debian Package - Disable function /tests with construction errors

Hi!
I would like to inform you that your project will enter the official Debian repositories.

However, I had to disable several test file functions.

If you are interested in investigating them, follow the link:
https://salsa.debian.org/debian/mir-eval/-/blob/debian/master/debian/patches/

 If you fix them in the next version, they will be merged into the debaian package.

thankful!

Nilson Silva

Hi there, thanks for this information. The page you linked only designates which tests were removed (and shows that they were commented out), but doesn't explain why they were removed. We have Travis set up and all tests are currently passing so I'm not sure why any would need to be removed. https://travis-ci.org/craffel/mir_eval

Hey!
excuse me.
Would there be a way to change them, disable them or even remove them? So I wouldn't need to fix your code.

Here are the errors:

ERROR: test_input_output.test_load_tempo
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_input_output.py", line 213, in test_load_tempo
    tempi, weight = mir_eval.io.load_tempo('data/tempo/ref01.lab')
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 557, in load_tempo
    t1, t2, weight = load_delimited(filename, [float, float, float],
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 90, in load_delimited
    with _open(filename, mode='r') as input_file:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 30, in _open
    with open(file_or_str, **kwargs) as file_desc:
FileNotFoundError: [Errno 2] No such file or directory: 'data/tempo/ref01.lab'

======================================================================
ERROR: test_input_output.test_load_tempo_multiline
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python3/dist-packages/nose/tools/nontrivial.py", line 60, in newfunc
    func(*arg, **kw)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_input_output.py", line 221, in test_load_tempo_multiline
    tempi, weight = mir_eval.io.load_tempo('data/tempo/bad00.lab')
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 557, in load_tempo
    t1, t2, weight = load_delimited(filename, [float, float, float],
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 90, in load_delimited
    with _open(filename, mode='r') as input_file:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 30, in _open
    with open(file_or_str, **kwargs) as file_desc:
FileNotFoundError: [Errno 2] No such file or directory: 'data/tempo/bad00.lab'

======================================================================
ERROR: test_input_output.test_load_tempo_badweight
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python3/dist-packages/nose/tools/nontrivial.py", line 60, in newfunc
    func(*arg, **kw)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_input_output.py", line 226, in test_load_tempo_badweight
    tempi, weight = mir_eval.io.load_tempo('data/tempo/bad01.lab')
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 557, in load_tempo
    t1, t2, weight = load_delimited(filename, [float, float, float],
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 90, in load_delimited
    with _open(filename, mode='r') as input_file:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 30, in _open
    with open(file_or_str, **kwargs) as file_desc:
FileNotFoundError: [Errno 2] No such file or directory: 'data/tempo/bad01.lab'

======================================================================
ERROR: test_input_output.test_load_bad_tempi
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_input_output.py", line 233, in test_load_bad_tempi
    tempi, weight = mir_eval.io.load_tempo('data/tempo/bad02.lab')
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 557, in load_tempo
    t1, t2, weight = load_delimited(filename, [float, float, float],
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 90, in load_delimited
    with _open(filename, mode='r') as input_file:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/mir_eval/io.py", line 30, in _open
    with open(file_or_str, **kwargs) as file_desc:
FileNotFoundError: [Errno 2] No such file or directory: 'data/tempo/bad02.lab'

======================================================================
ERROR: test_melody.test_to_cent_voicing
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_melody.py", line 118, in test_to_cent_voicing
    ref_file = sorted(glob.glob(REF_GLOB))[0]
IndexError: list index out of range

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_alignment.py", line 50, in test_alignment_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_beat.py", line 68, in test_beat_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: test_chord.test_mirex(<function mirex at 0x7f07dbc67d00>, 'C:5', 'C:maj')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_mirex(<function mirex at 0x7f07dbc67d00>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_thirds(<function thirds at 0x7f07dbc67910>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_thirds_inv(<function thirds_inv at 0x7f07dbc679a0>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_triads(<function triads at 0x7f07dbc67a30>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_triads_inv(<function triads_inv at 0x7f07dbc67ac0>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_tetrads(<function tetrads at 0x7f07dbc67b50>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_tetrads_inv(<function tetrads_inv at 0x7f07dbc67be0>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin(<function majmin at 0x7f07dbc67d90>, 'C:aug', 'C:maj')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin(<function majmin at 0x7f07dbc67d90>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin_inv(<function majmin_inv at 0x7f07dbc67e20>, 'C:hdim7/b3', 'C:min/b3')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin_inv(<function majmin_inv at 0x7f07dbc67e20>, 'C:maj/4', 'C:maj/4')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin_inv(<function majmin_inv at 0x7f07dbc67e20>, 'C:maj/2', 'C:sus2/2')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_majmin_inv(<function majmin_inv at 0x7f07dbc67e20>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_sevenths(<function sevenths at 0x7f07dbc67eb0>, 'C:sus2', 'C:sus2/2')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_sevenths(<function sevenths at 0x7f07dbc67eb0>, 'C:hdim7', 'C:hdim7')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_sevenths(<function sevenths at 0x7f07dbc67eb0>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_sevenths_inv(<function sevenths_inv at 0x7f07dbc67f40>, 'C:dim7/b3', 'C:dim7/b3')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: test_chord.test_sevenths_inv(<function sevenths_inv at 0x7f07dbc67f40>, 'X', 'N')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 250, in __check_not_comparable
    assert len(w) == 1
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_chord.py", line 546, in test_chord_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_key.py", line 48, in test_key_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_melody.py", line 379, in test_melody_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_melody.py", line 412, in test_melody_functions_continuous_voicing_equivalence
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: test_multipitch.regression_test_evaluate
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_multipitch.py", line 285, in regression_test_evaluate
    assert len(ref_files) == len(est_files) == len(score_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_onset.py", line 60, in test_onset_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_pattern.py", line 57, in test_pattern_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_segment.py", line 141, in test_segment_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

======================================================================
FAIL: Failure: AssertionError ()
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3/dist-packages/nose/loader.py", line 251, in generate
    for test in g():
  File "/pkgs/trabalhando/pkg-librosa/dependencia/pkg-mir_eval/teste/mir-eval/tmp/mir-eval/.pybuild/cpython3_3.10/build/tests/test_separation.py", line 244, in test_separation_functions
    assert len(ref_files) == len(est_files) == len(sco_files) > 0
AssertionError

----------------------------------------------------------------------
Ran 346 tests in 118.599s


>  Would there be a way to change them, disable them or even remove them? So I wouldn't need to fix your code.

No, these are all useful tests that currently pass. All of the errors you have look like they are because the test files can't be found. Did you include the test files in the debian package?

not.
debian does not allow us to make any changes.

When we make a patch, it is only applied at build time.
but the files remain original.

Would you have any solution?

Obter o Outlook para Android<https://aka.ms/AAb9ysg>
________________________________
From: Colin Raffel ***@***.***>
Sent: Thursday, August 4, 2022 12:50:17 PM
To: craffel/mir_eval ***@***.***>
Cc: Nilsonfsilva ***@***.***>; Author ***@***.***>
Subject: Re: [craffel/mir_eval] Debian Package - Disable function /tests with construction errors (Issue #350)


Would there be a way to change them, disable them or even remove them? So I wouldn't need to fix your code.

No, these are all useful tests that currently pass. All of the errors you have look like they are because the test files can't be found. Did you include the test files in the debian package?

—
Reply to this email directly, view it on GitHub<https://github.com/craffel/mir_eval/issues/350#issuecomment-1205438482>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVZIS76EOC4SNXRUFBX42PDVXPRDTANCNFSM55EG32IA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>


If the files are indeed included, the problem appears to be that Debian's test system is not finding them (e.g. `No such file or directory: 'data/tempo/bad00.lab'`). I don't know anything about the test system so I'm not sure why it wouldn't find them at that path. Do you know of any other packages/tests that use test files?

I have sorted out the patch noise. Maybe you want to take another look.

would you like to launch a new tag?

I need it for repackaging.

I'm waiting


Obter o Outlook para Android<https://aka.ms/AAb9ysg>
________________________________
From: bgermann ***@***.***>
Sent: Sunday, October 2, 2022 6:57:15 PM
To: craffel/mir_eval ***@***.***>
Cc: Nilsonfsilva ***@***.***>; Author ***@***.***>
Subject: Re: [craffel/mir_eval] Debian Package - Disable function /tests with construction errors (Issue #350)


I have sorted out the patch noise. Maybe you want to take another look.

—
Reply to this email directly, view it on GitHub<https://github.com/craffel/mir_eval/issues/350#issuecomment-1264741594>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AVZIS745PCWYNFI5RDAOTFLWBIALXANCNFSM55EG32IA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>


👋 I'm going through the issue backlog here, and I think I understand the issue, though it's worth noting that the entire test suite has been ported to pytest in the intervening time (#269).

The problem is that each test module builds up fixtures by globbing file paths that are relative to the `tests/` directory, eg:

https://github.com/mir-evaluation/mir_eval/blob/caa6ff3844892f3f05fc5a63656559996a67949e/tests/test_alignment.py#L15-L22

For this to work, pytest needs to run from within `tests/` and not at the top-level of the repo.  We do this in the CI here:

https://github.com/mir-evaluation/mir_eval/blob/caa6ff3844892f3f05fc5a63656559996a67949e/.github/workflows/test.yml#L77-L80

I think this is incorrect use of pytest on our part.  We're globbing files in the test module as if it's a script instead of a module, so the glob executes at import time rather than execution time.  This means that pytest's `rootdir` configuration option has not yet gone into effect, so the paths don't exist, and trigger the failures reported above.

I think we can fix this by putting these fileglobs into a proper fixture.  If that fixes the issue, then we can just set rootdir for the tests and everything should work cleanly without having to explicitly step into the tests directory.