コード例 #1
0
 def test_parse_movies_2(self):
     reader = StringIO(
         "5:\n1000\n999\n\n299\n\n10:\n7\n52\n25:\n20\n10000\n250\n")
     parse_list = parse_movies(reader)
     self.assertEqual(parse_list,
                      [['5:', '1000', '999', '299'], ['10:', '7', '52'],
                       ['25:', '20', '10000', '250']])
コード例 #2
0
 def test_parse_movies_3(self):
     s = StringIO("e:\n 8912\n 34\n 5:\n67\nd\n32\n")
     movie_list = parse_movies(s)
     expected = {'5': ['67', '32']}
     self.assertEqual(movie_list, expected)
コード例 #3
0
 def test_parse_movies_2(self):
     s = StringIO("3:\n  55\n 1234\n222\n 4:\n555\n666\n777\n ")
     movie_list = parse_movies(s)
     expected = {'3': ['55', '1234', '222'], '4': ['555', '666', '777']}
     self.assertEqual(movie_list, expected)
コード例 #4
0
 def test_parse_movies_1(self):
     s = StringIO("1:\n532\n68934\n32\n2:\n48\n2\n")
     movie_list = parse_movies(s)
     expected = {'1': ['532', '68934', '32'], '2': ['48', '2']}
     self.assertEqual(movie_list, expected)
コード例 #5
0
 def test_parse_movie_3(self):
     reader = StringIO("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n")
     parse_list = parse_movies(reader)
     self.assertEqual(parse_list, [])
コード例 #6
0
 def test_parse_movies_1(self):
     reader = StringIO("1:\n100\n200\n300\n2:\n500\n600\n")
     parse_list = parse_movies(reader)
     self.assertEqual(
         parse_list, [['1:', '100', '200', '300'], ['2:', '500', '600']])