Skip to content

Commit 0c543f1

Browse files
committed
Add a test
Also fix mypy settings for tests and noxfile
1 parent 6936d95 commit 0c543f1

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

mypy.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[mypy]
2+
exclude = "/tests/"
3+
4+
[mypy-tests.*]
5+
ignore_errors = true
6+
7+
[mypy-noxfile]
8+
ignore_errors = true

tests/test_stdlib_formatter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
import logging
19+
import logging.config
1920
import mock
2021
import pytest
2122
import json
@@ -327,3 +328,12 @@ def test_stack_info_excluded(logger, exclude_fields):
327328

328329
ecs = json.loads(stream.getvalue().rstrip())
329330
assert "error" not in ecs
331+
332+
333+
def test_stdlibformatter_signature():
334+
logging.config.dictConfig(
335+
{
336+
"version": 1,
337+
"formatters": {"my_formatter": {"class": "ecs_logging.StdlibFormatter"}},
338+
}
339+
)

0 commit comments

Comments
 (0)