Changeset 7fd92ca


Ignore:
Timestamp:
Nov 2, 2018, 10:13:56 PM (14 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/timestretch, master
Children:
2e005cc
Parents:
8607a74
Message:

[tests] use run_module_suite so tests can run when pytest is not installed

Location:
python/tests
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • python/tests/_tools.py

    r8607a74 r7fd92ca  
    2222    skipTest = pytest.skip
    2323    _has_pytest = True
     24    def run_module_suite():
     25        import sys, pytest
     26        pytest.main(sys.argv)
    2427except:
    2528    pass
     
    3235    def skipTest(msg):
    3336        raise SkipTest(msg)
     37    from numpy.testing import run_module_suite
    3438
    3539# always use numpy's assert_equal
  • python/tests/test_mfcc.py

    r8607a74 r7fd92ca  
    107107
    108108if __name__ == '__main__':
    109     import sys, pytest
    110     pytest.main(sys.argv)
     109    from _tools import run_module_suite
     110    run_module_suite()
  • python/tests/test_midi2note.py

    r8607a74 r7fd92ca  
    4141
    4242if __name__ == '__main__':
    43     import sys, pytest
    44     pytest.main(sys.argv)
     43    from _tools import run_module_suite
     44    run_module_suite()
  • python/tests/test_note2midi.py

    r8607a74 r7fd92ca  
    139139
    140140if __name__ == '__main__':
    141     import sys, pytest
    142     pytest.main(sys.argv)
     141    from _tools import run_module_suite
     142    run_module_suite()
  • python/tests/test_sink.py

    r8607a74 r7fd92ca  
    119119
    120120if __name__ == '__main__':
    121     import pytest, sys
    122     pytest.main(sys.argv)
     121    from _tools import run_module_suite
     122    run_module_suite()
  • python/tests/test_source.py

    r8607a74 r7fd92ca  
    188188
    189189if __name__ == '__main__':
    190     import sys, pytest
    191     pytest.main(sys.argv)
     190    from _tools import run_module_suite
     191    run_module_suite()
Note: See TracChangeset for help on using the changeset viewer.