From: Nikolaus Rath Date: Thu, 6 Apr 2017 05:32:45 +0000 (-0700) Subject: Rename tst_unlink() to tst_open_unlink() X-Git-Tag: fuse-3.0.1~22 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aaa7a7c3b77796140fc9d9cbf271a751a8a77b00;p=qemu-gpiodev%2Flibfuse.git Rename tst_unlink() to tst_open_unlink() This makes more sense, since we are specifically checking unlinking of an open file. --- 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)