generated from Coding-Cuddles/bootstrap-python-kata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_media_player.py
30 lines (23 loc) · 930 Bytes
/
test_media_player.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import pytest
from media_player import AudioPlayer, VideoPlayer, ImagePlayer
def test_audio_player():
audio_player = AudioPlayer()
audio_player.play_audio() # No exception should be raised
with pytest.raises(NotImplementedError):
audio_player.display_video()
with pytest.raises(NotImplementedError):
audio_player.view_image()
def test_video_player():
video_player = VideoPlayer()
video_player.display_video() # No exception should be raised
with pytest.raises(NotImplementedError):
video_player.play_audio()
with pytest.raises(NotImplementedError):
video_player.view_image()
def test_image_player():
image_player = ImagePlayer()
image_player.view_image() # No exception should be raised
with pytest.raises(NotImplementedError):
image_player.play_audio()
with pytest.raises(NotImplementedError):
image_player.display_video()