import os import sys import pytest import stat import shutil import filecmp import errno from contextlib import contextmanager from tempfile import NamedTemporaryFile from util import (wait_for_mount, umount, cleanup, base_cmdline, basename, fuse_test_marker, safe_sleep) from os.path import join as pjoin TEST_FILE = __file__ pytestmark = fuse_test_marker() with open(TEST_FILE, 'rb') as fh: TEST_DATA = fh.read() def name_generator(__ctr=[0]): __ctr[0] += 1 return 'testfile_%d' % __ctr[0] @pytest.mark.parametrize("debug", (False, True)) @pytest.mark.parametrize("cache_timeout", (0,1)) @pytest.mark.parametrize("sync_rd", (True, False)) @pytest.mark.parametrize("writeback", (False, True)) def test_sshfs(tmpdir, debug, cache_timeout, sync_rd, writeback, capfd):
import pytest import stat import shutil import filecmp import tempfile import time import errno import sys from tempfile import NamedTemporaryFile from contextlib import contextmanager from util import (wait_for_mount, umount, cleanup, base_cmdline, safe_sleep, basename, fuse_test_marker, test_printcap, fuse_proto, powerset) from os.path import join as pjoin pytestmark = fuse_test_marker() TEST_FILE = __file__ with open(TEST_FILE, 'rb') as fh: TEST_DATA = fh.read() def name_generator(__ctr=[0]): __ctr[0] += 1 return 'testfile_%d' % __ctr[0] options = [] if sys.platform == 'linux': options.append('clone_fd')