コード例 #1
0
    def test_equality_true(self):
        # arrange
        schema = SchemaDefinition.empty()
        another_schema = SchemaDefinition.empty()

        # act / assert
        self.assertEqual(schema, another_schema)
コード例 #2
0
    def test_equality_inferred(self):
        # arrange
        schema = SchemaDefinition.empty()
        another_schema = SchemaDefinition.empty()
        another_schema.is_schema_inferred = True

        # act / assert
        self.assertNotEqual(schema, another_schema)
コード例 #3
0
    def test_equality_content(self):
        # arrange
        schema = SchemaDefinition.empty()
        another_schema = SchemaDefinition.empty()
        another_schema.schema_content = "another schema content"

        # act / assert
        self.assertNotEqual(schema, another_schema)
コード例 #4
0
    def test_integrity_without_provided_schema(self) -> None:
        # arrange
        samples, _ = DataLoader.create_dummy_samples()

        # act
        empty_schema = SchemaDefinition.empty()
        result = self.inspector.inspect(samples, empty_schema)

        # assert
        self.assertEqual(1.0, result.attribute_integrity)
        self.assertEqual(.0, result.attribute_specification)
        self.assertEqual(.5, result.attribute_quality_index)