From 93d9520a751998e2b4285e65f5140a292e8b8936 Mon Sep 17 00:00:00 2001 From: Till Hoffmann Date: Sat, 29 Apr 2023 17:48:48 -0400 Subject: [PATCH 1/2] Skip markdown tests if `cmarkgfm` is not installed. --- tests/test_cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 15115b7..dddf5c3 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -8,7 +8,11 @@ @pytest.fixture(params=["test_CommonMark_001.md", "test_rst_003.rst", "test_GFM_001.md", "test_txt_001.txt"]) def input_file(request): - return pathlib.Path("tests/fixtures", request.param) + path = pathlib.Path("tests/fixtures", request.param) + # Skip markdown tests if the cmarkgfm optional dependency is not installed. + if path.suffix == ".md": + pytest.importorskip("cmarkgfm") + return path @pytest.mark.parametrize("output_file", [False, True]) From 6aab63ec09447f8c9739af2427d8a807611b6058 Mon Sep 17 00:00:00 2001 From: Till Hoffmann Date: Sat, 29 Apr 2023 17:48:58 -0400 Subject: [PATCH 2/2] Run tests without extras. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c240442..da2a8ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,9 @@ jobs: - name: Install dependencies run: python -m pip install tox - name: Run tests - run: python -m tox -e py + run: | + python -m tox -e py + python -m tox -e noextra lint: name: Lint runs-on: ubuntu-latest