From aaa7a7c3b77796140fc9d9cbf271a751a8a77b00 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Wed, 5 Apr 2017 22:32:45 -0700 Subject: Rename tst_unlink() to tst_open_unlink() This makes more sense, since we are specifically checking unlinking of an open file. --- test/test_examples.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') 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) -- cgit v1.2.3