Add more local sourced directories for scripts and sounds meaning each user can have own scripts and sound themes when using -x. Hopefully fixed the remainder of the random freeze bug.

This commit is contained in:
Storm Dragon
2026-05-12 17:23:50 -04:00
parent 4022fc4006
commit b599a25945
15 changed files with 516 additions and 879 deletions
+33
View File
@@ -0,0 +1,33 @@
from unittest.mock import Mock
import pytest
from fenrirscreenreader.commands.commands import subprocess as subprocess_command
@pytest.mark.unit
def test_script_command_executes_without_shell(monkeypatch):
process = Mock()
process.communicate.return_value = (b"done", b"")
popen = Mock(return_value=process)
monkeypatch.setattr(subprocess_command, "Popen", popen)
output_manager = Mock()
command = subprocess_command.command()
command.initialize(
{
"general": {"curr_user": "Username"},
"runtime": {"OutputManager": output_manager},
},
"/tmp/script with spaces",
)
command._thread_run()
popen.assert_called_once_with(
["/tmp/script with spaces", "Username"],
stdout=subprocess_command.PIPE,
stderr=subprocess_command.PIPE,
)
output_manager.present_text.assert_called_once_with(
"done", sound_icon="", interrupt=False
)