mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-09 11:17:44 +02:00
[eric] browser: read-script defaults on with a kill switch; write-side stays off pending a fix
This commit is contained in:
@@ -54,7 +54,7 @@ P_SYSTEM = (
|
||||
|
||||
|
||||
def read_script_enabled() -> bool:
|
||||
return os.environ.get("OSW_READ_SCRIPT", "0") != "0"
|
||||
return os.environ.get("OSW_READ_SCRIPT", "1") != "0"
|
||||
|
||||
|
||||
def is_answer(reply: str) -> Optional[str]:
|
||||
|
||||
@@ -95,11 +95,11 @@ def test_a_page_that_never_settles_still_answers_from_the_last_read(monkeypatch)
|
||||
|
||||
def test_flag_gate(monkeypatch):
|
||||
monkeypatch.delenv("OSW_READ_SCRIPT", raising=False)
|
||||
assert rs.read_script_enabled() is False
|
||||
monkeypatch.setenv("OSW_READ_SCRIPT", "1")
|
||||
assert rs.read_script_enabled() is True
|
||||
monkeypatch.setenv("OSW_READ_SCRIPT", "0")
|
||||
assert rs.read_script_enabled() is False
|
||||
monkeypatch.setenv("OSW_READ_SCRIPT", "1")
|
||||
assert rs.read_script_enabled() is True
|
||||
|
||||
|
||||
def test_answers_from_the_staged_page():
|
||||
|
||||
Reference in New Issue
Block a user