Skip to content

Commit

Permalink
fix : error_test.py updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Aug 17, 2024
1 parent fe4ef1f commit c8ee4d8
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions test/error_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
>>> import os
>>> import sys
>>> from nava import play, stop
>>> from nava import play, stop, Engine
>>> test_sound_path = os.path.join("others", "test.wav")
>>> play("test.wav")
Traceback (most recent call last):
Expand All @@ -26,20 +26,11 @@
nava.errors.NavaBaseError: `engine` type must be `Engine` enum.
>>> sys_platform = sys.platform
>>> if sys_platform == "win32":
... sound_id = nava.play(test_sound_path, async_mode=False, engine=nava.Engine.AFPLAY)
... sound_id = play(test_sound_path, async_mode=False, engine=Engine.AFPLAY)
... elif sys_platform == "darwin":
... sound_id = nava.play(test_sound_path, async_mode=False, engine=nava.Engine.WINSOUND)
... sound_id = play(test_sound_path, async_mode=False, engine=Engine.WINSOUND)
... else:
... sound_id = nava.play(test_sound_path, async_mode=False, engine=nava.Engine.WINSOUND)
Traceback (most recent call last):
...
nava.errors.NavaBaseError: Sound can not play due to some issues.
>>> if sys_platform == "win32":
... sound_id = nava.play(test_sound_path, async_mode=True, engine=nava.Engine.AFPLAY)
... elif sys_platform == "darwin":
... sound_id = nava.play(test_sound_path, async_mode=True, engine=nava.Engine.WINSOUND)
... else:
... sound_id = nava.play(test_sound_path, async_mode=True, engine=nava.Engine.WINSOUND)
... sound_id = play(test_sound_path, async_mode=False, engine=Engine.WINSOUND)
Traceback (most recent call last):
...
nava.errors.NavaBaseError: Sound can not play due to some issues.
Expand Down

0 comments on commit c8ee4d8

Please sign in to comment.