aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-05 22:32:45 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2017-04-07 16:40:15 -0700
commitaaa7a7c3b77796140fc9d9cbf271a751a8a77b00 (patch)
tree61b205a2802308731ed9e4add893aec78d4869e5 /test
parent3b04359dfb81776aafd594b911d4d7980bc202e0 (diff)
Rename tst_unlink() to tst_open_unlink()
This makes more sense, since we are specifically checking unlinking of an open file.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_examples.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_examples.py b/test/test_examples.py
index 4147479..76557ac 100755
--- a/test/test_examples.py
+++ b/test/test_examples.py
@@ -93,7 +93,7 @@ def test_passthrough(tmpdir, name, debug):
tst_statvfs(work_dir)
tst_truncate_path(work_dir)
tst_truncate_fd(work_dir)
- tst_unlink(work_dir)
+ tst_open_unlink(work_dir)
tst_passthrough(src_dir, work_dir)
except:
cleanup(mnt_dir)
@@ -350,12 +350,12 @@ def tst_write(mnt_dir):
assert filecmp.cmp(name, TEST_FILE, False)
checked_unlink(name, mnt_dir)
-def tst_unlink(mnt_dir):
+def tst_open_unlink(mnt_dir):
name = pjoin(mnt_dir, name_generator())
data1 = b'foo'
data2 = b'bar'
-
- with open(pjoin(mnt_dir, name), 'wb+', buffering=0) as fh:
+ fullname = pjoin(mnt_dir, name)
+ with open(fullname, 'wb+', buffering=0) as fh:
fh.write(data1)
checked_unlink(name, mnt_dir)
fh.write(data2)