Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Tests fails with checkdocs #66

Description

@mtelka

If there is checkdocs pytest plugin installed the following tests fails:

FAILED tests/test_black.py::test_exclude_folder - AssertionError: assert {'er...
FAILED tests/test_black.py::test_exclude - AssertionError: assert {'errors': ...
FAILED tests/test_black.py::test_include - AssertionError: assert {'errors': ...

As a workaround I use the following patch:

--- pytest-black-0.3.12/tests/test_black.py.orig
+++ pytest-black-0.3.12/tests/test_black.py
@@ -92,7 +92,7 @@
     # Rename pyproject.toml ¯\_(ツ)_/¯
     testdir.run("mv", "test_exclude.pyproject.toml", "pyproject.toml")
 
-    result = testdir.runpytest("--black")
+    result = testdir.runpytest("--black", "-p", "no:checkdocs")
     result.assert_outcomes(skipped=1, passed=0)
 
 
@@ -129,7 +129,7 @@
     # Rename pyproject.toml ¯\_(ツ)_/¯
     testdir.run("mv", "test_exclude_folder.pyproject.toml", "pyproject.toml")
 
-    result = testdir.runpytest("--black")
+    result = testdir.runpytest("--black", "-p", "no:checkdocs")
     result.assert_outcomes(skipped=1, passed=0)
 
 
@@ -156,7 +156,7 @@
     # Rename pyproject.toml ¯\_(ツ)_/¯
     testdir.run("mv", "test_include.pyproject.toml", "pyproject.toml")
 
-    result = testdir.runpytest("--black")
+    result = testdir.runpytest("--black", "-p", "no:checkdocs")
     result.assert_outcomes(skipped=0, passed=1)
 
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions