Skip to content

Commit 820d96a

Browse files
committed
skip failure
1 parent be59c80 commit 820d96a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

python/pyspark/sql/tests/streaming/test_streaming.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
#
1717

1818
import os
19+
import platform
1920
import shutil
2021
import tempfile
2122
import time
23+
import unittest
2224

2325
from pyspark.sql import Row
2426
from pyspark.sql.functions import lit
@@ -503,6 +505,9 @@ def test_streaming_drop_duplicate_within_watermark(self):
503505
self.assertTrue(len(result) >= 6 and len(result) <= 9)
504506

505507

508+
@unittest.skipIf(
509+
"pypy" in platform.python_implementation().lower(), "cannot run in environment pypy"
510+
)
506511
class StreamingTests(StreamingTestsMixin, ReusedSQLTestCase):
507512
def _assert_exception_tree_contains_msg(self, exception, msg):
508513
e = exception
@@ -514,7 +519,6 @@ def _assert_exception_tree_contains_msg(self, exception, msg):
514519

515520

516521
if __name__ == "__main__":
517-
import unittest
518522
from pyspark.sql.tests.streaming.test_streaming import * # noqa: F401
519523

520524
try:

python/pyspark/streaming/tests/test_context.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@
1515
# limitations under the License.
1616
#
1717
import os
18+
import platform
1819
import struct
1920
import tempfile
2021
import time
22+
import unittest
2123

2224
from pyspark.streaming import StreamingContext
2325
from pyspark.testing.streamingutils import PySparkStreamingTestCase
2426

2527

28+
@unittest.skipIf(
29+
"pypy" in platform.python_implementation().lower(), "cannot run in environment pypy"
30+
)
2631
class StreamingContextTests(PySparkStreamingTestCase):
2732
duration = 0.1
2833
setupCalled = False
@@ -171,7 +176,6 @@ def test_await_termination_or_timeout(self):
171176

172177

173178
if __name__ == "__main__":
174-
import unittest
175179
from pyspark.streaming.tests.test_context import * # noqa: F401
176180

177181
try:

0 commit comments

Comments
 (0)