Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
Add ability to skip tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddieantonio committed Mar 30, 2020
1 parent d6a9379 commit 20b1fdb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/fst-test-framework.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,16 @@ def initialize(transducer)

def transduce(input, specification)
LookupImplementation.each do |fst_impl|
transducer_path = FST_DIR / "#{@transducer}.#{fst_impl.ext}"
expected = specification[:contains]
raise 'Invalid specification' if expected.nil?

# Skip implementation per-test
if specification[:skip_impl] && specification[:skip_impl].include?(fst_impl.id)
warn "[#{fst_impl.id}] skipping input: #{input}"
next
end

transducer_path = FST_DIR / "#{@transducer}.#{fst_impl.ext}"
_run_and_filter(fst_impl, transducer_path, input, expected)
end
end
Expand Down
2 changes: 2 additions & 0 deletions test/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ FST.test('crk-descriptive-analyzer') do
# https://github.com/UAlbertaALTLab/cree-intelligent-dictionary/issues/370
transduce "yahyanam", contains: "yâhyânam+V+AI+Ind+Prs+3Sg"
transduce "niyahyanen", contains: "yâhyânam+V+AI+Ind+Prs+1Sg"

transduce "mân", contains: "mâna+Ipc+Err/Orth", skip_impl: [:foma]
end

FST.test('crk-normative-generator') do
Expand Down

0 comments on commit 20b1fdb

Please sign in to comment.