Skip to content

Commit

Permalink
fix(tests): Use fixture for local dummy file
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Rumpold <[email protected]>
  • Loading branch information
AdrianoKF committed Mar 20, 2023
1 parent 8e0ddd0 commit ef4fc52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/flytekit/unit/core/test_flyte_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def wf(path: str) -> os.PathLike:
assert flyte_tmp_dir in wf(path="s3://somewhere").path


def test_flyte_file_annotated_hashmethod():
def test_flyte_file_annotated_hashmethod(local_dummy_file):
def calc_hash(ff: FlyteFile) -> str:
return str(ff.path)

Expand All @@ -449,5 +449,4 @@ def t1(path: str) -> Annotated[FlyteFile, HashMethod(calc_hash)]:
def wf(path: str) -> None:
t1(path=path)

with tempfile.NamedTemporaryFile() as f:
wf(path=f.name)
wf(path=local_dummy_file)

0 comments on commit ef4fc52

Please sign in to comment.