Skip to content

Commit

Permalink
Add test for error case publishing markdown-with-index
Browse files Browse the repository at this point in the history
  • Loading branch information
robtaylor committed Oct 3, 2024
1 parent a0c2de0 commit d1e4f76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doorstop/cli/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,15 @@ def test_publish_tree_markdown_with_index(self):
self.assertTrue(os.path.isdir(path))
self.assertTrue(os.path.isfile(os.path.join(path, "index.md")))

def test_publish_tree_markdown_with_index_no_tree(self):
"""Verify 'doorstop publish' can create Markdown output for a tree,
with an index."""
path = tempfile.mkdtemp()
os.remove(path)
self.assertRaises(
SystemExit, main(["publish", "all", path, "--markdown", "--index"])
)


class TestPublishCommand(TempTestCase):
"""Tests 'doorstop publish' options toc and template"""
Expand Down

0 comments on commit d1e4f76

Please sign in to comment.