Beispiel #1
0
 def test_depot_tools_base_not_found(self):
     filesystem = MockFileSystem()
     filesystem.path_to_module = lambda _: (
         '/mock-checkout/third_party/WebKit/Tools/Scripts/webkitpy/common/'
         'path_finder.py')
     finder = PathFinder(filesystem)
     self.assertIsNone(finder.depot_tools_base())
Beispiel #2
0
 def test_depot_tools_base_exists(self):
     filesystem = MockFileSystem()
     filesystem.path_to_module = lambda _: (
         '/checkout/third_party/WebKit/Tools/Scripts/webkitpy/common/'
         'path_finder.py')
     filesystem.maybe_make_directory('/checkout/third_party/depot_tools')
     finder = PathFinder(filesystem)
     self.assertEqual(finder.depot_tools_base(),
                      '/checkout/third_party/depot_tools')
Beispiel #3
0
 def test_layout_tests_dir_with_backslash_sep(self):
     filesystem = MockFileSystem()
     filesystem.sep = '\\'
     filesystem.path_to_module = lambda _: (
         'C:\\mock-checkout\\third_party\\WebKit\\Tools\\Scripts\\webkitpy\\foo.py')
     finder = PathFinder(filesystem)
     self.assertEqual(
         finder.layout_tests_dir(),
         'C:\\mock-checkout\\third_party\\WebKit\\LayoutTests')