Skip to content

Commit 2e91850

Browse files
committed
Skip failing tests (due to gcc bug)
1 parent 3e68646 commit 2e91850

File tree

2 files changed

+48
-3
lines changed

2 files changed

+48
-3
lines changed

cpp/src/arrow/compute/kernels/scalar_temporal_test.cc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,12 @@ TEST_F(ScalarTemporalTest, TestIsLeapYear) {
709709
}
710710

711711
TEST_F(ScalarTemporalTest, TestZoned1) {
712+
// TODO(GH-48743): Re-enable when GCC bug is fixed
713+
// https://github.com/apache/arrow/issues/48743
714+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
715+
#if defined(_WIN32) && !ARROW_USE_STD_CHRONO
716+
GTEST_SKIP() << "Test triggers GCC bug TODO(GH-48743).";
717+
#endif
712718
std::vector<std::string> timezones = {"Pacific/Marquesas", "-09:30"};
713719
for (const auto& timezone : timezones) {
714720
auto unit = timestamp(TimeUnit::NANO, timezone);
@@ -807,6 +813,12 @@ TEST_F(ScalarTemporalTest, TestZoned1) {
807813
}
808814

809815
TEST_F(ScalarTemporalTest, TestZoned2) {
816+
// TODO(GH-48743): Re-enable when GCC bug is fixed
817+
// https://github.com/apache/arrow/issues/48743
818+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
819+
#if defined(_WIN32) && !ARROW_USE_STD_CHRONO
820+
GTEST_SKIP() << "Test triggers GCC bug TODO(GH-48743).";
821+
#endif
810822
for (auto u : TimeUnit::values()) {
811823
auto unit = timestamp(u, "Australia/Broken_Hill");
812824
auto month = "[1, 3, 1, 5, 1, 12, 12, 12, 1, 1, 1, 1, 12, 12, 12, 1, null]";
@@ -2768,6 +2780,12 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, CeilUTC) {
27682780
}
27692781

27702782
TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, CeilZoned) {
2783+
// TODO(GH-48743): Re-enable when GCC bug is fixed
2784+
// https://github.com/apache/arrow/issues/48743
2785+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
2786+
#if defined(_WIN32) && !ARROW_USE_STD_CHRONO
2787+
GTEST_SKIP() << "Test triggers GCC bug TODO(GH-48743).";
2788+
#endif
27712789
std::string op = "ceil_temporal";
27722790

27732791
// Data for tests below was generated via lubridate with the exception
@@ -3158,6 +3176,12 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, FloorUTC) {
31583176
}
31593177

31603178
TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, FloorZoned) {
3179+
// TODO(GH-48743): Re-enable when GCC bug is fixed
3180+
// https://github.com/apache/arrow/issues/48743
3181+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
3182+
#if defined(_WIN32) && !ARROW_USE_STD_CHRONO
3183+
GTEST_SKIP() << "Test triggers GCC bug TODO(GH-48743).";
3184+
#endif
31613185
std::string op = "floor_temporal";
31623186

31633187
// Data for tests below was generated via lubridate with the exception
@@ -3591,6 +3615,12 @@ TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, RoundUTC) {
35913615
}
35923616

35933617
TEST_F(ScalarTemporalTestMultipleSinceGreaterUnit, RoundZoned) {
3618+
// TODO(GH-48743): Re-enable when GCC bug is fixed
3619+
// https://github.com/apache/arrow/issues/48743
3620+
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
3621+
#if defined(_WIN32) && !ARROW_USE_STD_CHRONO
3622+
GTEST_SKIP() << "Test triggers GCC bug TODO(GH-48743).";
3623+
#endif
35943624
std::string op = "round_temporal";
35953625

35963626
// Data for tests below was generated via lubridate with the exception

python/pyarrow/tests/test_compute.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,9 +2317,17 @@ def test_strftime():
23172317
for fmt in formats:
23182318
options = pc.StrftimeOptions(fmt)
23192319
result = pc.strftime(tsa, options=options)
2320-
# cast to the same type as result to ignore string vs large_string
23212320
expected = pa.array(ts.strftime(fmt)).cast(result.type)
2322-
assert result.equals(expected)
2321+
if sys.platform == "win32" and fmt == "%Z":
2322+
# TODO(GH-45254): On Windows, std::chrono returns GMT
2323+
# offset style (e.g. "GMT+1") instead of timezone
2324+
# abbreviations (e.g. "CET")
2325+
# https://github.com/apache/arrow/issues/48743
2326+
for val in result:
2327+
assert val.as_py() is None or val.as_py().startswith("GMT") \
2328+
or val.as_py() == "UTC"
2329+
else:
2330+
assert result.equals(expected)
23232331

23242332
fmt = "%Y-%m-%dT%H:%M:%S"
23252333

@@ -2550,7 +2558,9 @@ def test_assume_timezone():
25502558
pc.assume_timezone(ta_zoned, options=options)
25512559

25522560
invalid_options = pc.AssumeTimezoneOptions("Europe/Brusselsss")
2553-
with pytest.raises(ValueError, match="not found in timezone database"):
2561+
with pytest.raises(ValueError,
2562+
match="not found in timezone database|"
2563+
"unable to locate time_zone"):
25542564
pc.assume_timezone(ta, options=invalid_options)
25552565

25562566
timezone = "Europe/Brussels"
@@ -2705,6 +2715,11 @@ def _check_temporal_rounding(ts, values, unit):
27052715
np.testing.assert_array_equal(result, expected)
27062716

27072717

2718+
# TODO(GH-45254): Re-enable when GCC bug is fixed
2719+
# https://github.com/apache/arrow/issues/48743
2720+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116110
2721+
@pytest.mark.skipif(sys.platform == 'win32',
2722+
reason="Test triggers GCC timezone bug on Windows")
27082723
@pytest.mark.timezone_data
27092724
@pytest.mark.parametrize('unit', ("nanosecond", "microsecond", "millisecond",
27102725
"second", "minute", "hour", "day"))

0 commit comments

Comments
 (0)