<commit_before># This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#

from cocos.interfaces import *

class AddMe( object ):
    def __init__( self, value ):
        self.value = value

    def __repr__( self ):
        return str(self.value)

def test_add():
    c = IContainer()
    for i in range(7):
        c.add( AddMe(i ) )

    expected_result = [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6)]
    assert repr(c.children) == repr(expected_result)

def test_add_z_name():
    c = IContainer()
    for i in range(7):
        c.add( AddMe(i),z=i%3,name="%s" % i)

    expected_result = [(0, 0), (0, 3), (0, 6), (1, 1), (1, 4), (2, 2), (2, 5)]
    assert repr(c.children) == repr(expected_result)

def test_remove():
    c = IContainer()
    f = AddMe(99)
    for i in range(7):
        c.add( AddMe(i),z=i%3,name="%s" % i)
    c.add(f,z=1)
    c.remove(f)
    expected_result = [(0, 0), (0, 3), (0, 6), (1, 1), (1, 4), (2, 2), (2, 5)]
    assert repr(c.children) == repr(expected_result)

def test_remove_by_name():
    c = IContainer()
    for i in range(7):
        c.add(AddMe(i),z=i%3,name="%s" % i)
    c.remove_by_name('5')
    expected_result = [(0, 0), (0, 3), (0, 6), (1, 1), (1, 4), (2, 2)]
    assert repr(c.children) == repr(expected_result)

def test_add_unsupported_types():
    try:<commit_msg>works<commit_after># This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#

from cocos.interfaces import *

class AddMe( object ):
    def __init__( self, value ):
        self.value = value

    def __repr__( self ):
        return str(self.value)

def test_add():
    c = IContainer()
    for i in range(7):
        c.add( AddMe(i ) )

    expected_result = [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6)]
    assert repr(c.children) == repr(expected_result)

def test_add_z_name():
    c = IContainer()
    for i in range(7):
        c.add( AddMe(i),z=i%3,name="%s" % i)

    expected_result = [(0, 0), (0, 3), (0, 6), (1, 1), (1, 4), (2, 2), (2, 5)]
    assert repr(c.children) == repr(expected_result)

def test_remove():
    c = IContainer()
    f = AddMe(99)
    for i in range(7):
        c.add( AddMe(i),z=i%3,name="%s" % i)
    c.add(f,z=1)
    c.remove(f)
    expected_result = [(0, 0), (0, 3), (0, 6), (1, 1), (1, 4), (2, 2), (2, 5)]
    assert repr(c.children) == repr(expected_result)

def test_remove_by_name():
    c = IContainer()
    for i in range(7):
        c.add(AddMe(i),z=i%3,name="%s" % i)
    c.remove_by_name('5')
    expected_result = [(0, 3), (0, 0), (0, 6), (1, 1), (1, 4), (2, 2)]
    assert repr(c.children) == repr(expected_result)

def test_add_unsupported_types():
    try:
{'fraction_non_alphanumeric': 0.20112123335669235, 'fraction_numerical': 0.046250875963559916, 'mean_word_length': 3.0381895332390383, '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': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6309398', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1154, 'n_words': 313}