Пример #1
0
 def test__quality__no_package_directory(self):
     package_dir = standard_directories(
         'package_quality_validation')['packages']
     if os.path.exists(package_dir):
         os.rename(package_dir, package_dir + '.disabled')
     result = validate_package_quality()
     self.assertEqual(result, 0)
Пример #2
0
 def test__publish__disabled(self):
     os.environ['PUBLISH_PYTHON'] = 'False'
     os.environ['PUBLISH_PYTHON_TIMEOUT'] = "0"
     package_dir = standard_directories('publish_python')['packages']
     os.makedirs(package_dir, exist_ok=True)
     rc = publish_python_main(twine_command=self.moc_twine_command(rc=999))
     self.assertEqual(rc, 0)
Пример #3
0
 def test__publish__no_package_dir(self):
     os.environ['PUBLISH_PYTHON_TIMEOUT'] = "0"
     package_dir = standard_directories('publish_python')['packages']
     if os.path.exists(package_dir):
         print(package_dir)
         os.rename(package_dir, package_dir + '.disabled')
     rc = publish_python_main(twine_command=self.moc_twine_command(rc=999))
     self.assertEqual(rc, 0)
Пример #4
0
 def test__standard_directories__no_command(self):
     os.environ['SD_ARTIFACTS_DIR'] = self.tempdir.name
     result = standard_directories()
     self.assertEqual(result['artifacts'], f'{self.tempdir.name}')
     self.assertEqual(result['documentation'], f'{self.tempdir.name}/documentation')
     self.assertEqual(result['logs'], f'{self.tempdir.name}/logs')
     self.assertEqual(result['packages'], f'{self.tempdir.name}/packages')
     self.assertEqual(result['reports'], f'{self.tempdir.name}/reports')
     for value in result.values():
         self.assertTrue(os.path.exists(value))