# Path: tensorflow_transform/test_case.py
# def is_tf_api_version_1():
# def cross_named_parameters(*args):
#   def _cross_test_cases(parameters_list):
# def parameters(*testcases):
#   def wrapper(fn):
#     def to_arg_dict(testcase):
# def cross_parameters(*args):
# def _make_placeholder(tensor_spec):
# def _graph_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_graph(*inputs):
# def _ragged_value_as_constant(value, dtype):
# def _wrap_as_constant(value, tensor_spec):
# def _eager_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_eagerly(*inputs):  # pylint: disable=missing-docstring
# def _tf_function_function_handler(input_signature):
#   def wrapper(fn):
# def is_external_environment():
# def skip_if_external_environment(reason):
# def skip_if_not_tf2(reason):
# def cross_with_function_handlers(parameters_list):
#   def assertDataCloseOrEqual(self, a_data, b_data):
#   def _assertValuesCloseOrEqual(self, a_value, b_value, msg=None):
#   def AssertVocabularyContents(self, vocab_file_path, file_contents):
#   def WriteRenderedDotFile(self, dot_string, output_file=None):
#   def _NumpyArraysToLists(self, maybe_arrays):
#   def _SortedDicts(self, list_of_dicts):
#   def _SortedData(self, list_of_dicts_of_arrays):
# FUNCTION_HANDLERS = [
#     dict(testcase_name='graph',
#          function_handler=_graph_function_handler),
#     dict(testcase_name='eager',
#          function_handler=_eager_function_handler),
#     dict(testcase_name='tf_function',
#          function_handler=_tf_function_function_handler)
# ]
# class TransformTestCase(parameterized.TestCase, tf.test.TestCase):


import re
import unittest
from tensorflow_transform import test_case

class TftUnitTest(test_case.TransformTestCase):

  def testCrossNamedParameters(self):
    test_cases_1 = [
        {'testcase_name': 'a_1_b_1', 'a': 1, 'b': 1},
        {'testcase_name': 'a_3_b_3', 'a': 3, 'b': 3},
    ]
    test_cases_2 = [
        {'testcase_name': 'c_2', 'c': 2},
        {'testcase_name': 'c_4', 'c': 4},
    ]
    expected_cross = [
        {'testcase_name': 'a_1_b_1_c_2', 'a': 1, 'b': 1, 'c': 2},
        {'testcase_name': 'a_1_b_1_c_4', 'a': 1, 'b': 1, 'c': 4},
        {'testcase_name': 'a_3_b_3_c_2', 'a': 3, 'b': 3, 'c': 2},
        {'testcase_name': 'a_3_b_3_c_4', 'a': 3, 'b': 3, 'c': 4},
    ]
    self.assertEqual(
        test_case.cross_named_parameters(test_cases_1, test_cases_2),
        expected_cross)

  def testCrossParameters(self):
    test_cases_1 = [('a', 1), ('b', 2)]
    test_cases_2 = [(True,), (False,)]
    expected_cross = [
        ('a', 1, True), ('b', 2, True),
        ('a', 1, False), ('b', 2, False),
    ]
    self.assertCountEqual(

# Path: tensorflow_transform/test_case.py
# def is_tf_api_version_1():
# def cross_named_parameters(*args):
#   def _cross_test_cases(parameters_list):
# def parameters(*testcases):
#   def wrapper(fn):
#     def to_arg_dict(testcase):
# def cross_parameters(*args):
# def _make_placeholder(tensor_spec):
# def _graph_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_graph(*inputs):
# def _ragged_value_as_constant(value, dtype):
# def _wrap_as_constant(value, tensor_spec):
# def _eager_function_handler(input_signature):
#   def wrapper(fn):
#     def _run_eagerly(*inputs):  # pylint: disable=missing-docstring
# def _tf_function_function_handler(input_signature):
#   def wrapper(fn):
# def is_external_environment():
# def skip_if_external_environment(reason):
# def skip_if_not_tf2(reason):
# def cross_with_function_handlers(parameters_list):
#   def assertDataCloseOrEqual(self, a_data, b_data):
#   def _assertValuesCloseOrEqual(self, a_value, b_value, msg=None):
#   def AssertVocabularyContents(self, vocab_file_path, file_contents):
#   def WriteRenderedDotFile(self, dot_string, output_file=None):
#   def _NumpyArraysToLists(self, maybe_arrays):
#   def _SortedDicts(self, list_of_dicts):
#   def _SortedData(self, list_of_dicts_of_arrays):
# FUNCTION_HANDLERS = [
#     dict(testcase_name='graph',
#          function_handler=_graph_function_handler),
#     dict(testcase_name='eager',
#          function_handler=_eager_function_handler),
#     dict(testcase_name='tf_function',
#          function_handler=_tf_function_function_handler)
# ]
# class TransformTestCase(parameterized.TestCase, tf.test.TestCase):


# Path: tensorflow_transform/test_case_test.py
import re
import unittest
from tensorflow_transform import test_case


class TftUnitTest(test_case.TransformTestCase):

  def testCrossNamedParameters(self):
    test_cases_1 = [
        {'testcase_name': 'a_1_b_1', 'a': 1, 'b': 1},
        {'testcase_name': 'a_3_b_3', 'a': 3, 'b': 3},
    ]
    test_cases_2 = [
        {'testcase_name': 'c_2', 'c': 2},
        {'testcase_name': 'c_4', 'c': 4},
    ]
    expected_cross = [
        {'testcase_name': 'a_1_b_1_c_2', 'a': 1, 'b': 1, 'c': 2},
        {'testcase_name': 'a_1_b_1_c_4', 'a': 1, 'b': 1, 'c': 4},
        {'testcase_name': 'a_3_b_3_c_2', 'a': 3, 'b': 3, 'c': 2},
        {'testcase_name': 'a_3_b_3_c_4', 'a': 3, 'b': 3, 'c': 4},
    ]
    self.assertEqual(
        test_case.cross_named_parameters(test_cases_1, test_cases_2),
        expected_cross)

  def testCrossParameters(self):
    test_cases_1 = [('a', 1), ('b', 2)]
    test_cases_2 = [(True,), (False,)]
    expected_cross = [
        ('a', 1, True), ('b', 2, True),
        ('a', 1, False), ('b', 2, False),
    ]
    self.assertCountEqual(

        test_case.cross_parameters(test_cases_1, test_cases_2), expected_cross)