I am trying to implement unittest in python. I have a list which I need to verify.
Therefore I do
self.assertEqual(self.yt.get_videos(), self.videos)
Error:
AssertionError: Lists differ: [<Video: MPEG-4 Visual (.3gp) ... != ['<Video: MPEG-4 Visual (.3gp)...
First differing element 0:
<Video: MPEG-4 Visual (.3gp) - 144p - Simple>
<Video: MPEG-4 Visual (.3gp) - 144p - Simple>
Output of both.
>>> pprint(yt.get_videos())
[<Video: MPEG-4 Visual (.3gp) - 144p - Simple>,
<Video: MPEG-4 Visual (.3gp) - 240p - Simple>,
<Video: Sorenson H.263 (.flv) - 240p - N/A>,
<Video: H.264 (.mp4) - 360p - Baseline>,
<Video: H.264 (.mp4) - 720p - High>,
<Video: VP8 (.webm) - 360p - N/A>]
Below list I have formed by my own.
>>> pprint(videos)
['<Video: MPEG-4 Visual (.3gp) - 144p - Simple>',
'<Video: MPEG-4 Visual (.3gp) - 240p - Simple>',
'<Video: Sorenson H.263 (.flv) - 240p - N/A>',
'<Video: H.264 (.mp4) - 360p - Baseline>',
'<Video: H.264 (.mp4) - 720p - High>',
'<Video: VP8 (.webm) - 360p - N/A>']
How can I define my list to have elements without quotes.