Fix player test fork() on macOS
This commit is contained in:
parent
066a696b5c
commit
119b729c56
2 changed files with 4 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
from helpers.os_environment import isMacOS
|
||||
from queue import Empty
|
||||
import unittest
|
||||
import multiprocessing
|
||||
|
@ -285,4 +286,7 @@ class TestPlayer(unittest.TestCase):
|
|||
|
||||
# runs the unit tests in the module
|
||||
if __name__ == "__main__":
|
||||
# Fixes fork error.
|
||||
if isMacOS():
|
||||
multiprocessing.set_start_method("spawn", True)
|
||||
unittest.main()
|
||||
|
|
|
@ -233,6 +233,5 @@ class WebsocketServer:
|
|||
await asyncio.sleep(0.02)
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Don't do this")
|
||||
|
|
Loading…
Reference in a new issue