Skip to content

Commit

Permalink
Fix issues in unit and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hunyadi committed Sep 8, 2024
1 parent 275a992 commit 063b157
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements.txt
- run: bash check.sh
- name: Set up Node.js
uses: actions/setup-node@v4
- run: npm clean-install @mermaid-js/mermaid-cli
- run: python -m unittest discover -s tests
51 changes: 0 additions & 51 deletions integration_tests/test_kroki.py

This file was deleted.

8 changes: 7 additions & 1 deletion md2conf/mermaid.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import os.path
import subprocess
from typing import Literal
Expand All @@ -7,9 +8,14 @@ def render(source: str, output_format: Literal["png", "svg"] = "png") -> bytes:
"Generates a PNG or SVG image from a Mermaid diagram source."

filename = f"tmp_mermaid.{output_format}"

if os.name == "nt":
executable = "mmdc.cmd"
else:
executable = "mmdc"
try:
cmd = [
"mmdc",
executable,
"--input",
"-",
"--output",
Expand Down

0 comments on commit 063b157

Please sign in to comment.