Skip to content

Commit

Permalink
fix : tests updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Feb 10, 2024
1 parent 113c3ba commit 85705df
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions test/function_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@
"""
>>> import os
>>> import time
>>> from nava import play, stop, stop_all
>>> play(os.path.join("others", "test.wav"))
>>> sound_id_1 = play(os.path.join("others", "test.wav"), async_mode=True)
>>> import nava
>>> nava.play(os.path.join("others", "test.wav"))
>>> sound_id_1 = nava.play(os.path.join("others", "test.wav"), async_mode=True)
>>> sound_id_1 == 1001
True
>>> sound_id_2 = play(os.path.join("others", "test.wav"), async_mode=True)
>>> sound_id_2 = nava.play(os.path.join("others", "test.wav"), async_mode=True)
>>> sound_id_2 == 1002
True
>>> sound_id_3 = play(os.path.join("others", "test.wav"), async_mode=True)
>>> sound_id_3 = nava.play(os.path.join("others", "test.wav"), async_mode=True)
>>> sound_id_3 == 1003
True
>>> stop(1001)
>>> stop_all()
>>> nava.stop(sound_id_1)
>>> for i in range(40):
... sound_id = play(os.path.join("others", "test.wav"), async_mode=True)
... time.sleep(0.5)
... stop(sound_id)
... time.sleep(0.2)
>>> nava.stop_all()
>>> len(nava._play_threads_map) == 43
True
>>> nava._play_threads_counter == 43
True
>>> from nava.functions import nava_help
>>> nava_help()
<BLANKLINE>
Expand Down

0 comments on commit 85705df

Please sign in to comment.