<commit_before>import os
import unittest

from bpython import config

TEST_THEME_PATH = os.path.join(os.path.dirname(__file__), "test.theme")

class TestConfig(unittest.TestCase):
    def test_load_theme(self):
        struct = config.Struct()
        config.load_theme(struct, TEST_THEME_PATH, "test.ini", dict())
        expected = {"keyword": "y"}
        self.assertEquals(struct.color_scheme, expected)

        defaults = {"name": "c"}
        expected.update(defaults)
        config.load_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
        self.assertEquals(struct.color_scheme, expected)

    def test_load_gtk_scheme(self):
        struct = config.Struct()
        config.load_gtk_theme(struct, TEST_THEME_PATH, "test.ini", dict())
        expected = {"keyword": "y"}
        self.assertEquals(struct.color_gtk_scheme, expected)

        defaults = {"name": "c"}
        expected.update(defaults)
        config.load_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
        self.assertEquals(struct.color_gtk_scheme, expected)<commit_msg>Fix test.<commit_after>import os
import unittest

from bpython import config

TEST_THEME_PATH = os.path.join(os.path.dirname(__file__), "test.theme")

class TestConfig(unittest.TestCase):
    def test_load_theme(self):
        struct = config.Struct()
        config.load_theme(struct, TEST_THEME_PATH, "test.ini", dict())
        expected = {"keyword": "y"}
        self.assertEquals(struct.color_scheme, expected)

        defaults = {"name": "c"}
        expected.update(defaults)
        config.load_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
        self.assertEquals(struct.color_scheme, expected)

    def test_load_gtk_scheme(self):
        struct = config.Struct()
        config.load_gtk_theme(struct, TEST_THEME_PATH, "test.ini", dict())
        expected = {"keyword": "y"}
        self.assertEquals(struct.color_gtk_scheme, expected)

        defaults = {"name": "c"}
        expected.update(defaults)
        config.load_gtk_theme(struct, TEST_THEME_PATH, "test.ini", defaults)
        self.assertEquals(struct.color_gtk_scheme, expected)
{'fraction_non_alphanumeric': 0.12488218661639962, 'fraction_numerical': 0.0, 'mean_word_length': 3.526652452025586, 'pattern_counts': {'":': 8, '<': 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': '7457452', 'n_tokens_mistral': 649, 'n_tokens_neox': 632, 'n_words': 118}