import pytest
import os
import sys
repo_name = "databricks_test_practice"
# Get the path to this notebook, for example "/Workspace/Repos/{username}/{repo-name}".
notebook_path = dbutils.notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()
# Get the repo's root directory name.
repo_root = os.path.dirname(os.path.dirname(notebook_path))
print(repo_root)
# # Prepare to run pytest from the repo.
os.chdir(f"/Workspace{repo_root}")
print(os.getcwd())
# # Skip writing pyc files on a readonly filesystem.
sys.dont_write_bytecode = True
# # Run pytest.
retcode = pytest.main([".", "-v", "-p", "no:cacheprovider"])
# # Fail the cell execution if there are any test failures.
assert retcode == 0, "The pytest invocation failed. See the log for details."
----------------------------
But i am getting below error .
file /Workspace/Repos/sudhanshu.raj@zuhlke.com/databricks_test_practice/tests/test_file.py, line 4 def test_name(): E fixture 'name' not found > available fixtures: capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory > use 'pytest --fixtures [testpath]' for help on them.