示例#1
0
    def test_wordForFileList_invalid_lastWordVowel(self):
        word = "minitsu-o"
        fileList = fileListForWord(word)
        expectedMsg = "Last syllable must not be a vowel"

        with self.assertRaises(ValueError) as context:
            correctAnsForFileList(fileList)

        self.assertTrue(expectedMsg in str(context.exception))
示例#2
0
    def test_wordForFileList_invalid_lastWordMinitsu(self):
        word = "ka-ki-minitsu"
        fileList = fileListForWord(word)
        expectedMsg = "Last syllable can't be a Sokuon"

        with self.assertRaises(ValueError) as context:
            correctAnsForFileList(fileList)

        self.assertTrue(expectedMsg in str(context.exception))
	def test_wordForFileList_invalid_lastWordVowel(self):
		word="minitsu-o"
		fileList=fileListForWord(word)
		expectedMsg="Last syllable must not be a vowel"

		with self.assertRaises(ValueError) as context:
			correctAnsForFileList(fileList)

		self.assertTrue( expectedMsg in str(context.exception) )
	def test_wordForFileList_invalid_lastWordMinitsu(self):
		word="ka-ki-minitsu"
		fileList=fileListForWord(word)
		expectedMsg="Last syllable can't be a Sokuon"

		with self.assertRaises(ValueError) as context:
			correctAnsForFileList(fileList)

		self.assertTrue( expectedMsg in str(context.exception) )
示例#5
0
    def test_wordForFileList_valid(self):
        word = "sa-minitsu-ki"
        fileList = fileListForWord(word)

        correctAns = correctAnsForFileList(fileList)
        self.assertEqual(correctAns, "sakki")
	def test_wordForFileList_valid(self):
		word="sa-minitsu-ki"
		fileList=fileListForWord(word)

		correctAns=correctAnsForFileList(fileList)
		self.assertEqual(correctAns, "sakki")