<commit_before># coding=UTF-8
from __future__ import print_function, absolute_import, division
import six
import unittest
from satella.coding import merge_dicts


class TestMergeDicts(unittest.TestCase):
    def test_merge_dicts(self):

        tak = merge_dicts({'kupujemy': 'tak'}, {'kupujemy': 'nie'})
        nie = merge_dicts({'kupujemy': 'nie'}, {'kupujemy': 'tak'})

        self.assertEquals(tak['kupujemy'], 'nie')
        self.assertEquals(nie['kupujemy'], 'tak')

    def test_merge_lists(self):
        
        tak = merge_dicts({'kupujemy': ['tak']}, {'kupujemy': ['nie']})

        self.assertEqual(set(tak['kupujemy']), set(['tak', 'nie']))


    def test_adds(self):
        tak = merge_dicts({'kupujemy': 'tak'}, {'xkupujemy': 'nie'})

        self.assertEquals(tak['xupujemy'], 'nie')
        self.assertEquals(tak['kupujemy'], 'tak')

    def test_nest(self):
        tak = merge_dicts({'kupujemy': {"y": ['tak']}}, {'kupujemy': {"y":{['nie']}}})

        q = tak['kupujemy']['y']

        self.assertIn('tak', q)
        self.assertIn('nie', q)<commit_msg>more tests<commit_after># coding=UTF-8
from __future__ import print_function, absolute_import, division
import six
import unittest
from satella.coding import merge_dicts


class TestMergeDicts(unittest.TestCase):
    def test_merge_dicts(self):

        tak = merge_dicts({'kupujemy': 'tak'}, {'kupujemy': 'nie'})
        nie = merge_dicts({'kupujemy': 'nie'}, {'kupujemy': 'tak'})

        self.assertEquals(tak['kupujemy'], 'nie')
        self.assertEquals(nie['kupujemy'], 'tak')

    def test_merge_lists(self):
        
        tak = merge_dicts({'kupujemy': ['tak']}, {'kupujemy': ['nie']})

        self.assertEqual(set(tak['kupujemy']), set(['tak', 'nie']))


    def test_adds(self):
        tak = merge_dicts({'kupujemy': 'tak'}, {'xkupujemy': 'nie'})

        self.assertEquals(tak['xupujemy'], 'nie')
        self.assertEquals(tak['kupujemy'], 'tak')

    def test_nest(self):
        tak = merge_dicts({'kupujemy': {"y": ['tak']}}, {'kupujemy': {"y":['nie']}})

        q = tak['kupujemy']['y']

        self.assertIn('tak', q)
        self.assertIn('nie', q)
{'fraction_non_alphanumeric': 0.1991624011167985, 'fraction_numerical': 0.0009306654257794323, 'mean_word_length': 3.756637168141593, 'pattern_counts': {'":': 4, '<': 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': '1859926', 'n_tokens_mistral': 806, 'n_tokens_neox': 784, 'n_words': 138}