<commit_before># -*- coding: UTF-8 -*-
# Copyright (C) 2008-2010 by <NAME>.  See LICENSE.txt for terms of usage.

from unittest import TestCase
from ..testing import get_blk_from_oblique_neu, get_blk_from_sample_neu

class TestCreation(TestCase):
    def test_import(self):
        from ..block import Block

    def test_create_block(self):
        from ..block import Block
        blk = Block()
        self.assertEqual(str(blk),
            '[Block (0D): 0 nodes, 0 faces (0 BC), 0 cells]')

    def test_use_incenter(self):
        from ..block import Block
        blk = Block()
        self.assertFalse(blk.use_incenter)
        blk = Block(use_incenter=True)
        self.assertTrue(blk.use_incenter)<commit_msg>Add tests for block printing string.<commit_after># -*- coding: UTF-8 -*-
# Copyright (C) 2008-2010 by <NAME>.  See LICENSE.txt for terms of usage.

from unittest import TestCase
from ..testing import get_blk_from_oblique_neu, get_blk_from_sample_neu

class TestCreation(TestCase):
    def test_import(self):
        from ..block import Block

    def test_use_centroid_default(self):
        from ..block import Block
        blk = Block()
        self.assertFalse(blk.use_incenter)
        self.assertEqual(str(blk),
            '[Block (0D/centroid): 0 nodes, 0 faces (0 BC), 0 cells]')

    def test_use_centroid(self):
        from ..block import Block
        blk = Block(use_incenter=False)
        self.assertFalse(blk.use_incenter)
        self.assertEqual(str(blk),
            '[Block (0D/centroid): 0 nodes, 0 faces (0 BC), 0 cells]')

    def test_use_incenter(self):
        from ..block import Block
        blk = Block(use_incenter=True)
        self.assertTrue(blk.use_incenter)
        self.assertEqual(str(blk),
            '[Block (0D/incenter): 0 nodes, 0 faces (0 BC), 0 cells]')
{'fraction_non_alphanumeric': 0.11092806150466776, 'fraction_numerical': 0.02086765513454146, 'mean_word_length': 2.748971193415638, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4122613', 'n_tokens_mistral': 595, 'n_tokens_neox': 560, 'n_words': 157}