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)
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)
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)
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)