def test_get_dependencies(self):
     self.assertIn(LocalModule("generallibrary"),
                   LocalModule().get_dependencies())
     self.assertIn(LocalModule("generalfile"),
                   LocalModule().get_dependencies())
     self.assertNotIn(LocalModule("doesntexist"),
                      LocalModule().get_dependencies())
Exemple #2
0
    def __init__(self,
                 name=None,
                 github_owner=None,
                 pypi_owner=None,
                 path=None):
        self.localmodule = LocalModule(name=name)
        self.name = self.localmodule.name

        self.localrepo = LocalRepo(name=self.name, path=path)
        self.path = self.localrepo.path

        self.github = GitHub(name=self.name, owner=github_owner)
        self.pypi = PyPI(name=self.name, owner=pypi_owner)
 def test_exists(self):
     self.assertEqual(True, LocalModule("generalpackager").exists())
     self.assertEqual(False, LocalModule("doesntexist").exists())
 def test_get_dependants(self):
     self.assertEqual([], LocalModule().get_dependants())
 def test_get_env_vars(self):
     self.assertGreater(len(LocalModule().get_env_vars()), 1)
 def test_objInfo(self):
     self.assertLess(10, len(LocalModule().objInfo.get_children(depth=-1)))
 def test_module(self):
     self.assertEqual("generalpackager", LocalModule().module.__name__)