Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: mojo/tools/testing/mojom_fetcher/repository_tests.py

Issue 1709333002: Remove mojom_fetcher. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/tools/testing/mojom_fetcher/mojom_gn_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/testing/mojom_fetcher/repository_tests.py
diff --git a/mojo/tools/testing/mojom_fetcher/repository_tests.py b/mojo/tools/testing/mojom_fetcher/repository_tests.py
deleted file mode 100644
index 46724d1032e6801833d0c35cf73e14f68c9e20ab..0000000000000000000000000000000000000000
--- a/mojo/tools/testing/mojom_fetcher/repository_tests.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2015 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import io
-import os.path
-import unittest
-
-from fetcher.dependency import Dependency
-
-# Fake repository for testing
-from fakes import FakeRepository
-
-
-class TestRepository(unittest.TestCase):
- def test_init(self):
- repository = FakeRepository("/path/to/repo", "third_party/external")
- self.assertEqual("/path/to/repo", repository.get_repo_root_directory())
- self.assertEqual("/path/to/repo/third_party/external",
- repository.get_external_directory())
-
- def test_get_missing_dependencies(self):
- repository = FakeRepository("/path/to/repo", "third_party/external")
- missing_deps = repository.get_missing_dependencies()
- self.assertEquals(["/path/to/repo"], repository.directories_walked)
- # Order is not important
- self.assertIn("/path/to/repo/foo/foo.mojom", repository.files_opened)
- self.assertIn("/path/to/repo/foo/bar/baz.mojom", repository.files_opened)
- self.assertIn(
- "/path/to/repo/third_party/external/services.domokit.org/foo/fiz.mojom",
- repository.files_opened)
- self.assertEquals(3, len(repository.files_opened))
-
- self.assertEquals([Dependency(repository,
- "/path/to/repo/third_party/external/services.domokit.org/foo/fiz.mojom",
- "services.fiz.org/foo/bar.mojom")], missing_deps)
-
- def test_get_external_urls(self):
- repository = FakeRepository("/path/to/repo", "third_party/external")
- urls = repository.get_external_urls()
- self.assertEquals(["/path/to/repo/third_party/external"],
- repository.directories_walked)
- self.assertEquals(["services.domokit.org/foo/fiz.mojom"], urls)
« no previous file with comments | « mojo/tools/testing/mojom_fetcher/mojom_gn_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698