示例#1
0
 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)
示例#2
0
 def test_create_project_dry_run_does_not_throw_error_if_already_exists(self):
     create_project(self.projectName)
     create_project(self.projectName, dryrun=True)
示例#3
0
 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)
示例#4
0
 def test_create_project_throws_error_if_already_exists(self):
     create_project(self.projectName)
     with self.assertRaises(HypergolFileAlreadyExistsException):
         create_project(self.projectName)
示例#5
0
 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)
示例#6
0
 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)