예제 #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))
예제 #3
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) )
예제 #4
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) )
예제 #5
0
    def test_wordForFileList_valid(self):
        word = "sa-minitsu-ki"
        fileList = fileListForWord(word)

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

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