diff --git a/tests/test_player.py b/tests/test_player.py index e09d59f..cb8806c 100644 --- a/tests/test_player.py +++ b/tests/test_player.py @@ -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() diff --git a/websocket_server.py b/websocket_server.py index c22d921..dcbd14f 100644 --- a/websocket_server.py +++ b/websocket_server.py @@ -233,6 +233,5 @@ class WebsocketServer: await asyncio.sleep(0.02) - if __name__ == "__main__": print("Don't do this")