예제 #1
0
파일: tests.py 프로젝트: bcbrown/CodeTyper
    def test_too_many_lines(self):
        master = []
        master.append('felicitous formalisms frolic')
        master.append('derelict dirigibles drifting')
        master.append('artifactant')
		# the error is 12 because the missing '\n' is counted
        self.assertEqual(typer.evaluate_submission(master[:2], master), 12)
예제 #2
0
파일: tests.py 프로젝트: bcbrown/CodeTyper
    def test_too_few_lines(self):
        master = []
        master.append("formal mornings of languid lounging")
        master.append("dissolute soldiers decry indecency")
        master.append("sesquipedalian")
		# the error is 15 because the missing '\n' is counted
        self.assertEqual(typer.evaluate_submission(master, master[:2]), 15)
예제 #3
0
파일: tests.py 프로젝트: bcbrown/CodeTyper
 def test_multi_line_errors(self):
     master = []
     master.append('against everything with intent')
     master.append('Hungarian lunches for everyone')
     master.append('a stubborn savage certainty')
     submission = []
     submission.append('against everythig with inten')# 2 typoes
     submission.append('huhngarin lunche for Everyon')# 6 typoes
     submission.append('a stubborn savage certaintyy')# 1 typo
     self.assertEqual(typer.evaluate_submission(master, submission), 9)
예제 #4
0
파일: tests.py 프로젝트: bcbrown/CodeTyper
 def test_correct_lines(self):
     master = []
     master.append('uncontrollable appendages abound')
     master.append('journalistic intensity')
     self.assertEqual(typer.evaluate_submission(master, master), 0)