Exemplo n.º 1
0
 def test_normal(self):
     moves = MovesFile({'-i': os.path.join(ROOT, 'normal.dat')})
     moves_list = list(moves.parse())
     self.assertEqual(4, len(moves_list))
Exemplo n.º 2
0
 def test_empty_line_missing(self):
     moves = MovesFile({'-i': os.path.join(ROOT, 'empty_line_missing.dat')})
     moves_list = list(moves.parse())
     self.assertEqual(4, len(moves_list))
Exemplo n.º 3
0
 def test_too_many_lines_between(self):
     moves = MovesFile(
         {'-i': os.path.join(ROOT, 'too_many_lines_between.dat')})
     moves_list = list(moves.parse())
     self.assertEqual(4, len(moves_list))
Exemplo n.º 4
0
 def test_file_not_exist(self):
     with self.assertRaises(FileNotFoundError):
         MovesFile({'-i': os.path.join(ROOT, 'idonotexist')})