You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ji...@apache.org on 2019/05/20 09:07:16 UTC
[flink] branch master updated: [hotfix][python] Fix the bug of test
base class runs twice
This is an automated email from the ASF dual-hosted git repository.
jincheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new f3cf76b [hotfix][python] Fix the bug of test base class runs twice
f3cf76b is described below
commit f3cf76bd5442325bdd29fd128bf4e23769b5dccd
Author: sunjincheng121 <su...@gmail.com>
AuthorDate: Mon May 20 17:06:48 2019 +0800
[hotfix][python] Fix the bug of test base class runs twice
---
flink-python/pyflink/table/tests/test_environment_completeness.py | 4 +++-
flink-python/pyflink/table/tests/test_table_completeness.py | 4 +++-
flink-python/pyflink/testing/test_case_utils.py | 5 ++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/flink-python/pyflink/table/tests/test_environment_completeness.py b/flink-python/pyflink/table/tests/test_environment_completeness.py
index 136c7a0..d0bfaf8 100644
--- a/flink-python/pyflink/table/tests/test_environment_completeness.py
+++ b/flink-python/pyflink/table/tests/test_environment_completeness.py
@@ -16,11 +16,13 @@
# limitations under the License.
################################################################################
+import unittest
+
from pyflink.testing.test_case_utils import PythonAPICompletenessTestCase
from pyflink.table import TableEnvironment
-class EnvironmentAPICompletenessTests(PythonAPICompletenessTestCase):
+class EnvironmentAPICompletenessTests(PythonAPICompletenessTestCase, unittest.TestCase):
"""
Tests whether the Python :class:`TableEnvironment` is consistent with
Java `org.apache.flink.table.api.TableEnvironment`.
diff --git a/flink-python/pyflink/table/tests/test_table_completeness.py b/flink-python/pyflink/table/tests/test_table_completeness.py
index 3e366f0..7fe83c9 100644
--- a/flink-python/pyflink/table/tests/test_table_completeness.py
+++ b/flink-python/pyflink/table/tests/test_table_completeness.py
@@ -16,11 +16,13 @@
# limitations under the License.
################################################################################
+import unittest
+
from pyflink.testing.test_case_utils import PythonAPICompletenessTestCase
from pyflink.table import Table
-class TableAPICompletenessTests(PythonAPICompletenessTestCase):
+class TableAPICompletenessTests(PythonAPICompletenessTestCase, unittest.TestCase):
"""
Tests whether the Python :class:`Table` is consistent with
Java `org.apache.flink.table.api.Table`.
diff --git a/flink-python/pyflink/testing/test_case_utils.py b/flink-python/pyflink/testing/test_case_utils.py
index 78819db..57a1340 100644
--- a/flink-python/pyflink/testing/test_case_utils.py
+++ b/flink-python/pyflink/testing/test_case_utils.py
@@ -124,7 +124,7 @@ class PyFlinkBatchTableTestCase(PyFlinkTestCase):
return string_result
-class PythonAPICompletenessTestCase(unittest.TestCase):
+class PythonAPICompletenessTestCase(object):
"""
Base class for Python API completeness tests, i.e.,
Python API should be aligned with the Java API as much as possible.
@@ -196,5 +196,4 @@ class PythonAPICompletenessTestCase(unittest.TestCase):
return {}
def test_completeness(self):
- if self.python_class() is not None and self.java_class() is not None:
- self.check_methods()
+ self.check_methods()