Skip to content

CI: fix failing script/tests #40457

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

Merged
merged 3 commits into from
Mar 16, 2021
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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY : develop build clean clean_pyc doc lint-diff black
.PHONY : develop build clean clean_pyc doc lint-diff black test-scripts

all: develop

Expand All @@ -25,3 +25,6 @@ doc:
cd doc; \
python make.py clean; \
python make.py html

test-scripts:
pytest scripts
Empty file added scripts/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion scripts/tests/test_inconsistent_namespace_check.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from scripts.check_for_inconsistent_pandas_namespace import (
from ..check_for_inconsistent_pandas_namespace import (
check_for_inconsistent_pandas_namespace,
)

Expand Down
7 changes: 5 additions & 2 deletions scripts/tests/test_validate_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import textwrap

import pytest
import validate_docstrings

from .. import validate_docstrings


class BadDocstrings:
Expand Down Expand Up @@ -162,7 +163,9 @@ def test_bad_class(self, capsys):
(
"BadDocstrings",
"indentation_is_not_a_multiple_of_four",
("flake8 error: E111 indentation is not a multiple of four",),
# with flake8 3.9.0, the message ends with four spaces,
# whereas in earlier versions, it ended with "four"
("flake8 error: E111 indentation is not a multiple of ",),
),
(
"BadDocstrings",
Expand Down
3 changes: 2 additions & 1 deletion scripts/tests/test_validate_unwanted_patterns.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import io

import pytest
import validate_unwanted_patterns

from .. import validate_unwanted_patterns


class TestBarePytestRaises:
Expand Down