def test_not_string_dir_path(self):
     """
     Test int instead of dir path
     """
     path = 123
     if os.listdir in os.supports_fd:
         with self.assertRaises(OSError):
             result = _find_non_empty_wav_files("speech_test", path)
     else:
         with self.assertRaises(TypeError):
             result = _find_non_empty_wav_files("speech_test", path)
 def test_not_existing_dir(self):
     """
     Test not existing dir
     """
     path = "tests/unit/test_files/some_dir"
     with self.assertRaises(FileNotFoundError):
         result = _find_non_empty_wav_files("speech_test", path)
 def test_no_name_match_case(self):
     """
     Test name pattern that matches no files
     """
     path = "tests/unit/test_files"
     result = _find_non_empty_wav_files("other_name", path)
     self.assertEqual(result, [])
 def test_files_too_short_case(self):
     """
     Test name pattern that matches only files that are too short
     """
     path = "tests/unit/test_files"
     result = _find_non_empty_wav_files("small_file", path)
     self.assertEqual(result, [])
 def test_normal_case(self):
     """
     Test normal case
     """
     path = "tests/unit/test_files"
     result = _find_non_empty_wav_files("speech_test", path)
     self.assertEqual(result, ["speech_test.wav"])
 def test_empty_dir(self):
     """
     Test empty dir
     """
     path = "tests/unit/test_files/temp_dir"
     os.mkdir(path)
     result = _find_non_empty_wav_files("speech_test", path)
     self.assertEqual(result, [])
     os.rmdir(path)
 def test_no_filename(self):
     """
     Test not passing filename pattern to func
     """
     with self.assertRaises(TypeError):
         result = _find_non_empty_wav_files()