Skip to content

Commit d009be1

Browse files
authored
Merge pull request #265 from djarecka/fix/isexistingfile
small fix to is_existing_file (follow-up to #255 and #257)
2 parents 677d3dd + 37cf4c5 commit d009be1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pydra/engine/helpers_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def is_local_file(f):
537537

538538
def is_existing_file(value):
539539
""" checking if an object is an existing file"""
540-
if value is "":
540+
if isinstance(value, str) and value == "":
541541
return False
542542
try:
543543
return Path(value).exists()

pydra/engine/tests/test_node_task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,7 @@ def test_task_state_6a(plugin):
991991
assert odir.exists()
992992

993993

994+
@pytest.mark.flaky(reruns=2) # when dask
994995
def test_task_state_comb_1(plugin_dask_opt):
995996
""" task with the simplest splitter and combiner"""
996997
nn = fun_addtwo(name="NA").split(a=[3, 5], splitter="a").combine(combiner="a")
@@ -1279,6 +1280,7 @@ def test_task_state_comb_order():
12791280
# Testing caching for tasks with states
12801281

12811282

1283+
@pytest.mark.flaky(reruns=2) # when dask
12821284
def test_task_state_cachedir(plugin_dask_opt, tmpdir):
12831285
""" task with a state and provided cache_dir using pytest tmpdir"""
12841286
cache_dir = tmpdir.mkdir("test_task_nostate")

0 commit comments

Comments
 (0)