Skip to content

Commit 062f5f7

Browse files
Daniel SaxtonDaniel Saxton
Daniel Saxton
authored and
Daniel Saxton
committed
Merge branch 'master' into na-cat
2 parents baab1d5 + 05ab8ba commit 062f5f7

File tree

10 files changed

+28
-19
lines changed

10 files changed

+28
-19
lines changed

pandas/_libs/src/inline_helper.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ The full license is in the LICENSE file, distributed with this software.
1111
#define PANDAS__LIBS_SRC_INLINE_HELPER_H_
1212

1313
#ifndef PANDAS_INLINE
14-
#if defined(__GNUC__)
14+
#if defined(__clang__)
15+
#define PANDAS_INLINE static __inline__ __attribute__ ((__unused__))
16+
#elif defined(__GNUC__)
1517
#define PANDAS_INLINE static __inline__
1618
#elif defined(_MSC_VER)
1719
#define PANDAS_INLINE static __inline

pandas/tests/frame/test_cumulative.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def test_cumprod(self, datetime_frame):
7575
df.cumprod(1)
7676

7777
@pytest.mark.xfail(
78-
_is_numpy_dev, reason="https://github.com/pandas-dev/pandas/issues/31992"
78+
_is_numpy_dev,
79+
reason="https://github.com/pandas-dev/pandas/issues/31992",
80+
strict=False,
7981
)
8082
def test_cummin(self, datetime_frame):
8183
datetime_frame.loc[5:10, 0] = np.nan
@@ -101,7 +103,9 @@ def test_cummin(self, datetime_frame):
101103
assert np.shape(cummin_xs) == np.shape(datetime_frame)
102104

103105
@pytest.mark.xfail(
104-
_is_numpy_dev, reason="https://github.com/pandas-dev/pandas/issues/31992"
106+
_is_numpy_dev,
107+
reason="https://github.com/pandas-dev/pandas/issues/31992",
108+
strict=False,
105109
)
106110
def test_cummax(self, datetime_frame):
107111
datetime_frame.loc[5:10, 0] = np.nan

pandas/tests/groupby/test_function.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,9 @@ def test_numpy_compat(func):
687687

688688

689689
@pytest.mark.xfail(
690-
_is_numpy_dev, reason="https://github.com/pandas-dev/pandas/issues/31992"
690+
_is_numpy_dev,
691+
reason="https://github.com/pandas-dev/pandas/issues/31992",
692+
strict=False,
691693
)
692694
def test_cummin_cummax():
693695
# GH 15048

pandas/tests/scalar/timedelta/test_arithmetic.py

+1
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def test_td_div_numeric_scalar(self):
386386
marks=pytest.mark.xfail(
387387
_is_numpy_dev,
388388
reason="https://github.com/pandas-dev/pandas/issues/31992",
389+
strict=False,
389390
),
390391
),
391392
float("nan"),

pandas/tests/series/test_cumulative.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ def test_cumprod(self, datetime_series):
3939
_check_accum_op("cumprod", datetime_series)
4040

4141
@pytest.mark.xfail(
42-
_is_numpy_dev, reason="https://github.com/pandas-dev/pandas/issues/31992"
42+
_is_numpy_dev,
43+
reason="https://github.com/pandas-dev/pandas/issues/31992",
44+
strict=False,
4345
)
4446
def test_cummin(self, datetime_series):
4547
tm.assert_numpy_array_equal(
@@ -54,7 +56,9 @@ def test_cummin(self, datetime_series):
5456
tm.assert_series_equal(result, expected)
5557

5658
@pytest.mark.xfail(
57-
_is_numpy_dev, reason="https://github.com/pandas-dev/pandas/issues/31992"
59+
_is_numpy_dev,
60+
reason="https://github.com/pandas-dev/pandas/issues/31992",
61+
strict=False,
5862
)
5963
def test_cummax(self, datetime_series):
6064
tm.assert_numpy_array_equal(

pandas/tests/test_downstream.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def import_module(name):
1919
try:
2020
return importlib.import_module(name)
2121
except ModuleNotFoundError: # noqa
22-
pytest.skip("skipping as {} not available".format(name))
22+
pytest.skip(f"skipping as {name} not available")
2323

2424

2525
@pytest.fixture

pandas/tests/test_multilevel.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -896,10 +896,10 @@ def test_stack_unstack_unordered_multiindex(self):
896896
values = np.arange(5)
897897
data = np.vstack(
898898
[
899-
["b{}".format(x) for x in values], # b0, b1, ..
900-
["a{}".format(x) for x in values],
899+
[f"b{x}" for x in values], # b0, b1, ..
900+
[f"a{x}" for x in values], # a0, a1, ..
901901
]
902-
) # a0, a1, ..
902+
)
903903
df = pd.DataFrame(data.T, columns=["b", "a"])
904904
df.columns.name = "first"
905905
second_level_dict = {"x": df}

pandas/tests/tools/test_numeric.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def test_really_large_in_arr_consistent(large_val, signed, multiple_elts, errors
308308

309309
if errors in (None, "raise"):
310310
index = int(multiple_elts)
311-
msg = "Integer out of range. at position {index}".format(index=index)
311+
msg = f"Integer out of range. at position {index}"
312312

313313
with pytest.raises(ValueError, match=msg):
314314
to_numeric(arr, **kwargs)

pandas/tests/tslibs/test_parse_iso8601.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_parsers_iso8601(date_str, exp):
5151
],
5252
)
5353
def test_parsers_iso8601_invalid(date_str):
54-
msg = 'Error parsing datetime string "{s}"'.format(s=date_str)
54+
msg = f'Error parsing datetime string "{date_str}"'
5555

5656
with pytest.raises(ValueError, match=msg):
5757
tslib._test_parse_iso8601(date_str)

pandas/tests/window/moments/test_moments_rolling.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ def get_result(obj, window, min_periods=None, center=False):
860860
tm.assert_series_equal(result, expected)
861861

862862
# shifter index
863-
s = ["x{x:d}".format(x=x) for x in range(12)]
863+
s = [f"x{x:d}" for x in range(12)]
864864

865865
if has_min_periods:
866866
minp = 10
@@ -1437,13 +1437,9 @@ def test_rolling_median_memory_error(self):
14371437
def test_rolling_min_max_numeric_types(self):
14381438

14391439
# GH12373
1440-
types_test = [np.dtype("f{}".format(width)) for width in [4, 8]]
1440+
types_test = [np.dtype(f"f{width}") for width in [4, 8]]
14411441
types_test.extend(
1442-
[
1443-
np.dtype("{}{}".format(sign, width))
1444-
for width in [1, 2, 4, 8]
1445-
for sign in "ui"
1446-
]
1442+
[np.dtype(f"{sign}{width}") for width in [1, 2, 4, 8] for sign in "ui"]
14471443
)
14481444
for data_type in types_test:
14491445
# Just testing that these don't throw exceptions and that

0 commit comments

Comments
 (0)