Skip to content

Commit 8bb44d7

Browse files
committed
only patch custom_components.pyscript.global_ctx.open instead of builtins.open; workaround for #93
1 parent b4fa8f4 commit 8bb44d7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/requirements_test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
coverage==5.2.1
1+
coverage==5.3
22
croniter>=0.3.34
33
mock-open==1.4.0
4-
pre-commit
5-
pytest==5.4.3
4+
pre-commit==2.8.2
5+
pytest==6.1.2
66
pytest-cov>=2.9.0
7-
pytest-homeassistant-custom-component==0.0.8
7+
pytest-homeassistant-custom-component>=0.0.20
88
pylint==2.6.0
99
pylint-strict-informational==0.1

tests/test_apps_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def glob_side_effect(path, recursive=None):
123123
conf = {"apps": {"world": {}}}
124124
with patch("custom_components.pyscript.os.path.isdir", return_value=True), patch(
125125
"custom_components.pyscript.glob.iglob"
126-
) as mock_glob, patch("builtins.open", mock_open), patch(
126+
) as mock_glob, patch("custom_components.pyscript.global_ctx.open", mock_open), patch(
127127
"homeassistant.config.load_yaml_config_file", return_value={"pyscript": conf}
128128
), patch(
129129
"os.path.isfile"

0 commit comments

Comments
 (0)