MCPcopy Create free account
hub / github.com/pytorch/executorch / test_create_workspace

Method test_create_workspace

tools/cmake/common/preset_test.py:14–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12class TestPreset(CMakeTestCase):
13
14 def test_create_workspace(self):
15 self.create_workspace(
16 {
17 ".gitignore": ".DS_Store",
18 "CMakeLists.txt": "move fast",
19 "README.md": "Meta Platforms",
20 "example": {
21 "CMakeLists.txt": "move faster",
22 "cmake": {
23 "README.md": "godspeed you!",
24 },
25 },
26 }
27 )
28
29 self.assertIsNotNone(self.workspace)
30 self.assert_file_content("CMakeLists.txt", "move fast")
31 self.assert_file_content("README.md", "Meta Platforms")
32 self.assert_file_content(".gitignore", ".DS_Store")
33 self.assert_file_content("example/CMakeLists.txt", "move faster")
34 self.assert_file_content("example/cmake/README.md", "godspeed you!")
35
36 # Test implicitly copied cmake files
37 this_file_dir = os.path.dirname(os.path.abspath(__file__))
38 self.assertTrue(len(TESTABLE_CMAKE_FILES) > 0)
39 for testable_cmake_file in TESTABLE_CMAKE_FILES:
40 with open(
41 os.path.join(this_file_dir, testable_cmake_file), "r"
42 ) as source_file:
43 self.assert_file_content(testable_cmake_file, source_file.read())
44
45 def test_set_option(self):
46 _cmake_lists_txt = """

Callers

nothing calls this directly

Calls 2

create_workspaceMethod · 0.80
assert_file_contentMethod · 0.80

Tested by

no test coverage detected