Skip to content

Commit

Permalink
Merge pull request #298 from dkpro/refactoring/297-Possible-inconsist…
Browse files Browse the repository at this point in the history
…ency-in-test-fixtures

#297 - Possible inconsistency in test fixtures
  • Loading branch information
reckart authored Feb 4, 2024
2 parents 568af57 + 6ab253b commit 3aa2856
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/test_cas.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,39 +268,27 @@ def test_select_returns_feature_structures(cas_with_collections_xmi, typesystem_


def test_get_covered_text_tokens(tokens):
cas = Cas()
cas.sofa_string = "Joe waited for the train . The train was late ."

actual_text = [token.get_covered_text() for token in tokens]

expected_text = ["Joe", "waited", "for", "the", "train", ".", "The", "train", "was", "late", "."]
assert actual_text == expected_text


def test_FeatureStructure_get_covered_text_tokens(tokens):
cas = Cas()
cas.sofa_string = "Joe waited for the train . The train was late ."

actual_text = [token.get_covered_text() for token in tokens]

expected_text = ["Joe", "waited", "for", "the", "train", ".", "The", "train", "was", "late", "."]
assert actual_text == expected_text


def test_get_covered_text_sentences(sentences):
cas = Cas()
cas.sofa_string = "Joe waited for the train . The train was late ."

actual_text = [sentence.get_covered_text() for sentence in sentences]

expected_text = ["Joe waited for the train .", "The train was late ."]
assert actual_text == expected_text


def test_FeatureStructure_get_covered_text_sentences(sentences):
cas = Cas()
cas.sofa_string = "Joe waited for the train . The train was late ."

actual_text = [sentence.get_covered_text() for sentence in sentences]

expected_text = ["Joe waited for the train .", "The train was late ."]
Expand Down

0 comments on commit 3aa2856

Please sign in to comment.