예제 #1
0
def main():
    here = os.path.abspath(os.path.dirname(__file__))
    path = os.path.join(here, "print_announce.py")
    get_changes = import_module_by_path(path).get_changes
    with open(os.path.expanduser("~/.tidelift.token")) as f:
        token = f.read().strip()
    upload_relnotes('psutil', psutil.__version__, get_changes(), token)
예제 #2
0
 def test_setup_script(self):
     setup_py = os.path.join(ROOT_DIR, 'setup.py')
     if TRAVIS and not os.path.exists(setup_py):
         return self.skipTest("can't find setup.py")
     module = import_module_by_path(setup_py)
     self.assertRaises(SystemExit, module.setup)
     self.assertEqual(module.get_version(), psutil.__version__)
예제 #3
0
 def test_setup_script(self):
     setup_py = os.path.join(ROOT_DIR, 'setup.py')
     if TRAVIS and not os.path.exists(setup_py):
         return self.skipTest("can't find setup.py")
     module = import_module_by_path(setup_py)
     self.assertRaises(SystemExit, module.setup)
     self.assertEqual(module.get_version(), psutil.__version__)
예제 #4
0
 def _iter_testmod_classes(self):
     """Iterate over all test files in this directory and return
     all TestCase classes in them.
     """
     for path in self._get_testmods():
         mod = import_module_by_path(path)
         for name in dir(mod):
             obj = getattr(mod, name)
             if isinstance(obj, type) and \
                     issubclass(obj, unittest.TestCase):
                 yield obj
예제 #5
0
 def test_setup_script(self):
     setup_py = os.path.join(ROOT_DIR, 'setup.py')
     module = import_module_by_path(setup_py)
     self.assertRaises(SystemExit, module.setup)
     self.assertEqual(module.get_version(), psutil.__version__)
예제 #6
0
파일: test_misc.py 프로젝트: mabuaita/ops
 def test_setup_script(self):
     setup_py = os.path.join(ROOT_DIR, 'setup.py')
     module = import_module_by_path(setup_py)
     self.assertRaises(SystemExit, module.setup)
     self.assertEqual(module.get_version(), psutil.__version__)