<commit_before>require 'test_helper'

class CompanyTest < ActiveSupport::TestCase
  fixtures :companies, :fiscal_years

  def test_get_fiscal_year_int
    assert_equal( 2007, companies(:a).get_fiscal_year_int( 200612 ) )
    assert_equal( 2006, companies(:a).get_fiscal_year_int( 200611 ) )
    assert_equal( 2007, companies(:a).get_fiscal_year_int( 200711 ) )
    assert_equal( 2008, companies(:a).get_fiscal_year_int( 200712 ) )

    assert_equal( 2005, companies(:b).get_fiscal_year_int( 200603 ) )
    assert_equal( 2006, companies(:b).get_fiscal_year_int( 200604 ) )
    assert_equal( 2006, companies(:b).get_fiscal_year_int( 200703 ) )
    assert_equal( 2007, companies(:b).get_fiscal_year_int( 200704 ) )
  end
  
  def test_get_fiscal_year
    assert_equal( 2006, companies(:a).get_fiscal_year( 200611 ).fiscal_year )
    assert_equal( 2007, companies(:a).get_fiscal_year( 200612 ).fiscal_year )
    assert_equal( 2007, companies(:a).get_fiscal_year( 200711 ).fiscal_year )
    assert_equal( 2008, companies(:a).get_fiscal_year( 200712 ).fiscal_year )<commit_msg>refactor<commit_after>require 'test_helper'

class CompanyTest < ActiveSupport::TestCase

  def test_get_fiscal_year_int
    assert_equal( 2007, companies(:a).get_fiscal_year_int( 200612 ) )
    assert_equal( 2006, companies(:a).get_fiscal_year_int( 200611 ) )
    assert_equal( 2007, companies(:a).get_fiscal_year_int( 200711 ) )
    assert_equal( 2008, companies(:a).get_fiscal_year_int( 200712 ) )

    assert_equal( 2005, companies(:b).get_fiscal_year_int( 200603 ) )
    assert_equal( 2006, companies(:b).get_fiscal_year_int( 200604 ) )
    assert_equal( 2006, companies(:b).get_fiscal_year_int( 200703 ) )
    assert_equal( 2007, companies(:b).get_fiscal_year_int( 200704 ) )
  end
  
  def test_get_fiscal_year
    assert_equal( 2006, companies(:a).get_fiscal_year( 200611 ).fiscal_year )
    assert_equal( 2007, companies(:a).get_fiscal_year( 200612 ).fiscal_year )
    assert_equal( 2007, companies(:a).get_fiscal_year( 200711 ).fiscal_year )
    assert_equal( 2008, companies(:a).get_fiscal_year( 200712 ).fiscal_year )
{'fraction_non_alphanumeric': 0.11571428571428571, 'fraction_numerical': 0.11428571428571428, 'mean_word_length': 5.524844720496894, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3192500', 'n_tokens_mistral': 996, 'n_tokens_neox': 773, 'n_words': 127}