def test_is_bumped(self): packager = Packager() packager.is_bumped() version = packager.localrepo.version packager.localrepo.bump_version() self.assertEqual(True, packager.is_bumped()) packager.localrepo.version = version
def test_run_ordered_methods(self): x = [] def a(_): x.append(1) def b(_): x.append(2) Packager().run_ordered_methods(a, b) length = len(Packager().get_all()) self.assertEqual([1] * length + [2] * length, x)
def test_general_bumped_set(self): packager = Packager() packager.general_bumped_set() version = packager.localrepo.version packager.localrepo.bump_version() self.assertLess(0, len(packager.general_bumped_set())) packager.localrepo.version = version
def test_relative_path_is_aesthetic(self): packager = Packager() self.assertEqual(False, packager.relative_path_is_aesthetic("setup.py")) self.assertEqual(True, packager.relative_path_is_aesthetic("README.md")) self.assertEqual( True, packager.relative_path_is_aesthetic( packager.localrepo.get_readme_path()))
def test_filter_relative_filenames(self): packager = Packager() self.assertEqual(["setup.py"], packager.filter_relative_filenames("setup.py", aesthetic=None)) self.assertEqual(["setup.py"], packager.filter_relative_filenames("setup.py", aesthetic=False)) self.assertEqual([], packager.filter_relative_filenames("setup.py", aesthetic=True))
def test_github_link_path_line(self): self.assertIn("generalpackager", Packager().github_link_path_line("foo", "bar"))
def test_get_installation_markdown(self): self.assertIn("pip install generalpackager", Packager().get_installation_markdown())
def test_get_latest_release(self): self.assertIn("CE", str(Packager().get_latest_release()))
def test_step_setup_python(self): self.assertIn("3.8", Packager().step_setup_python("3.8"))
def test_step_install_necessities(self): self.assertIn("pip install", Packager().step_install_necessities())
def test_get_untested_objInfo_dict(self): self.assertIsInstance(Packager().get_untested_objInfo_dict(), dict)
def test_get_attributes_markdown(self): self.assertIn("generalpackager", Packager().get_attributes_markdown())
def test_badges_dict(self): self.assertLess(2, len(Packager().get_badges_dict()))
def test_step_run_packager_method(self): self.assertIn("Packager(", Packager().step_run_packager_method("foo"))
def test_get_sync_job(self): self.assertIn("pip install", Packager().get_sync_job())
def test_steps_setup(self): self.assertIn("pip install", Packager().steps_setup("3.8"))
def test_get_env(self): self.assertIn("TWINE", Packager().get_env())
def test_step_install_package_git(self): self.assertIn("pip install git", Packager().step_install_package_git(*Packager().get_ordered_packagers()))
def test_get_footnote_markdown(self): self.assertIn("generalpackager", Packager().get_footnote_markdown())
def test_exists(self): self.assertEqual(True, Packager().exists())
def test_get_owners_package_names(self): self.assertLess(4, len(Packager().get_owners_package_names()))
from generalpackager import Packager Packager("generalpackager").generate_localfiles(print_out=True)
def test_general_changed_dict(self): Packager().general_changed_dict()
def test_get_todos(self): Packager().get_todos()
def test_get_ordered_packagers(self): self.assertLess(3, len(Packager().get_ordered_packagers()))
def test_get_todos_markdown(self): Packager().get_todos_markdown()
def test_get_classifiers(self): self.assertIn("Operating System :: Microsoft :: Windows", Packager().get_classifiers())
def test_get_description_markdown(self): self.assertIn("generalpackager", Packager().get_description_markdown())
def test_get_topics(self): self.assertIn("windows", Packager().get_topics())
def test_get_information_markdown(self): self.assertIn("generalpackager", Packager().get_information_markdown())