More fixes to pty reading.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import pytest
|
||||
|
||||
from fenrirscreenreader.screenDriver.ptyDriver import PTYConstants
|
||||
from fenrirscreenreader.screenDriver.ptyDriver import Terminal
|
||||
from fenrirscreenreader.screenDriver.ptyDriver import driver as PtyDriver
|
||||
|
||||
|
||||
class DummyProcessInput:
|
||||
@@ -20,3 +22,23 @@ def test_csi_sequences_with_intermediate_characters_do_not_render_final_byte():
|
||||
|
||||
assert screen["text"].splitlines()[0] == "X "
|
||||
assert "p" not in screen["text"]
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_optional_float_setting_uses_default_when_missing():
|
||||
settings_manager = type(
|
||||
"SettingsManager",
|
||||
(),
|
||||
{"get_setting": lambda self, section, setting: ""},
|
||||
)()
|
||||
pty_driver = PtyDriver()
|
||||
|
||||
assert (
|
||||
pty_driver._get_optional_float_setting(
|
||||
settings_manager,
|
||||
"screen",
|
||||
"ptyOutputTimeout",
|
||||
PTYConstants.OUTPUT_READ_TIMEOUT,
|
||||
)
|
||||
== PTYConstants.OUTPUT_READ_TIMEOUT
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user