Skip to content

Commit

Permalink
Use the ntf.name instead of the basename for the delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
pathunstrom committed May 9, 2020
1 parent 89622ee commit 93d5d4f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_vfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ def cwd_file():
# delete the temp file manually.

with tempfile.NamedTemporaryFile(dir=os.getcwd(), delete=False) as ntf:
name = os.path.basename(ntf.name)
ntf.close()
yield name
os.remove(name)
yield os.path.basename(ntf.name)
os.remove(ntf.name)


def test_main_normal(cwd_file):
Expand Down

0 comments on commit 93d5d4f

Please sign in to comment.