bcachefs-tools/tests/conftest.py
Justin Husted f574ca05f8 Clean up after failed unit tests better.
Signed-off-by: Justin Husted <sigstop@gmail.com>
2019-12-14 16:58:43 -08:00

19 lines
324 B
Python

#!/usr/bin/python3
#
# pytest fixture definitions.
import pytest
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)