From d4fae3481377389b5bc2368f8c74fb8d14cf1c52 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 1 Nov 2018 23:55:25 +0100 Subject: [PATCH] [tests] remove __init__.py, use absolute imports --- python/tests/__init__.py | 1 - python/tests/test_filter.py | 2 +- python/tests/test_filterbank.py | 2 +- python/tests/test_mfcc.py | 2 +- python/tests/test_midi2note.py | 2 +- python/tests/test_note2midi.py | 2 +- python/tests/test_notes.py | 2 +- python/tests/test_phasevoc.py | 2 +- python/tests/test_slicing.py | 4 ++-- 9 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 python/tests/__init__.py diff --git a/python/tests/__init__.py b/python/tests/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/tests/test_filter.py b/python/tests/test_filter.py index fc222ccb..af588dcb 100755 --- a/python/tests/test_filter.py +++ b/python/tests/test_filter.py @@ -2,7 +2,7 @@ from numpy.testing import TestCase, assert_equal, assert_almost_equal from aubio import fvec, digital_filter -from .utils import array_from_text_file +from utils import array_from_text_file class aubio_filter_test_case(TestCase): diff --git a/python/tests/test_filterbank.py b/python/tests/test_filterbank.py index 5cf28a25..67a8558c 100755 --- a/python/tests/test_filterbank.py +++ b/python/tests/test_filterbank.py @@ -4,7 +4,7 @@ import numpy as np from numpy.testing import TestCase, assert_equal, assert_almost_equal from aubio import cvec, filterbank, float_type -from .utils import array_from_text_file +from utils import array_from_text_file class aubio_filterbank_test_case(TestCase): diff --git a/python/tests/test_mfcc.py b/python/tests/test_mfcc.py index c88d2fef..28972b94 100755 --- a/python/tests/test_mfcc.py +++ b/python/tests/test_mfcc.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -from ._tools import parametrize, assert_raises +from _tools import parametrize, assert_raises from numpy import random, count_nonzero from numpy.testing import TestCase from aubio import mfcc, cvec, float_type diff --git a/python/tests/test_midi2note.py b/python/tests/test_midi2note.py index d9c6b86f..a81f5027 100755 --- a/python/tests/test_midi2note.py +++ b/python/tests/test_midi2note.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from aubio import midi2note -from ._tools import parametrize, assert_raises +from _tools import parametrize, assert_raises list_of_known_midis = ( ( 0, 'C-1' ), diff --git a/python/tests/test_note2midi.py b/python/tests/test_note2midi.py index 60f5b539..e6a74f64 100755 --- a/python/tests/test_note2midi.py +++ b/python/tests/test_note2midi.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals from aubio import note2midi, freq2note, note2freq, float_type from numpy.testing import TestCase -from ._tools import parametrize, assert_raises +from _tools import parametrize, assert_raises list_of_known_notes = ( ( 'C-1', 0 ), diff --git a/python/tests/test_notes.py b/python/tests/test_notes.py index 87612cb4..a95d0101 100755 --- a/python/tests/test_notes.py +++ b/python/tests/test_notes.py @@ -3,7 +3,7 @@ from numpy.testing import TestCase, assert_equal, assert_almost_equal from aubio import notes, source import numpy as np -from .utils import list_all_sounds +from utils import list_all_sounds list_of_sounds = list_all_sounds('sounds') diff --git a/python/tests/test_phasevoc.py b/python/tests/test_phasevoc.py index 73784d0e..a38c3c86 100755 --- a/python/tests/test_phasevoc.py +++ b/python/tests/test_phasevoc.py @@ -1,7 +1,7 @@ #! /usr/bin/env python from numpy.testing import TestCase, assert_equal, assert_array_less -from ._tools import parametrize +from _tools import parametrize from aubio import fvec, cvec, pvoc, float_type import numpy as np diff --git a/python/tests/test_slicing.py b/python/tests/test_slicing.py index 2ad84f43..18391e9e 100755 --- a/python/tests/test_slicing.py +++ b/python/tests/test_slicing.py @@ -2,8 +2,8 @@ from numpy.testing import TestCase, assert_equal from aubio import slice_source_at_stamps -from .utils import count_files_in_directory, get_default_test_sound -from .utils import count_samples_in_directory, count_samples_in_file +from utils import count_files_in_directory, get_default_test_sound +from utils import count_samples_in_directory, count_samples_in_file import tempfile import shutil -- 2.11.0