code: def test_should_raise_error_if_categorical_value_is_not_string(self):
      with self.assertRaises(ValueError):
          models.DataDictionary(
              dataFields=[
                  models.DataField(
                      name="toto0",
                      optype=models.OpType.categorical,
                      dataType=models.DataType.float,
                      values=[models.Value(value="unexpected")],
                  )
              ]
          )
      with self.assertRaises(ValueError):
          models.DataDictionary(
              dataFields=[
                  models.DataField(
                      name="toto0",
                      optype=models.OpType.continuous,
                      dataType=models.DataType.string,
                      values=[models.Value(value="unexpected")],
                  )
              ]
          )
  
file_path: AIX360/tests/rule_induction/trxf/pmml_export/test_nyoka_serialize_common.py
imports: import datetime
  from unittest import TestCase
  import nyoka.base.constants
  import xmltodict
  import aix360.algorithms.rule_induction.trxf.pmml_export.models
  import aix360.algorithms.rule_induction.trxf.pmml_export.serializer
label_desc: Use image node_id 3 for calling the TestNyokaSerializer obj's underlying member method code with example usage: obj.test_should_raise_error_if_categorical_value_is_not_string() without return types