# Path: turkish_morphology/validate.py
# class IllformedAnalysisError(Exception):
# def _root(root: _Root) -> None:
# def _feature(feature: _Feature) -> None:
# def _affix(affix: _Affix, derivational: Optional[bool] = False) -> None:
# def _inflectional_group(ig: _Ig, position: int) -> None:
# def analysis(analysis: _Analysis) -> None:


import os
from turkish_morphology import analysis_pb2
from turkish_morphology import validate
from absl.testing import absltest
from absl.testing import parameterized
from google.protobuf import text_format
      },
      {
          "testcase_name": "FeatureEmptyCategory",
          "basename": "invalid_feature_empty_category",
          "message": "Feature category is empty",
      },
      {
          "testcase_name": "FeatureMissingValue",
          "basename": "invalid_feature_missing_value",
          "message": "Feature is missing value",
      },
      {
          "testcase_name": "FeatureEmptyValue",
          "basename": "invalid_feature_empty_value",
          "message": "Feature value is empty",
      },
      {
          "testcase_name": "RootMissingMorpheme",
          "basename": "invalid_root_missing_morpheme",
          "message": "Root is missing morpheme",
      },
      {
          "testcase_name": "RootEmptyMorpheme",
          "basename": "invalid_root_empty_morpheme",
          "message": "Root morpheme is empty",
      },
  ])
  def test_raises_exception(self, basename, message):
    analysis = _read_analysis(basename)


# Path: turkish_morphology/validate.py
# class IllformedAnalysisError(Exception):
# def _root(root: _Root) -> None:
# def _feature(feature: _Feature) -> None:
# def _affix(affix: _Affix, derivational: Optional[bool] = False) -> None:
# def _inflectional_group(ig: _Ig, position: int) -> None:
# def analysis(analysis: _Analysis) -> None:


# Path: turkish_morphology/validate_test.py
import os
from turkish_morphology import analysis_pb2
from turkish_morphology import validate
from absl.testing import absltest
from absl.testing import parameterized
from google.protobuf import text_format

      },
      {
          "testcase_name": "FeatureEmptyCategory",
          "basename": "invalid_feature_empty_category",
          "message": "Feature category is empty",
      },
      {
          "testcase_name": "FeatureMissingValue",
          "basename": "invalid_feature_missing_value",
          "message": "Feature is missing value",
      },
      {
          "testcase_name": "FeatureEmptyValue",
          "basename": "invalid_feature_empty_value",
          "message": "Feature value is empty",
      },
      {
          "testcase_name": "RootMissingMorpheme",
          "basename": "invalid_root_missing_morpheme",
          "message": "Root is missing morpheme",
      },
      {
          "testcase_name": "RootEmptyMorpheme",
          "basename": "invalid_root_empty_morpheme",
          "message": "Root morpheme is empty",
      },
  ])
  def test_raises_exception(self, basename, message):
    analysis = _read_analysis(basename)


    with self.assertRaisesRegexp(validate.IllformedAnalysisError, message):