Skip to content

Commit e9661da

Browse files
committed
Ignore minor version (breaks for RC version)
1 parent 184378d commit e9661da

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sdks/python/apache_beam/dataframe/frames_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
from apache_beam.dataframe import frame_base
2626
from apache_beam.dataframe import frames
2727

28-
PD_VERSION = tuple(map(int, pd.__version__.split('.')))
28+
# Get major, minor version
29+
PD_VERSION = tuple(map(int, pd.__version__.split('.')[0:2]))
2930

3031
GROUPBY_DF = pd.DataFrame({
3132
'group': ['a' if i % 5 == 0 or i % 3 == 0 else 'b' for i in range(100)],

sdks/python/apache_beam/dataframe/pandas_doctests_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ def test_series_tests(self):
494494
self.assertEqual(result.failed, 0)
495495

496496
def test_string_tests(self):
497-
PD_VERSION = tuple(int(v) for v in pd.__version__.split('.'))
498-
if PD_VERSION < (1, 2, 0):
497+
PD_VERSION = tuple(int(v) for v in pd.__version__.split('.')[:2])
498+
if PD_VERSION < (1, 2):
499499
module = pd.core.strings
500500
else:
501501
# Definitions were moved to accessor in pandas 1.2.0

0 commit comments

Comments
 (0)