MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / temp_tree

Function temp_tree

lib/cli/tests/test_utils.py:12–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11@pytest.fixture
12def temp_tree():
13 root_dir = tempfile.mkdtemp()
14
15 create_file(os.path.join(root_dir, "file1.txt"), "Hello, world!")
16 create_file(os.path.join(root_dir, "file2.txt"), "Another file")
17 os.mkdir(os.path.join(root_dir, "empty_dir"))
18 nested_dir = os.path.join(root_dir, "nested_dir")
19 os.mkdir(nested_dir)
20 create_file(os.path.join(nested_dir, "nested_file.txt"), "Nested content")
21
22 yield root_dir
23
24 shutil.rmtree(root_dir)
25
26
27def create_file(path, content):

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
create_fileFunction · 0.70

Tested by

no test coverage detected