Пример #1
0
 def test_error_go_get_feature_branch(self):
     with tests.parse_error(self) as stderr:
         git_gate.parse_args(
             ["--project", "git.testing/project",
              "--project-url", "https://git.testing/project",
              "--go-get-all", "--feature-branch"])
     self.assertIn(
         "Cannot use --feature-branch and --go-get-all together",
         stderr.getvalue())
Пример #2
0
 def test_project_with_go_deps(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project", "--go-get-all"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.dependencies, None)
     self.assertEqual(args.go_get_all, True)
     self.assertEqual(args.tsv_path, None)
Пример #3
0
 def test_merging_other(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project", "--go-get-all",
          "--merge-url", "https://git.testing/proposed"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.merge_url, "https://git.testing/proposed")
     self.assertEqual(args.merge_ref, "HEAD")
Пример #4
0
 def test_project_and_url(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project",
          "--project-url", "https://git.testing/project"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.project_url, "https://git.testing/project")
     self.assertEqual(args.keep, False)
Пример #5
0
 def test_project_with_tsv_path(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project",
          "--project-url", "https://git.testing/project",
          "--tsv-path", "/a/file.tsv"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.project_url, "https://git.testing/project")
     self.assertEqual(args.dependencies, None)
     self.assertEqual(args.go_get_all, False)
     self.assertEqual(args.tsv_path, "/a/file.tsv")
Пример #6
0
 def test_project_with_deps(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project",
          "--project-url", "https://git.testing/project",
          "--dependencies", "git.testing/a", "git.testing/b"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.project_url, "https://git.testing/project")
     self.assertEqual(args.dependencies, ["git.testing/a", "git.testing/b"])
     self.assertEqual(args.go_get_all, False)
     self.assertEqual(args.tsv_path, None)
Пример #7
0
 def test_error_on_project_url_missing(self):
     with tests.parse_error(self) as stderr:
         git_gate.parse_args(["--project", "git.testing/project"])
     self.assertIn(
         "Must supply either --project-url or --go-get-all",
         stderr.getvalue())
Пример #8
0
 def test_project_and_ref(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project", "--go-get-all",
          "--project-ref", "v1"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.project_ref, "v1")
Пример #9
0
 def test_keep(self):
     args = git_gate.parse_args(
         ["--project", "git.testing/project",
          "--project-url", "https://git.testing/project", "--keep"])
     self.assertEqual(args.project, "git.testing/project")
     self.assertEqual(args.keep, True)