Skip to content

Commit 5a311ef

Browse files
Backport PR #40457: CI: fix failing script/tests (#40633)
Co-authored-by: jbrockmendel <[email protected]>
1 parent 3aefe7b commit 5a311ef

5 files changed

+12
-5
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY : develop build clean clean_pyc doc lint-diff black
1+
.PHONY : develop build clean clean_pyc doc lint-diff black test-scripts
22

33
all: develop
44

@@ -38,3 +38,6 @@ check:
3838
--included-file-extensions="py" \
3939
--excluded-file-paths=pandas/tests,asv_bench/,doc/
4040
pandas/
41+
42+
test-scripts:
43+
pytest scripts

scripts/__init__.py

Whitespace-only changes.

scripts/tests/test_inconsistent_namespace_check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from scripts.check_for_inconsistent_pandas_namespace import main
5+
from ..check_for_inconsistent_pandas_namespace import main
66

77
BAD_FILE_0 = "cat_0 = Categorical()\ncat_1 = pd.Categorical()"
88
BAD_FILE_1 = "cat_0 = pd.Categorical()\ncat_1 = Categorical()"

scripts/tests/test_validate_docstrings.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import textwrap
33

44
import pytest
5-
import validate_docstrings
5+
6+
from .. import validate_docstrings
67

78

89
class BadDocstrings:
@@ -162,7 +163,9 @@ def test_bad_class(self, capsys):
162163
(
163164
"BadDocstrings",
164165
"indentation_is_not_a_multiple_of_four",
165-
("flake8 error: E111 indentation is not a multiple of four",),
166+
# with flake8 3.9.0, the message ends with four spaces,
167+
# whereas in earlier versions, it ended with "four"
168+
("flake8 error: E111 indentation is not a multiple of ",),
166169
),
167170
(
168171
"BadDocstrings",

scripts/tests/test_validate_unwanted_patterns.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import io
22

33
import pytest
4-
import validate_unwanted_patterns
4+
5+
from .. import validate_unwanted_patterns
56

67

78
class TestBarePytestRaises:

0 commit comments

Comments
 (0)