bcachefs-tools/tests/conftest.py
Brett Holman 60a6b2882e Clean up smoketest and pytests.
- Replace depreciated tempfile with mktemp in smoketest.
- Remove unused pytest imports and variables.
- Make path lookup less fragile. Allows pytest to run from any cwd.
- Prevent exeptions caused by calling functions/methods on None objects.
- Disable fuse tests in smoketest. These are broken and add noise.
- Add missing travis CI dependency.

Signed-off-by: Brett Holman <bholman.devel@gmail.com>
2021-10-11 20:24:12 -06:00

19 lines
335 B
Python

#!/usr/bin/python3
#
# pytest fixture definitions.
import pytest
from tests import util
@pytest.fixture
def bfuse(tmpdir):
'''A test requesting a "bfuse" is given one via this fixture.'''
dev = util.format_1g(tmpdir)
mnt = util.mountpoint(tmpdir)
bf = util.BFuse(dev, mnt)
yield bf
bf.unmount(timeout=5.0)