Skip to content

Commit

Permalink
[hotfix][python] Fix the bug of test base class runs twice
Browse files Browse the repository at this point in the history
  • Loading branch information
sunjincheng121 committed May 20, 2019
1 parent b3604f7 commit f3cf76b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 3 additions & 1 deletion flink-python/pyflink/table/tests/test_table_completeness.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
5 changes: 2 additions & 3 deletions flink-python/pyflink/testing/test_case_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def collect(self, table):
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.
Expand Down Expand Up @@ -196,5 +196,4 @@ def excluded_methods(cls):
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()

0 comments on commit f3cf76b

Please sign in to comment.