Skip to content

Commit

Permalink
#297 - Possible inconsistency in test fixtures
Browse files Browse the repository at this point in the history
- Remove redundant and unsed CAS declaration
  • Loading branch information
reckart committed Feb 4, 2024
1 parent 568af57 commit 6ab253b
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 6ab253b

Please sign in to comment.