<commit_before>require File.dirname(__FILE__) + '/helpers/test_case'

module Galena
  module Tissue
    class FilterMigrationTest < Test::Unit::TestCase
      include Galena::Tissue::MigrationTestCase
    
      def test_filter
        verify_target(:filter, :bad => BAD_FILE) do |spc|
          assert_not_nil(spc.initial_quantity, "Missing quantity")
          scg = spc.specimen_collection_group
          assert_not_nil(scg, "Missing SCG")
          pnt = scg.registration.participant
          assert_not_nil(pnt, "Missing Participant")
          assert_not_nil(pnt.first_name, "Missing first name")
          assert_not_nil(pnt.last_name, "Missing last name")
        end
      end
    
      def test_save
        verify_save(:filter, :bad => BAD_FILE)
      end
      
      private
      
      BAD_FILE = 'test/results/examples/galena/bad.csv'
    end
  end
end
<commit_msg>Trash file is relative to Galena root directory.<commit_after>require File.dirname(__FILE__) + '/helpers/test_case'

module Galena
  module Tissue
    class FilterMigrationTest < Test::Unit::TestCase
      include Galena::Tissue::MigrationTestCase
    
      def test_filter
        verify_target(:filter, :bad => BAD_FILE) do |spc|
          assert_not_nil(spc.initial_quantity, "Missing quantity")
          scg = spc.specimen_collection_group
          assert_not_nil(scg, "Missing SCG")
          pnt = scg.registration.participant
          assert_not_nil(pnt, "Missing Participant")
          assert_not_nil(pnt.first_name, "Missing first name")
          assert_not_nil(pnt.last_name, "Missing last name")
        end
      end
    
      def test_save
        verify_save(:filter, :bad => BAD_FILE)
      end
      
      private
      
      BAD_FILE = File.expand_path('bad.csv', Galena::ROOT_DIR + '/../../test/results/examples/galena')
    end
  end
end

{'fraction_non_alphanumeric': 0.0918918918918919, 'fraction_numerical': 0.0, 'mean_word_length': 2.5941747572815532, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4150557', 'n_tokens_mistral': 576, 'n_tokens_neox': 561, 'n_words': 117}