<commit_before>import pytest

from ..src import galena


class Health(galena.Component):
    health = 1


class Velocity(galena.Component):
    required_components = (Health,)

    speed = 10
    direction = 180


class TestEntity:
    @staticmethod
    def test_create_entity():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

        assert test_entity == test_galena._uid

    @staticmethod
    def test_entity_exists():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

        assert test_galena.entity_exists(test_entity)
        assert not test_galena.entity_exists(test_galena._uid + 1)

    @staticmethod
    def test_remove_entity():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()
<commit_msg>Add a test for the 'reset' method<commit_after>import pytest

from ..src import galena


class Health(galena.Component):
    health = 1


class Velocity(galena.Component):
    required_components = (Health,)

    speed = 10
    direction = 180


class TestGalena:
    @staticmethod
    def test_reset():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

        test_galena.add_component_to_entity(Health(), test_entity)

        test_galena.reset()

        assert len(test_galena._entities) == 0
        assert len(test_galena._components) == 0


class TestEntity:
    @staticmethod
    def test_create_entity():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

        assert test_entity == test_galena._uid

    @staticmethod
    def test_entity_exists():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

        assert test_galena.entity_exists(test_entity)
        assert not test_galena.entity_exists(test_galena._uid + 1)

    @staticmethod
    def test_remove_entity():
        test_galena = galena.Galena()
        test_entity = test_galena.create_entity()

{'fraction_non_alphanumeric': 0.0845771144278607, 'fraction_numerical': 0.007960199004975124, 'mean_word_length': 3.0544354838709675, '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': '471930', 'n_tokens_mistral': 656, 'n_tokens_neox': 612, 'n_words': 124}