Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test sudachi-synonym-dictionary: reduce checking #225

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 12 additions & 31 deletions test/test-sudachi-synonym-dictionary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,18 @@ def setup
end

test('#each') do
records = @dataset.each.to_a
assert_equal([
67753,
{
group_id: "000001",
is_noun: true,
expansion_type: :always,
lexeme_id: 1,
form_type: :typical,
acronym_type: :typical,
variant_type: :typical,
categories: [],
notation: "曖昧",
},
{
group_id: "026068",
is_noun: true,
expansion_type: :always,
lexeme_id: 1,
form_type: :typical,
acronym_type: :others,
variant_type: :typical,
categories: ["IT"],
notation: "サ終",
},
],
[
records.size,
records[0].to_h,
records[-1].to_h,
])
assert_equal({
group_id: "000001",
is_noun: true,
expansion_type: :always,
lexeme_id: 1,
form_type: :typical,
acronym_type: :typical,
variant_type: :typical,
categories: [],
notation: "曖昧",
},
@dataset.each.next.to_h)
end

sub_test_case('#metadata') do
Expand Down