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 fails with checkdocs #66

Open
mtelka opened this issue Jan 25, 2023 · 0 comments
Open

Tests fails with checkdocs #66

mtelka opened this issue Jan 25, 2023 · 0 comments

Comments

@mtelka
Copy link

mtelka commented Jan 25, 2023

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)
 
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant