Skip to content

Commit

Permalink
tests(markdown): prevent tests from opening links
Browse files Browse the repository at this point in the history
  • Loading branch information
TomJGooding committed Oct 24, 2024
1 parent 54ba2a1 commit f1fce84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async def test_markdown_quoting():

class MyApp(App):
def compose(self) -> ComposeResult:
self.md = Markdown(markdown="[tété](tété)")
self.md = Markdown(markdown="[tété](tété)", open_links=False)
yield self.md

def on_markdown_link_clicked(self, message: Markdown.LinkClicked):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_markdownviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, markdown_file: Path) -> None:
markdown_file.write_text(TEST_MARKDOWN.replace("{{file}}", markdown_file.name))

def compose(self) -> ComposeResult:
yield MarkdownViewer()
yield MarkdownViewer(open_links=False)

async def on_mount(self) -> None:
self.query_one(MarkdownViewer).show_table_of_contents = False
Expand All @@ -52,7 +52,7 @@ def __init__(self, markdown_string: str) -> None:
super().__init__()

def compose(self) -> ComposeResult:
yield MarkdownViewer(self.markdown_string)
yield MarkdownViewer(self.markdown_string, open_links=False)

async def on_mount(self) -> None:
self.query_one(MarkdownViewer).show_table_of_contents = False
Expand Down

0 comments on commit f1fce84

Please sign in to comment.