def test_contribs_write_contribs(self): contribs = Contributors() file = 'contributors.md' try: os.remove(file) except FileNotFoundError: logger.info("No file to remove at '%s'. Continuing.", file) contribs.write_contribs() contribs_file = os.path.isfile(file) self.assertTrue(contribs_file)
def test_contribs_write_contribs(self): contribs = Contributors() file = 'contributors.md' try: os.remove(file) except FileNotFoundError: pass contribs.write_contribs() contribs_file = os.path.isfile(file) self.assertTrue(contribs_file)
def test_contribs_write_contribs(self): contribs = Contributors() file = "contributors.md" try: os.remove(file) except FileNotFoundError: pass contribs.write_contribs() contribs_file = os.path.isfile(file) self.assertTrue(contribs_file)
def test_contribs_make_authors_dict(self): contribs = Contributors() authors_dict = contribs._make_authors_dict() self.assertGreater(len(authors_dict), 8)
def test_get_module_authors(self): contribs = Contributors() author = contribs.get_module_authors('cltk/corpus/utils/importer.py')[0] self.assertEqual(author, 'Kyle P. Johnson <*****@*****.**>')
def test_contribs_walk_cltk(self): contribs = Contributors() modules_list = contribs.walk_cltk() self.assertEqual(type(modules_list), list)
def test_contribs_make_authors_dict(self): """Test making dict for author contrib file.""" contribs = Contributors() authors_dict = contribs._make_authors_dict() self.assertGreater(len(authors_dict), 8)
def test_contribs_walk_cltk(self): """Test recursive fp walk.""" contribs = Contributors() modules_list = contribs.walk_cltk() self.assertEqual(type(modules_list), list)
def test_get_module_authors(self): """Test opening contribs file.""" contribs = Contributors() author = contribs.get_module_authors( 'cltk/corpus/utils/importer.py')[0] self.assertEqual(author, 'Kyle P. Johnson <*****@*****.**>')