<commit_before>"""
Run with:
python2.7 -m unittest discover tests
"""
import json
import unittest

from areas.level import Level
from managers.game_manager import GameManager
from characters.character import Character
from components.stats import CharacterStats


class DungeonTestCase(unittest.TestCase):

    def setUp(self):
        self.game_manager = GameManager()
        level = Level()
        level.name = "DEFAULT"
        level.min_room_size = 1
        level.max_room_size = 10
        level.max_rooms = 10
        level.width = 80
        level.height = 45

        self.game_manager.game_context.player = self.game_manager.game_context.character_factory.create(
            "test", "warrior", "human", CharacterStats(), "humanoid")
        self.game_manager.init_dungeon(level)
        self.level = level

    def tearDown(self):
        self.game_manager.console_manager._close_font()

    def test_generate_dungeon(self):
        self.assertEqual(self.level.name, "DEFAULT")

    def test_dungeon_contains_player(self):
        player = self.game_manager.game_context.player
        self.assertEqual(player.current_level, self.level)
        self.assertFalse(player.is_dead())<commit_msg>Cleanup tests so Travis is happy<commit_after>"""
Run with:
python2.7 -m unittest discover tests
"""
import json
import unittest

from areas.level import Level
from managers.game_manager import GameManager
from characters.character import Character
from components.stats import Stats


class DungeonTestCase(unittest.TestCase):

    def setUp(self):
        self.game_manager = GameManager()
        level = Level()
        level.name = "DEFAULT"
        level.min_room_size = 1
        level.max_room_size = 10
        level.max_rooms = 10
        level.width = 80
        level.height = 45

        self.game_manager.game_context.player = self.game_manager.game_context.character_factory.create(
            "test", "warrior", "human", Stats(), "humanoid")
        self.game_manager.init_dungeon(level)
        self.level = level

    def tearDown(self):
        self.game_manager.console_manager._close_font()

    def test_generate_dungeon(self):
        self.assertEqual(self.level.name, "DEFAULT")

    def test_dungeon_contains_player(self):
        player = self.game_manager.game_context.player
        self.assertEqual(player.current_level, self.level)
        self.assertFalse(player.is_dead())
{'fraction_non_alphanumeric': 0.09298464092984642, 'fraction_numerical': 0.0091324200913242, 'mean_word_length': 3.1840277777777777, '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': '3061496', 'n_tokens_mistral': 718, 'n_tokens_neox': 684, 'n_words': 148}