<commit_before>import unittest

from brew.constants import KG_PER_POUND
from brew.constants import LITER_PER_GAL
from brew.constants import SI_UNITS
from brew.utilities import alcohol_by_volume_alternative
from brew.utilities import alcohol_by_volume_standard
from brew.utilities import as_is_basis_to_dry_basis
from brew.utilities import basis_to_hwe
from brew.utilities import brix_to_plato
from brew.utilities import brix_to_sg
from brew.utilities import calculate_srm
from brew.utilities import celsius_to_fahrenheit
from brew.utilities import coarse_grind_to_fine_grind
from brew.utilities import dry_basis_to_as_is_basis
from brew.utilities import ebc_to_a430
from brew.utilities import ebc_to_srm
from brew.utilities import fahrenheit_to_celsius
from brew.utilities import fine_grind_to_coarse_grind
from brew.utilities import gu_to_sg
from brew.utilities import hwe_to_basis
from brew.utilities import hydrometer_adjustment
from brew.utilities import lovibond_to_srm
from brew.utilities import plato_from_dry_basis
from brew.utilities import plato_to_brix
from brew.utilities import plato_to_sg
from brew.utilities import refractometer_adjustment
from brew.utilities import sg_from_dry_basis
from brew.utilities import sg_to_brix
from brew.utilities import sg_to_gu
from brew.utilities import sg_to_plato
from brew.utilities import srm_to_a430
from brew.utilities import srm_to_ebc
from brew.utilities import srm_to_lovibond


class TestTemperatureUtilities(unittest.TestCase):

    def test_celsius_to_fahrenheit(self):
        ftemp = celsius_to_fahrenheit(100.0)
        self.assertEquals(ftemp, 212.0)
        ftemp = celsius_to_fahrenheit(0.0)
        self.assertEquals(ftemp, 32.0)
        ftemp = celsius_to_fahrenheit(-40.0)
        self.assertEquals(ftemp, -40.0)

    def test_fahrenheit_to_celsius(self):
        ctemp = fahrenheit_to_celsius(212.0)
        self.assertEquals(ctemp, 100.0)
        ctemp = fahrenheit_to_celsius(32.0)
        self.assertEquals(ctemp, 0.0)
        ctemp = fahrenheit_to_celsius(-40.0)
        self.assertEquals(ctemp, -40.0)


class TestSugarUtilities(unittest.TestCase):

    def test_brix_to_plato(self):
        plato = brix_to_plato(22.0)
        self.assertEquals(round(plato, 3), 22.001)
<commit_msg>Change test for utilities to use correct imports<commit_after>import unittest

from brew.constants import KG_PER_POUND
from brew.constants import LITER_PER_GAL
from brew.constants import SI_UNITS
from brew.utilities.abv import alcohol_by_volume_alternative
from brew.utilities.abv import alcohol_by_volume_standard
from brew.utilities.color import calculate_srm
from brew.utilities.color import ebc_to_a430
from brew.utilities.color import ebc_to_srm
from brew.utilities.color import lovibond_to_srm
from brew.utilities.color import srm_to_a430
from brew.utilities.color import srm_to_ebc
from brew.utilities.color import srm_to_lovibond
from brew.utilities.malt import as_is_basis_to_dry_basis
from brew.utilities.malt import basis_to_hwe
from brew.utilities.malt import coarse_grind_to_fine_grind
from brew.utilities.malt import dry_basis_to_as_is_basis
from brew.utilities.malt import fine_grind_to_coarse_grind
from brew.utilities.malt import hwe_to_basis
from brew.utilities.malt import plato_from_dry_basis
from brew.utilities.malt import sg_from_dry_basis
from brew.utilities.sugar import brix_to_plato
from brew.utilities.sugar import brix_to_sg
from brew.utilities.sugar import gu_to_sg
from brew.utilities.sugar import hydrometer_adjustment
from brew.utilities.sugar import plato_to_brix
from brew.utilities.sugar import plato_to_sg
from brew.utilities.sugar import refractometer_adjustment
from brew.utilities.sugar import sg_to_brix
from brew.utilities.sugar import sg_to_gu
from brew.utilities.sugar import sg_to_plato
from brew.utilities.temperature import celsius_to_fahrenheit
from brew.utilities.temperature import fahrenheit_to_celsius


class TestTemperatureUtilities(unittest.TestCase):

    def test_celsius_to_fahrenheit(self):
        ftemp = celsius_to_fahrenheit(100.0)
        self.assertEquals(ftemp, 212.0)
        ftemp = celsius_to_fahrenheit(0.0)
        self.assertEquals(ftemp, 32.0)
        ftemp = celsius_to_fahrenheit(-40.0)
        self.assertEquals(ftemp, -40.0)

    def test_fahrenheit_to_celsius(self):
        ctemp = fahrenheit_to_celsius(212.0)
        self.assertEquals(ctemp, 100.0)
        ctemp = fahrenheit_to_celsius(32.0)
        self.assertEquals(ctemp, 0.0)
        ctemp = fahrenheit_to_celsius(-40.0)
        self.assertEquals(ctemp, -40.0)


class TestSugarUtilities(unittest.TestCase):

    def test_brix_to_plato(self):
        plato = brix_to_plato(22.0)
        self.assertEquals(round(plato, 3), 22.001)

{'fraction_non_alphanumeric': 0.05780224433622697, 'fraction_numerical': 0.02244336226974381, 'mean_word_length': 5.127107652399482, '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': '736992', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1615, 'n_words': 345}