Skip to content

Commit f4f0e9a

Browse files
claudevdmClaude
andauthored
Skip test if no python interpreter. (#35486)
Co-authored-by: Claude <cvandermerwe@google.com>
1 parent 4dba4b3 commit f4f0e9a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

sdks/python/apache_beam/coders/coders_test_common.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import logging
2525
import math
2626
import pickle
27+
import subprocess
28+
import sys
2729
import textwrap
2830
import unittest
2931
from decimal import Decimal
@@ -610,6 +612,10 @@ def test_param_windowed_value_coder(self):
610612

611613
def test_cross_process_encoding_of_special_types_is_deterministic(self):
612614
"""Test cross-process determinism for all special deterministic types"""
615+
616+
if sys.executable is None:
617+
self.skipTest('No Python interpreter found')
618+
613619
# pylint: disable=line-too-long
614620
script = textwrap.dedent(
615621
'''\
@@ -711,9 +717,6 @@ def __eq__(self, other):
711717
''')
712718

713719
def run_subprocess():
714-
import subprocess
715-
import sys
716-
717720
result = subprocess.run([sys.executable, '-c', script],
718721
capture_output=True,
719722
timeout=30,

0 commit comments

Comments
 (0)