Skip to content

Commit 9b3a750

Browse files
committed
change test flags names
1 parent 091e329 commit 9b3a750

7 files changed

Lines changed: 14 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Alternatively, the project Makefile has a test target:
6868

6969
> make test
7070
71-
Expensive tests are disabled by default. These can be run by setting the environment variable `RENARD_TEST_ALL` to `1`.
71+
Expensive tests are disabled by default. These can be run by setting the environment variable `RENARD_TEST_SLOW` to `1`.
7272

7373

7474

docs/contributing.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ issue if you encounter a problem or want to discuss a specific
77
feature. If you want to contribute a patch:
88

99
1. Check that your code matches our code quality guidelines and that
10-
all existing tests are passing with ``RENARD_TEST_ALL=1``.
10+
all existing tests are passing with ``RENARD_TEST_SLOW=1``.
1111
2. Create a Github pull request with your patch, explaining the
1212
rationale behind it and giving a high level overview of your
1313
code. Mention the relevant issue if applicable.
@@ -36,9 +36,7 @@ the ``tests`` directory. We use ``pytest`` to test code, and also use
3636
``hypothesis`` when applicable. If you open a patch, make sure that
3737
all tests are passing. In particular, do not rely on the CI, as it
3838
does not run time costly tests! Check for yourself locally, using
39-
``RENARD_TEST_ALL=1 python -m pytest tests``. Note that there are
39+
``RENARD_TEST_SLOW=1 python -m pytest tests``. Note that there are
4040
specific tests and environment variable for optional dependencies such
41-
as *stanza* (``RENARD_TEST_STANZA_OPTDEP``). These must be explicitely
42-
set to ``1`` if you want to test optional dependencies, as
43-
``RENARD_TEST_ALL=1`` does not enable test on these optional
44-
dependencies.
41+
as *stanza* (``RENARD_TEST_OPTDEP_STANZA``). These must be explicitely
42+
set to ``1`` if you want to test optional dependencies.

docs/pipeline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ to a unique character.
200200
Relation Extraction
201201
-------------------
202202

203-
- :class:`.T5RelationExtractor` extracts relations between characters
203+
- :class:`.GenerativeRelationExtractor` extracts relations between characters
204204
using a finetuned T5 model.
205205

206206

tests/test_corefs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from renard.pipeline.corefs import BertCoreferenceResolver
55

66

7-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
7+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
88
def test_bert_coreference_resolver_runs():
99
pipeline = Pipeline([BertCoreferenceResolver()], progress_report=None)
1010
tokens = "Princess Liana felt sad , because Zarth Arn was gone . The princess went to sleep .".split(

tests/test_ner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
@pytest.mark.skipif(
21-
os.getenv("RENARD_TEST_SEQEVAL_OPTDEP") != "1",
21+
os.getenv("RENARD_TEST_OPTDEP_SEQEVAL") != "1",
2222
reason="not testing seqeval based functions",
2323
)
2424
@given(lists(sampled_from(("B-PER", "I-PER", "O")), min_size=1))
@@ -34,7 +34,7 @@ def test_has_correct_number_of_entities(tokens: List[str]):
3434
assert len(entities) == len(tokens)
3535

3636

37-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
37+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
3838
@pytest.mark.parametrize(
3939
"retriever_class", [NERSamenounContextRetriever, NERBM25ContextRetriever]
4040
)
@@ -53,7 +53,7 @@ def test_retrieves_context(retriever_class: Type[NERContextRetriever]):
5353
assert len(ctx_dataset._context_mask) == len(sentences)
5454

5555

56-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
56+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
5757
def test_neural_retrieves_context():
5858
context_retriever = NERNeuralContextRetriever(
5959
NEREnsembleContextRetriever(

tests/test_pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ def production(self) -> Set[str]:
5353
assert not pipeline.check_valid()[0]
5454

5555

56-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
56+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
5757
def test_co_occurrence_pipeline_runs():
5858
text = load_novel_chapters("pride_and_prejudice")[0]
5959
pipeline = co_occurrence_pipeline(warn=False, progress_report=None)
6060
pipeline(text)
6161

6262

63-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
63+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
6464
def test_conversational_pipeline_runs():
6565
text = load_novel_chapters("pride_and_prejudice")[0]
6666
# # if the text is too long, speaker attribution takes too much time
@@ -70,7 +70,7 @@ def test_conversational_pipeline_runs():
7070
pipeline(text)
7171

7272

73-
@pytest.mark.skipif(os.getenv("RENARD_TEST_ALL") != "1", reason="performance")
73+
@pytest.mark.skipif(os.getenv("RENARD_TEST_SLOW") != "1", reason="performance")
7474
def test_relational_pipeline_runs():
7575
text = load_novel_chapters("pride_and_prejudice")[0]
7676
pipeline = relational_pipeline(warn=False, progress_report=None)

tests/test_stanza.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
@pytest.mark.skipif(
10-
os.getenv("RENARD_TEST_STANZA_OPTDEP") != "1",
10+
os.getenv("RENARD_TEST_OPTDEP_STANZA") != "1",
1111
reason="not testing stanza based modules",
1212
)
1313
def test_stanza_pipeline_runs():

0 commit comments

Comments
 (0)