<commit_before>from nose.tools import *
from analyse_idynomics import *
from os.path import join, dirname, realpath

class TestAnalyseiDynomics:
    expected_solutes = ['MyAtmos', 'pressure']
    expected_species = ['MyBact']
    expected_timesteps = 2
    expected_dimensions = (20.0, 20.0, 2.0)
    
    def setUp(self):
        self.directory = join(dirname(realpath(__file__)), 'test_data')
        self.analysis = AnalyseiDynomics(self.directory)

    def test_init(self):
        assert_is(self.directory, self.analysis.directory)

    def test_solute_names(self):
        actual_solutes = self.analysis.solute_names
        assert_list_equal(self.expected_solutes, actual_solutes)

    def test_species_names(self):
        actual_species = self.analysis.species_names
        assert_list_equal(self.expected_species, actual_species)

    def test_total_timesteps(self):
        actual_timesteps = self.analysis.total_timesteps
        assert_equals(self.expected_timesteps, actual_timesteps)

    def test_world_dimensions(self):
        actual_dimensions = self.analysis.world_dimensions
        assert_equal(self.expected_dimensions, actual_dimensions)<commit_msg>Add unit test for getting reaction rate names<commit_after>from nose.tools import *
from analyse_idynomics import *
from os.path import join, dirname, realpath

class TestAnalyseiDynomics:
    expected_solutes = ['MyAtmos', 'pressure']
    expected_species = ['MyBact']
    expected_reaction_rates = ['MyGrowth-rate']
    expected_timesteps = 2
    expected_dimensions = (20.0, 20.0, 2.0)
    
    def setUp(self):
        self.directory = join(dirname(realpath(__file__)), 'test_data')
        self.analysis = AnalyseiDynomics(self.directory)

    def test_init(self):
        assert_is(self.directory, self.analysis.directory)

    def test_solute_names(self):
        actual_solutes = self.analysis.solute_names
        assert_list_equal(self.expected_solutes, actual_solutes)

    def test_species_names(self):
        actual_species = self.analysis.species_names
        assert_list_equal(self.expected_species, actual_species)

    def test_reaction_rate_names(self):
        actual_reaction_rates = self.analysis.reaction_rate_names
        assert_list_equal(self.expected_reaction_rates, actual_reaction_rates)

    def test_total_timesteps(self):
        actual_timesteps = self.analysis.total_timesteps
        assert_equals(self.expected_timesteps, actual_timesteps)

    def test_world_dimensions(self):
        actual_dimensions = self.analysis.world_dimensions
        assert_equal(self.expected_dimensions, actual_dimensions)

        
{'fraction_non_alphanumeric': 0.08231707317073171, 'fraction_numerical': 0.006859756097560976, 'mean_word_length': 4.019120458891013, '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': '654668', 'n_tokens_mistral': 854, 'n_tokens_neox': 793, 'n_words': 134}