def __init__(self): """Taxonomy constructor.""" self.semantic = taxonomy_semantic.TaxonomySemantic() self.types = taxonomy_types.TaxonomyTypes() self.units = taxonomy_units.TaxonomyUnits() self.numeric_types = taxonomy_misc.TaxonomyNumericTypes() self.generic_roles = taxonomy_misc.TaxonomyGenericRoles() self.ref_parts = taxonomy_misc.TaxonomyRefParts()
# http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import unittest import taxonomy import taxonomy_semantic from six import string_types tax = taxonomy_semantic.TaxonomySemantic() class TestTaxonomySemantic(unittest.TestCase): def test_concept_info(self): # Data type checks ci = tax.concept_info("solar:ACDisconnectSwitchMember") self.assertIsNotNone(ci) self.assertIsInstance(ci.abstract, bool) self.assertIsInstance(ci.id, string_types) # 'six.string_types' is equivalent to "str or unicode" in python2, "str" in python3 self.assertIsInstance(ci.name, string_types) self.assertIsInstance(ci.nillable, bool) self.assertIsInstance(ci.period_independent, bool)
def __init__(self): self.semantic = taxonomy_semantic.TaxonomySemantic() self.types = taxonomy_types.TaxonomyTypes() self.units = taxonomy_units.TaxonomyUnits() self.misc = taxonomy_misc.TaxonomyMisc()
def __init__(self): """Taxonomy constructor.""" self.semantic = taxonomy_semantic.TaxonomySemantic() self.types = taxonomy_types.TaxonomyTypes() self.units = taxonomy_units.TaxonomyUnits() self.misc = taxonomy_misc.TaxonomyMisc()