示例#1
0
 def test_enry(self):
     with tempfile.TemporaryDirectory() as tmpdir:
         args = copy.copy(self.base_args)
         args.output = tmpdir
         args.linguist = "xxx"
         with self.assertRaises(FileNotFoundError):
             clone_repositories(args)
示例#2
0
 def test_repo_creation(self):
     with tempfile.TemporaryDirectory() as tmpdir:
         args = copy.copy(self.base_args)
         args.output = str.encode(tmpdir)
         args.linguist = None
         with self.assertRaises(TypeError):
             clone_repositories(args)
示例#3
0
 def test_classified(self):
     with tempfile.TemporaryDirectory() as tmpdir:
         args = copy.copy(self.base_args)
         args.output = tmpdir
         args.linguist = tests.ENRY
         self.assertIsNone(clone_repositories(args))
         self._validate_clone(tmpdir, args)
示例#4
0
 def test_multiple_repositories(self):
     with tempfile.TemporaryDirectory() as tmpdir:
         args = copy.copy(self.base_args)
         args.output = tmpdir
         args.linguist = tests.ENRY
         args.languages = ["Python"]
         args.input.append(os.path.join(os.path.dirname(__file__), "test_repos_list.txt"))
         self.assertIsNone(clone_repositories(args))
         self._validate_clone(tmpdir, args)