From fe6bc6999c22f42d5b5b015fccec754f2c00d147 Mon Sep 17 00:00:00 2001 From: Siddharth Shukla Date: Wed, 15 Feb 2017 20:18:20 +0100 Subject: [PATCH] Skip split_definitions_test if PyPy Skip SameSeparateTest, SameCommonTest, SplitCommonTest, and SplitSeparateTest if the interpreter is PyPy. --- .../tests/protoc_plugin/_split_definitions_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py index db938e65459..6f9269dd402 100644 --- a/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py +++ b/src/python/grpcio_tests/tests/protoc_plugin/_split_definitions_test.py @@ -42,6 +42,7 @@ import sys import tempfile import threading import unittest +import platform import grpc from grpc_tools import protoc @@ -150,6 +151,8 @@ class CommonTestMixin(object): self.assertEqual(expected_response, response) +@unittest.skipIf(platform.python_implementation() == "PyPy", + "Skip test if run with PyPy") class SameSeparateTest(unittest.TestCase, SeparateTestMixin): def setUp(self): @@ -191,6 +194,8 @@ class SameSeparateTest(unittest.TestCase, SeparateTestMixin): shutil.rmtree(self.directory) +@unittest.skipIf(platform.python_implementation() == "PyPy", + "Skip test if run with PyPy") class SameCommonTest(unittest.TestCase, CommonTestMixin): def setUp(self): @@ -228,6 +233,8 @@ class SameCommonTest(unittest.TestCase, CommonTestMixin): shutil.rmtree(self.directory) +@unittest.skipIf(platform.python_implementation() == "PyPy", + "Skip test if run with PyPy") class SplitCommonTest(unittest.TestCase, CommonTestMixin): def setUp(self): @@ -277,6 +284,8 @@ class SplitCommonTest(unittest.TestCase, CommonTestMixin): shutil.rmtree(self.directory) +@unittest.skipIf(platform.python_implementation() == "PyPy", + "Skip test if run with PyPy") class SplitSeparateTest(unittest.TestCase, SeparateTestMixin): def setUp(self):