def test_find_html_docs(wspath): filedir = os.path.dirname(__file__) docpath = os.path.join(filedir, "..", "docs", "build", "html") commands.workspace_init(wspath, {}, html_paths=[docpath]) dmfobj = dmfbase.DMF(wspath) filenames = commands.find_html_docs(dmfobj, dmfobj) assert len(filenames) > 0
def test_workspace_init(wspath): commands.workspace_init(wspath, {"some": "metadata"}) try: commands.workspace_init(wspath, {"some": "metadata"}) assert False, "Duplicate workspace init succeeded" except errors.CommandError: pass
def test_workspace_init(wspath): commands.workspace_init(wspath, {'some': 'metadata'}) try: commands.workspace_init(wspath, {'some': 'metadata'}) assert False, 'Duplicate workspace init succeeded' except errors.CommandError: pass
def test_workspace_info(wspath): commands.workspace_init(wspath, {"some": "metadata"}) commands.workspace_info(wspath) # subdir = os.path.join(wspath, 'stuff') # os.mkdir(subdir) # commands.workspace_info(subdir) notasubdir = os.path.join(wspath, "nope") try: commands.workspace_info(notasubdir) assert False, "Nonexistent subdir workspace info success" except errors.CommandError: pass
def test_workspace_info(wspath): commands.workspace_init(wspath, {'some': 'metadata'}) commands.workspace_info(wspath) # subdir = os.path.join(wspath, 'stuff') # os.mkdir(subdir) # commands.workspace_info(subdir) notasubdir = os.path.join(wspath, 'nope') try: commands.workspace_info(notasubdir) assert False, 'Nonexistent subdir workspace info success' except errors.CommandError: pass
def test_workspace_init(wspath): commands.workspace_init(wspath, {"some": "metadata"}) # try again. Should work, since it's OK to init twice commands.workspace_init(wspath, {"some": "metadata"})