コード例 #1
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_new_player(self):
     "New player 'Guido' should be added to shelf file"
     observed = high_score.highScore('Guido', 200, fn=self.fn)
     expected = 'Guido: 200'
     self.assertEqual(observed, expected, "Way to go, Guido!")
コード例 #2
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_get_new_high(self):
     "New score for 'BlackKnight' SHOULD replace old score"
     observed = high_score.highScore('BlackKnight', 5, fn=self.fn)
     expected = 'BlackKnight: 5'
     self.assertEqual(observed, expected, "It's just a scratch.")
コード例 #3
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_get_existing_high(self):
     "New score for 'Galahad' should NOT replace old score"
     observed = high_score.highScore('Galahad', 120, fn=self.fn)
     expected = 'Galahad: 150'
     self.assertEqual(observed, expected, "Spank ME!")
コード例 #4
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_get_existing_high(self):
     "New score for 'Galahad' should NOT replace old score"
     observed = high_score.highScore('Galahad', 120, fn=self.fn)
     expected = 'Galahad: 150'
     self.assertEqual(observed, expected, "Spank ME!")
コード例 #5
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_new_player(self):
     "New player 'Guido' should be added to shelf file"
     observed = high_score.highScore('Guido', 200, fn=self.fn)
     expected = 'Guido: 200'
     self.assertEqual(observed, expected, "Way to go, Guido!")
コード例 #6
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_new_player(self):
     "New player 'BlackKnight' should be added to shelf file"
     name, score, expected = self.name_score_exp[2]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "It's just a scratch!")
コード例 #7
0
ファイル: HS_tester-old.py プロジェクト: deepbsd/OST_Python
 def test_get_new_high(self):
     "New score for 'BlackKnight' SHOULD replace old score"
     observed = high_score.highScore('BlackKnight', 5, fn=self.fn)
     expected = 'BlackKnight: 5'
     self.assertEqual(observed, expected, "It's just a scratch.")
コード例 #8
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_get_existing_high(self):
     "New score for 'Bill' should NOT replace old score"
     name, score, expected = self.name_score_exp[1]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "Spank ME!")
コード例 #9
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_get_new_high(self):
     "New score for 'Todd' SHOULD replace old score"
     name, score, expected = self.name_score_exp[0]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "I'm not quite dead yet.")
コード例 #10
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_new_player(self):
     "New player 'BlackKnight' should be added to shelf file"
     name, score, expected = self.name_score_exp[2]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "It's just a scratch!")
コード例 #11
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_get_existing_high(self):
     "New score for 'Bill' should NOT replace old score"
     name, score, expected = self.name_score_exp[1]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "Spank ME!")
コード例 #12
0
ファイル: HS_tester.py プロジェクト: deepbsd/OST_Python
 def test_get_new_high(self):
     "New score for 'Todd' SHOULD replace old score"
     name, score, expected = self.name_score_exp[0]
     observed = high_score.highScore(name, score)
     self.assertEqual(observed, expected, "I'm not quite dead yet.")