<commit_before>
from __future__ import absolute_import
from gaphor.tests.testcase import TestCase
from gaphor.storage.verify import orphan_references
from gaphor import UML


class VerifyTestCase(TestCase):

    def test_verifier(self):
        factory = self.element_factory
        c = factory.create(UML.Class)
        p = factory.create(UML.Property)
        c.ownedAttribute = p

        assert not orphan_references(factory)

        # Now create a separate item, not part of the factory:

        m = UML.Comment(id="acd123")
        m.annotatedElement = c<commit_msg>Import updates to change UML to uml2<commit_after>
from __future__ import absolute_import
from gaphor.tests.testcase import TestCase
from gaphor.storage.verify import orphan_references
from gaphor.UML import uml2


class VerifyTestCase(TestCase):

    def test_verifier(self):
        factory = self.element_factory
        c = factory.create(uml2.Class)
        p = factory.create(uml2.Property)
        c.ownedAttribute = p

        assert not orphan_references(factory)

        # Now create a separate item, not part of the factory:

        m = uml2.Comment(id="acd123")
        m.annotatedElement = c
{'fraction_non_alphanumeric': 0.07027942421676546, 'fraction_numerical': 0.009314140558848433, 'mean_word_length': 3.1619718309859155, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5983210', 'n_tokens_mistral': 355, 'n_tokens_neox': 338, 'n_words': 97}