def test_create_project_creates_content(self): allContent = create_project(self.projectName, dryrun=True) makeVenvScript, runTestScript, runPylintScript, requirementsContent, gitignoreContent, readmeContent, licenseContent, pylintrcContent = allContent self.assertEqual(makeVenvScript, MAKE_VENV_SCRIPT) self.assertEqual(runTestScript, RUN_TEST_SCRIPT) self.assertEqual(runPylintScript, RUN_PYLINT_SCRIPT) self.assertEqual(requirementsContent, REQUIREMENTS_CONTENT) self.assertEqual(gitignoreContent, GITIGNORE_CONTENT) self.assertEqual(len(readmeContent), 4923) self.assertEqual(len(licenseContent), 1070) self.assertEqual(len(pylintrcContent), 18741)
def test_create_project_dry_run_does_not_throw_error_if_already_exists(self): create_project(self.projectName) create_project(self.projectName, dryrun=True)
def test_create_project_dry_run_mode_does_not_create(self): create_project(self.projectName, dryrun=True) for filePath in self.allPaths: self.assertEqual(os.path.exists(filePath), False)
def test_create_project_throws_error_if_already_exists(self): create_project(self.projectName) with self.assertRaises(HypergolFileAlreadyExistsException): create_project(self.projectName)
def test_create_project_only_creates_files_expected(self): create_project(self.projectName) for filePath in self.allPaths: self.assertEqual(os.path.exists(filePath), True) for filePath in self.allPaths: delete_if_exists(filePath)
def test_create_project_force_does_not_throw_error_if_already_exists(self): create_project(self.projectName) create_project(self.projectName, force=True) for filePath in self.allPaths: self.assertEqual(os.path.exists(filePath), True)