tests package

Submodules

tests.test_character module

voicebank.characterモジュールのテスト

class tests.test_character.CharacterReadTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

character.txt読み込みに関するテスト

test_init()

初期化に関するテスト

test_load_colon(mock_isfile)

":"区切りのcharacter.txtを読み込んだ際のテスト

test_load_equal(mock_isfile)

"="区切りのcharacter.txtを読み込んだ際のテスト

test_load_init_with_load(mock_isfile)

"="区切りのcharacter.txtを読み込んだ際のテスト

test_load_mixture(mock_isfile)

区切り文字が混在したのcharacter.txtを読み込んだ際のテスト

test_load_no_value(mock_isfile)
空のcharacter.txtを読み込んだ際のテスト
名前が存在しないとき、フォルダ名の末尾になる。
test_load_raise_not_found(mock_isfile)
character.txtが存在しなかったときのテスト
test_load_raise_unicode_decode_error(mock_isfile)
character.txtシステムデフォルトでもcp932でも開けなかったとき
test_load_raise_unicode_decode_error_once(mock_isfile)
character.txtシステムデフォルトで開けなかったがcp932で開けたとき
test_save_all()
character.txtのsave。全ての項目が出力されることを確認する。
設定した順番に関わらず、name,image,sample.author,web,versionになることを確認する。
test_save_simple()
character.txtのsave。設定されている項目のみ保存されることを確認する。
nameにdirpathが出力されないことを確認する。

tests.test_entry module

entryおよびentrybaseモジュールのテスト

class tests.test_entry.TestAtAliasEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.AtAliasEntry`の別名です。

class tests.test_entry.TestAtFileNameEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.AtFileNameEntry`の別名です。

class tests.test_entry.TestAtOveEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.AtPreEntry`の別名です。

class tests.test_entry.TestAtPreEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.AtPreEntry`の別名です。

class tests.test_entry.TestAtStpEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.AtPreEntry`の別名です。

class tests.test_entry.TestBoolEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.EntryBase.BoolEntry`の別名です。

test_change_value()
test_init()
test_set_value()
class tests.test_entry.TestDirectEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestBoolEntry

TestClass

:py:class:`projects.Entry.DirectEntry`の別名です。

class tests.test_entry.TestEntryBase(methodName='runTest')

ベースクラス: unittest.case.TestCase

TestClass

:py:class:`projects.EntryBase.EntryBase`の別名です。

test_has_data()
test_set_update()
class tests.test_entry.TestEnvelopeEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.Entry.EnvelopeEntry`の別名です。

test_change_p()
test_change_p_bad_pos()
test_change_p_bad_value()
test_change_v()
test_change_v_bad_pos()
test_change_v_bad_value()
test_change_value_add_point()
test_change_value_minus_point()
test_change_value_same_point()
test_init_11()
test_init_7()
test_init_9()
test_init_bad_value()
class tests.test_entry.TestFlagsEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.FlagsEntry`の別名です。

class tests.test_entry.TestFloatEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.EntryBase.FloatEntry`の別名です。

point = 3
test_change_value()
test_init()
test_init_bad_value()
test_set_bad_value()
test_set_value()
class tests.test_entry.TestIntEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.EntryBase.IntEntry`の別名です。

test_change_value()
test_init()
test_init_bad_value()
test_set_bad_value()
test_set_value()
class tests.test_entry.TestIntensityEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestIntEntry

TestClass

:py:class:`projects.Entry.IntensityEntry`の別名です。

class tests.test_entry.TestLabelEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.LabelEntry`の別名です。

class tests.test_entry.TestLengthEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestIntEntry

TestClass

:py:class:`projects.Entry.LengthEntry`の別名です。

class tests.test_entry.TestListEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.EntryBase.ListEntry`の別名です。

add_value = '4'
append_result = '1,2,3,4'
append_result_list = ['1', '2', '3', '4']
base_str = '1,2,3'
baselist = ['1', '2', '3']
change_str = '4,5,6'
changelist = ['4', '5', '6']
insert_result = '1,2,4,3'
insert_result_list = ['1', '2', '4', '3']
pop_result = '1,3'
pop_result_list = ['1', '3']
set_result = '1,2,4'
set_result_list = ['1', '2', '4']
test_append()
test_change()
test_init()
test_init_from_str()
test_insert()
test_pop()
test_set()
test_setvalues()
class tests.test_entry.TestLyricEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.LyricEntry`の別名です。

class tests.test_entry.TestModulationEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestIntEntry

TestClass

:py:class:`projects.Entry.ModulationEntry`の別名です。

class tests.test_entry.TestNoteNumEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestIntEntry

TestClass

:py:class:`projects.Entry.NoteNumEntry`の別名です。

test_set_tone_name()
class tests.test_entry.TestNumberEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.NumberEntry`の別名です。

class tests.test_entry.TestOveEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.PreEntry`の別名です。

class tests.test_entry.TestPBMEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestListEntry

TestClass

:py:class:`projects.Entry.PBMEntry`の別名です。

add_value = 'j'
append_result = ',s,r,j'
append_result_list = ['', 's', 'r', 'j']
base_str = ',s,r'
baselist = ['', 's', 'r']
change_str = 'j,r,s'
changelist = ['j', 'r', 's']
insert_result = ',s,j,r'
insert_result_list = ['', 's', 'j', 'r']
pop_result = ',r'
pop_result_list = ['', 'r']
set_result = ',s,j'
set_result_list = ['', 's', 'j']
test_append_bad()
test_bad_init()
test_bad_init_from_str()
test_insert_bad()
test_set_bad()
class tests.test_entry.TestPBSEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.Entry.PBSEntry`の別名です。

test_change()
test_change_bad_height()
test_change_bad_single()
test_change_bad_time()
test_change_comma()
test_change_height()
test_change_height_bad()
test_change_time()
test_change_time_bad()
test_change_to_single()
test_init()
test_init_bad_height()
test_init_bad_single()
test_init_bad_time()
test_init_comma()
test_init_single()
class tests.test_entry.TestPBStartEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.PBStartEntry`の別名です。

class tests.test_entry.TestPBWEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestListEntry

TestClass

:py:class:`projects.Entry.PBWEntry`の別名です。

add_value = 4.1
append_result = '1.1,2.1,3.1,4.1'
append_result_list = [1.1, 2.1, 3.1, 4.1]
base_str = '1.1,2.1,3.1'
baselist = [1.1, 2.1, 3.1]
change_str = '4.1,5.1,6.1'
changelist = [4.1, 5.1, 6.1]
insert_result = '1.1,2.1,4.1,3.1'
insert_result_list = [1.1, 2.1, 4.1, 3.1]
pop_result = '1.1,3.1'
pop_result_list = [1.1, 3.1]
set_result = '1.1,2.1,4.1'
set_result_list = [1.1, 2.1, 4.1]
test_append_bad()
test_bad_init()
test_bad_init_from_str()
test_insert_bad()
test_set_bad()
class tests.test_entry.TestPBYEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestListEntry

TestClass

:py:class:`projects.Entry.PBYEntry`の別名です。

add_value = 4.1
append_result = '1.1,2.1,3.1,4.1'
append_result_list = [1.1, 2.1, 3.1, 4.1]
base_str = '1.1,2.1,3.1'
baselist = [1.1, 2.1, 3.1]
change_str = '4.1,5.1,6.1'
changelist = [4.1, 5.1, 6.1]
insert_result = '1.1,2.1,4.1,3.1'
insert_result_list = [1.1, 2.1, 4.1, 3.1]
pop_result = '1.1,3.1'
pop_result_list = [1.1, 3.1]
set_result = '1.1,2.1,4.1'
set_result_list = [1.1, 2.1, 4.1]
test_append_bad()
test_bad_init()
test_bad_init_from_str()
test_insert_bad()
test_set_bad()
class tests.test_entry.TestPitchesEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestListEntry

TestClass

:py:class:`projects.Entry.PitchesEntry`の別名です。

add_value = 4
append_result = '1,2,3,4'
append_result_list = [1, 2, 3, 4]
base_str = '1,2,3'
baselist = [1, 2, 3]
change_str = '4,5,6'
changelist = [4, 5, 6]
insert_result = '1,2,4,3'
insert_result_list = [1, 2, 4, 3]
pop_result = '1,3'
pop_result_list = [1, 3]
set_result = '1,2,4'
set_result_list = [1, 2, 4]
test_append_bad()
test_bad_init()
test_bad_init_from_str()
test_insert_bad()
test_set_bad()
class tests.test_entry.TestPreEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.PreEntry`の別名です。

class tests.test_entry.TestRegionEndEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.RegionEndEntry`の別名です。

class tests.test_entry.TestRegionEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestStringEntry

TestClass

:py:class:`projects.Entry.RegionEntry`の別名です。

class tests.test_entry.TestStpEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.PreEntry`の別名です。

class tests.test_entry.TestStringEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.EntryBase.StringEntry`の別名です。

test_change_value()
test_init()
test_set_value()
class tests.test_entry.TestTempoEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestFloatEntry

TestClass

:py:class:`projects.Entry.TempoEntry`の別名です。

point = 2
class tests.test_entry.TestVelocityEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestIntEntry

TestClass

:py:class:`projects.Entry.VelocityEntry`の別名です。

test_rate()
class tests.test_entry.TestVibratoEntry(methodName='runTest')

ベースクラス: tests.test_entry.TestEntryBase

TestClass

:py:class:`projects.Entry.VibratoEntry`の別名です。

test_change()
test_init()
test_init_bad()

valueのset時に、各プロパティのsetを呼び出しているため、個別のテスト省略

test_set()

tests.test_note module

projects.Noteモジュールのテスト

class tests.test_note.TestNote(methodName='runTest')

ベースクラス: unittest.case.TestCase

test_init()
test_msLength()
test_msLength_notInitial()
class tests.test_note.TestNoteWithOto(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_apply_oto()
test_apply_oto_not_initialize()
test_apply_oto_to_ove_alias()
test_apply_oto_to_ove_alias_notfound()
test_apply_oto_to_ove_hasvalue()
test_apply_oto_to_pre_alias()
test_apply_oto_to_pre_alias_notfound()
test_apply_oto_to_pre_hasvalue()
test_autofit_prev_is_long()
test_autofit_prev_is_none()
test_autofit_prev_is_not_initial()
test_autofit_prev_is_rest()
test_autofit_prev_is_short()
test_autofit_prev_with_velocity()
test_autofit_prev_with_velocity2()
test_init_alias_notfound()
test_init_alias_with_atalias()
test_init_alias_with_prefixmap()
test_init_alias_with_prefixmap_halfmatch()
test_init_alias_without_prefixmap()

tests.test_note2render module

class tests.test_note2render.TestConvertPitch(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_RunLength()
test_base64()
test_base_single_no_pbs()
test_base_with_next()
test_base_with_next_no_pbs()
test_base_with_prev()
test_base_with_prev_and_rest()
test_base_with_prev_no_pbs()
test_base_with_prev_over()
test_base_with_prev_over_no_pbs()
test_base_with_prev_over_with_prev_pbs()
test_base_with_prev_over_with_prev_pbs_over()
test_base_with_prev_pbs_positive()
test_base_with_prev_stp()
test_interp_base_minimum_single_note()
test_interp_base_minimum_with_prev()
test_interp_base_single_note()
test_interp_default()
test_interp_default_n()
test_interp_j()
test_interp_param()
test_interp_r()
test_interp_s()
test_interp_unit()
test_vibrato_fade50()
test_vibrato_fade50_height()
test_vibrato_fade_fadein()
test_vibrato_fade_fadein_and_out()
test_vibrato_fade_fadeout()
test_vibrato_fade_no_fade()
test_vibrato_no_fade()
test_vibrato_no_fade_cycle()
test_vibrato_no_fade_depth()
test_vibrato_no_fade_height()
test_vibrato_no_fade_height_negative()
test_vibrato_no_fade_length()
test_vibrato_no_fade_phase100()
test_vibrato_no_fade_phase25()
test_vibrato_no_fade_phase50()
test_vibrato_no_fade_phase75()
vb_load(dirpath, is_vb)

tests.test_oto module

voicebanks.otoモジュールのテスト

class tests.test_oto.OtoRecordTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

otoの各行の値に関するテスト

test_init()

初期化に関するテスト

test_init_alias_is_blank()

初期化時エイリアスが""の場合

test_invert_file_not_found_error(mock_isfile)

invert_blank時wavファイルが見つからない場合

test_invert_wave(mock_isfile)

invert_blank成功。元のblankが負の場合

test_invert_wave_error(mock_isfile)

invert_blank時指定したファイルがwavファイル出なかった場合

test_invert_wave_positive(mock_isfile)

invert_blank成功。元のblankが正の場合

class tests.test_oto.OtoTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

oto.iniの読み書きに関するテスト

test_init()
引数無しでoto.iniを初期化する場合
test_init_with_load_single(mock_isfile, mock_listdir)
test_loadFile()

oto.iniが正常に開けたとき

test_load_file_unicode_decode_error()

oto.iniがutf-8でもcp932でも開けなかったとき

test_load_file_unicode_decode_error_once()

oto.iniがcp932で開けなかったがutf-8で開けたとき

test_load_nest(mock_isfile, mock_listdir, mock_isdir)
test_load_nest_recursive(mock_isfile, mock_listdir, mock_isdir)
test_load_nest_recursive_without_root_oto(mock_isfile, mock_listdir, mock_isdir)
test_load_nest_without_root_oto(mock_isfile, mock_listdir, mock_isdir)
test_load_single(mock_isfile, mock_listdir)
test_setValue()

_setValueに関するテスト

tests.test_prefixmap module

voicebank.prefixmapモジュールのテスト

class tests.test_prefixmap.MapRecordTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

PrefixMapの各行の値に関するテスト

test_init()

正常に初期化できる場合のテスト

test_init_bad_format()

不正な値で初期化しようとした際のテスト

class tests.test_prefixmap.PrefixMapTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

prefix.mapの読み書きに関するテスト

test_default_init()
引数無しでprefix.mapを初期化する場合。
同一のrecordに音高番号と音高名どちらでもアクセスできることを確認する。
test_load(mock_isfile)

prefix.mapが開けたとき

test_load_raise_file_not_found_error(mock_isfile)

prefix.mapが存在しなかったときのテスト

test_load_raise_file_not_found_error_with_set_path(mock_isfile)

標準以外のファイル名を指定したとき

test_load_raise_unicode_decode_error(mock_isfile)

prefix.mapがutf-8でもcp932でも開けなかったとき

test_load_raise_unicode_decode_error_once(mock_isfile)

prefix.mapがcp932で開けなかったがutf-8で開けたとき

test_save(mock_isfile)
prefix.mapの保存を確認する。
値がない項目はprefixとsuffixが空欄で保存されることを確認する。

tests.test_settings module

settingsモジュールのうち、環境に応じて自動で値が代入されるもののテスト

class tests.test_settings.WinUtauSettingsTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

windowsの環境変数やUTAUの導入状況に応じて値の替わるsettingsのテスト

test_get_utau_root_installed_other_programfiles(mock_platform, mock_isInstalled, mock_enumkey)

settings.win_utau.get_utau_rootはwindows環境でUTAUがインストールされていればそのルートフォルダ

test_get_utau_root_installed_programfiles(mock_platform, mock_isInstalled, mock_enumkey)

settings.win_utau.get_utau_rootはwindows環境でUTAUがインストールされていればそのルートフォルダ

test_get_utau_root_not_installed(mock_platform, mock_isInstalled)

settings.win_utau.get_utau_rootはwindows環境でUTAUがインストールされていなければ""

test_get_utau_root_not_windows(mock_platform)

settings.win_utau.get_utau_rootは非windows環境で""

test_get_utau_settings_not_path(mock_utauroot)

settings.win_utau.get_utau_settingsは引数がなく、UTAUのパスが見つからなければ{}

test_get_utau_settings_not_program_files(mock_utauroot)

settings.win_utau.get_utau_settingsは引数がなく、UTAUのパスが見つかれば同じフォルダのsettings.iniを読み込む

test_get_utau_settings_program_files(mock_utauroot, mock_isfile)
settings.win_utau.get_utau_settingsは引数がなく、UTAUのパスがprogram files(x86)にある場合かつ、
%localappdata%\VirtualStore\program files(x86)のsettings.iniがなければ、UTAUROOTのsetting.iniを読み込む
test_get_utau_settings_program_files_with_virtualstore(mock_utauroot, mock_isfile)
settings.win_utau.get_utau_settingsは引数がなく、UTAUのパスがprogram files(x86)にある場合、
%localappdata%\VirtualStore\program files(x86)のsettings.iniを読み込む
test_get_utau_settings_with_args(mock_utauroot, mock_isfile)
settings.win_utau.get_utau_settingsは引数があれば引数のフォルダにあるsetting.iniを読み込む
test_is_utau_installed_not_windows(mock_platform)

settings.win_utau.is_utau_installedは非windows環境でFalse

test_is_utau_installed_windows_installed(mock_platform, mock_QueryInfoKey, mock_enumkey)

settings.win_utau.is_utau_installedはwindows環境ではHKEY_CLASSES_ROOT\UTAUSequenceTextが存在すればTrue

test_is_utau_installed_windows_no_installed(mock_platform, mock_QueryInfoKey, mock_enumkey)

settings.win_utau.is_utau_installedはwindows環境ではHKEY_CLASSES_ROOT\UTAUSequenceTextが存在しなければFalse

tests.test_ust module

projects.Ustモジュールのテスト
本家UTAUの文字コードまわりが複雑で、1ファイル内に複数のエンコードを持ったファイルを読み込むなど
特殊なテストが必要なため、test用ファイルを生成し、読み込む方法でテストを行う。
class tests.test_ust.TestLoadAll(methodName='runTest')

ベースクラス: unittest.case.TestCase

test_write(mock_isfile)
class tests.test_ust.TestLoadHeader(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_no_header()
test_no_setting()
test_no_version()
test_simple()
test_simple_start_delete()
test_simple_start_insert()
test_simple_start_prev()
class tests.test_ust.TestLoadNote(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

test_3notes()
test_fully_error_note()

エラーが出ることと、処理が止まらないことを確認する。

test_fully_note()
test_minimum_note()
class tests.test_ust.TestUstInputEncoding(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_init()
test_load_cp932_injapan_utf8()
test_load_cp932_injapan_win()
test_load_cp932_inother_locale()
test_load_cp932_otherlocale_injapan_utf8()
test_load_cp932_otherlocale_injapan_win()
test_load_cp932_otherlocale_inother_locale()
test_load_cp932_utf8_injapan_utf8()
test_load_cp932_utf8_injapan_win()
test_load_cp932_utf8_inother_locale()
test_load_not_found_file()
test_load_otherlocale_cp932_injapan_utf8()
test_load_otherlocale_cp932_injapan_win()
test_load_otherlocale_cp932_inother_locale()
test_load_otherlocale_utf8_injapan_utf8()
test_load_otherlocale_utf8_injapan_win()
test_load_otherlocale_utf8_inother_locale()
test_load_utf8_cp932_injapan_utf8()
test_load_utf8_cp932_injapan_win()
test_load_utf8_cp932_inother_locale()
test_load_utf8_utf8_injapan_utf8()
test_load_utf8_utf8_injapan_win()
test_load_utf8_utf8_inother_locale()
class tests.test_ust.TestWrite(methodName='runTest')

ベースクラス: unittest.case.TestCase

test_write(mock_isfile)

tests.test_utauplugin module

projects.UtauPluginモジュールのテスト
主要な機能はUstモジュールの継承のため、差分のみテストする。
class tests.test_utauplugin.TestWrite(methodName='runTest')

ベースクラス: unittest.case.TestCase

setUp(mock_isfile)

Hook method for setting up the test fixture before exercising it.

test_write_change_all()
test_write_change_all_and_delete()
test_write_change_direct()
test_write_change_envelope()
test_write_change_flags()
test_write_change_intensity()
test_write_change_label()
test_write_change_length()
test_write_change_lyric()
test_write_change_modulation()
test_write_change_notenum()
test_write_change_ove()
test_write_change_pbm()
test_write_change_pbs()
test_write_change_pbstart()
test_write_change_pbw()
test_write_change_pby()
test_write_change_pitches()
test_write_change_pre()
test_write_change_region()
test_write_change_region_end()
test_write_change_stp()
test_write_change_tempo()
test_write_change_velocity()
test_write_change_vibrato()
test_write_nochange()

tests.test_voicebank module

voicebankモジュールのテスト

class tests.test_voicebank.VoiceBankInitTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

test_dirpath_is_not_utau(mock_is_utau)

指定したフォルダがUTAU音源ではないとき

test_loadfile_found_character_txt(mock_is_utau, mock_listdir, mock_isfile)

指定したフォルダがUTAU音源で、character.txtのみ見つかったとき

test_loadfile_found_oto_ini(mock_is_utau, mock_listdir, mock_isfile)

指定したフォルダがUTAU音源で、oto.iniのみ見つかったとき

test_loadfile_found_prefix_map(mock_is_utau, mock_listdir, mock_isfile)

指定したフォルダがUTAU音源で、prefix.mapのみ見つかったとき

test_loadfile_is_not_found(mock_is_utau, mock_listdir)

指定したフォルダがUTAU音源で、character.txt,oto.ini,prefix.mapが見つからないとき

class tests.test_voicebank.VoiceBankStaticTest(methodName='runTest')

ベースクラス: unittest.case.TestCase

staticmethodのテスト

test_is_utau_voicebank_in_charactertxt(mock_isdir, mock_listdir)

dirpathが存在し、直下にcharacter.txtがある場合True

test_is_utau_voicebank_in_otoini(mock_isdir, mock_listdir)

dirpathが存在し、直下にoto.iniがある場合True

test_is_utau_voicebank_in_wav(mock_isdir, mock_listdir)

dirpathが存在し、直下にwavファイルがある場合True

test_is_utau_voicebank_is_false(mock_isdir, mock_listdir)

dirpathが存在し、直下にcharacter.txt,oto.ini,wavファイルのいずれもが存在しない場合

test_is_utau_voicebank_is_not_found(mock_isdir, mock_listdir)

dirpathがディレクトリでない場合、FileNotFoundErrorを返す

Module contents