Skip to content

Commit 7151dac

Browse files
committed
tests: fix local board constructor test
1 parent 2d35fae commit 7151dac

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

pins/tests/test_constructors.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_constructor_board(board, df_csv, tmp_cache):
102102
fs_name = prot if isinstance(prot, str) else prot[0]
103103

104104
if fs_name == "file":
105-
con_name = "local"
105+
con_name = "folder"
106106
elif fs_name == "rsc":
107107
con_name = "rsconnect"
108108
pytest.xfail()
@@ -116,14 +116,18 @@ def test_constructor_board(board, df_csv, tmp_cache):
116116
assert_frame_equal(df, df_csv)
117117

118118
# check cache
119-
options = list(tmp_cache.glob("s3_*"))
120-
assert len(options) == 1
119+
if fs_name == "file":
120+
# no caching for local file boards
121+
pass
122+
else:
123+
options = list(tmp_cache.glob("*"))
124+
assert len(options) == 1
121125

122-
cache_dir = options[0]
123-
res = list(cache_dir.rglob("**/*.csv"))
124-
assert len(res) == 1
126+
cache_dir = options[0]
127+
res = list(cache_dir.rglob("**/*.csv"))
128+
assert len(res) == 1
125129

126-
check_cache_file_path(res[0], cache_dir)
130+
check_cache_file_path(res[0], cache_dir)
127131

128132

129133
# Board particulars ===========================================================

0 commit comments

Comments
 (0)