Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(markdown): prevent tests from opening links #5170

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class MarkdownTableApp(App):
messages = []

def compose(self) -> ComposeResult:
yield Markdown(markdown_table)
yield Markdown(markdown_table, open_links=False)

@on(Markdown.LinkClicked)
def log_markdown_link_clicked(
Expand All @@ -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
Loading