Skip to content

Commit 61b83ce

Browse files
committed
feat(test): sub
1 parent 48a72c3 commit 61b83ce

38 files changed

+257
-82
lines changed

pandas-stubs/core/series.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3098,6 +3098,8 @@ class Series(IndexOpsMixin[S1], NDFrame):
30983098
),
30993099
) -> Series[Timestamp]: ...
31003100
@overload
3101+
def __sub__(self: Series[Timedelta], other: np_ndarray_dt) -> Never: ...
3102+
@overload
31013103
def __sub__(
31023104
self: Series[Timedelta],
31033105
other: (

tests/indexes/arithmetic/bool/test_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_add_py_scalar() -> None:
2626

2727

2828
def test_add_py_sequence() -> None:
29-
"""Test pd.Index[bool] + Python native sequence"""
29+
"""Test pd.Index[bool] + Python native sequences"""
3030
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3131

3232
check(assert_type(left + b, "pd.Index[bool]"), pd.Index, np.bool_)
@@ -41,7 +41,7 @@ def test_add_py_sequence() -> None:
4141

4242

4343
def test_add_numpy_array() -> None:
44-
"""Test pd.Index[bool] + numpy array"""
44+
"""Test pd.Index[bool] + numpy arrays"""
4545
b = np.array([True, False, True], np.bool_)
4646
i = np.array([2, 3, 5], np.int64)
4747
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/bool/test_sub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_sub_py_scalar() -> None:
3232

3333

3434
def test_sub_py_sequence() -> None:
35-
"""Test pd.Index[bool] - Python native sequence"""
35+
"""Test pd.Index[bool] - Python native sequences"""
3636
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3737

3838
if TYPE_CHECKING_INVALID_USAGE:
@@ -49,7 +49,7 @@ def test_sub_py_sequence() -> None:
4949

5050

5151
def test_sub_numpy_array() -> None:
52-
"""Test pd.Index[bool] - numpy array"""
52+
"""Test pd.Index[bool] - numpy arrays"""
5353
b = np.array([True, False, True], np.bool_)
5454
i = np.array([2, 3, 5], np.int64)
5555
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/complex/test_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_add_py_scalar() -> None:
2525

2626

2727
def test_add_py_sequence() -> None:
28-
"""Test pd.Index[complex] + Python native sequence"""
28+
"""Test pd.Index[complex] + Python native sequences"""
2929
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3030

3131
check(assert_type(left + b, "pd.Index[complex]"), pd.Index, np.complexfloating)
@@ -40,7 +40,7 @@ def test_add_py_sequence() -> None:
4040

4141

4242
def test_add_numpy_array() -> None:
43-
"""Test pd.Index[complex] + numpy array"""
43+
"""Test pd.Index[complex] + numpy arrays"""
4444
b = np.array([True, False, True], np.bool_)
4545
i = np.array([2, 3, 5], np.int64)
4646
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/complex/test_sub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_sub_py_scalar() -> None:
2727

2828

2929
def test_sub_py_sequence() -> None:
30-
"""Test pd.Index[complex] - Python native sequence"""
30+
"""Test pd.Index[complex] - Python native sequences"""
3131
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3232

3333
check(assert_type(left - b, "pd.Index[complex]"), pd.Index, np.complexfloating)
@@ -42,7 +42,7 @@ def test_sub_py_sequence() -> None:
4242

4343

4444
def test_sub_numpy_array() -> None:
45-
"""Test pd.Index[complex] - numpy array"""
45+
"""Test pd.Index[complex] - numpy arrays"""
4646
b = np.array([True, False, True], np.bool_)
4747
i = np.array([2, 3, 5], np.int64)
4848
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/float/test_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_add_py_scalar() -> None:
2525

2626

2727
def test_add_py_sequence() -> None:
28-
"""Test pd.Index[float] + Python native sequence"""
28+
"""Test pd.Index[float] + Python native sequences"""
2929
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3030

3131
check(assert_type(left + b, "pd.Index[float]"), pd.Index, np.floating)
@@ -40,7 +40,7 @@ def test_add_py_sequence() -> None:
4040

4141

4242
def test_add_numpy_array() -> None:
43-
"""Test pd.Index[float] + numpy array"""
43+
"""Test pd.Index[float] + numpy arrays"""
4444
b = np.array([True, False, True], np.bool_)
4545
i = np.array([2, 3, 5], np.int64)
4646
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/float/test_sub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_sub_py_scalar() -> None:
2727

2828

2929
def test_sub_py_sequence() -> None:
30-
"""Test pd.Index[float] - Python native sequence"""
30+
"""Test pd.Index[float] - Python native sequences"""
3131
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3232

3333
check(assert_type(left - b, "pd.Index[float]"), pd.Index, np.floating)
@@ -42,7 +42,7 @@ def test_sub_py_sequence() -> None:
4242

4343

4444
def test_sub_numpy_array() -> None:
45-
"""Test pd.Index[float] - numpy array"""
45+
"""Test pd.Index[float] - numpy arrays"""
4646
b = np.array([True, False, True], np.bool_)
4747
i = np.array([2, 3, 5], np.int64)
4848
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/int/test_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_add_py_scalar() -> None:
2525

2626

2727
def test_add_py_sequence() -> None:
28-
"""Test pd.Index[int] + Python native sequence"""
28+
"""Test pd.Index[int] + Python native sequences"""
2929
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3030

3131
check(assert_type(left + b, "pd.Index[int]"), pd.Index, np.integer)
@@ -40,7 +40,7 @@ def test_add_py_sequence() -> None:
4040

4141

4242
def test_add_numpy_array() -> None:
43-
"""Test pd.Index[int] + numpy array"""
43+
"""Test pd.Index[int] + numpy arrays"""
4444
b = np.array([True, False, True], np.bool_)
4545
i = np.array([2, 3, 5], np.int64)
4646
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/int/test_sub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_sub_py_scalar() -> None:
2727

2828

2929
def test_sub_py_sequence() -> None:
30-
"""Test pd.Index[int] - Python native sequence"""
30+
"""Test pd.Index[int] - Python native sequences"""
3131
b, i, f, c = [True, False, True], [2, 3, 5], [1.0, 2.0, 3.0], [1j, 1j, 4j]
3232

3333
check(assert_type(left - b, "pd.Index[int]"), pd.Index, np.integer)
@@ -42,7 +42,7 @@ def test_sub_py_sequence() -> None:
4242

4343

4444
def test_sub_numpy_array() -> None:
45-
"""Test pd.Index[int] - numpy array"""
45+
"""Test pd.Index[int] - numpy arrays"""
4646
b = np.array([True, False, True], np.bool_)
4747
i = np.array([2, 3, 5], np.int64)
4848
f = np.array([1.0, 2.0, 3.0], np.float64)

tests/indexes/arithmetic/str/test_add.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_add_py_scalar() -> None:
3232

3333

3434
def test_add_py_sequence() -> None:
35-
"""Test pd.Index[str] + Python native sequence"""
35+
"""Test pd.Index[str] + Python native sequences"""
3636
i = [3, 5, 8]
3737
r0 = ["a", "bc", "def"]
3838
r1 = tuple(r0)
@@ -49,7 +49,7 @@ def test_add_py_sequence() -> None:
4949

5050

5151
def test_add_numpy_array() -> None:
52-
"""Test pd.Index[str] + numpy array"""
52+
"""Test pd.Index[str] + numpy arrays"""
5353
i = np.array([3, 5, 8], np.int64)
5454
r0 = np.array(["a", "bc", "def"], np.str_)
5555

0 commit comments

Comments
 (0)