allennlp
/
pytest.ini
33 строки · 1.7 Кб
1[pytest]
2testpaths = tests/ scripts/tests/
3python_classes = Test* *Test
4log_format = %(asctime)s - %(levelname)s - %(name)s - %(message)s
5log_level = DEBUG
6markers =
7java
8gpu: marks tests that need at least one GPU
9filterwarnings =
10# Note: When a warning matches more than one option in the list,
11# the action for the _last_ matching option is performed.
12#
13# individual warnings filters are specified as a sequence of fields separated by colons:
14# action:message:category:module:line
15# <reference: https://docs.python.org/3/library/warnings.html#warning-filter>
16#
17# how to explicitly test warns
18# using `unittest`: https://docs.python.org/3/library/warnings.html#testing-warnings
19# using `pytest`: https://docs.pytest.org/en/4.1.0/warnings.html#assertwarnings
20#
21# Our policy here is to ignore (silence) any deprecation warnings from _outside_ allennlp, but to
22# treat any _internal_ deprecation warnings as errors. If we get a deprecation warning from things
23# we call in another library, we will just rely on seeing those outside of tests. The purpose of
24# having these errors here is to make sure that we do not deprecate things lightly in allennlp.
25ignore::DeprecationWarning
26ignore::PendingDeprecationWarning
27error::DeprecationWarning:allennlp.*:
28error::PendingDeprecationWarning:allennlp.*:
29# For these particular warnings, we don't want to cause an error for it, but we also don't want to
30# see it a whole bunch of times.
31once:This particular transformer implementation is a provisional feature.*::allennlp\.modules\.seq2seq_encoders\.bidirectional_language_model_transformer
32ignore:Length of IterableDataset.*:UserWarning:torch\.utils\.data\.dataloader
33ignore::UserWarning:allennlp.*:
34