def data_dir(
# The request object for this test. See
# https://pytest.org/latest/builtin.html#_pytest.python.FixtureRequest
# and
# https://pytest.org/latest/fixture.html#fixtures-can-introspect-the-requesting-test-context.
request,
# The tmpdir object for this test. See
# https://pytest.org/latest/tmpdir.html.
tmpdir):
# Strip the leading 'test_' from the test's name.
name = request.function.__name__[5:]
# Copy to tmpdir and return the path.
return _data_dir_copy(name, tmpdir)
评论列表
文章目录