Skip to content

Commit c6c7d75

Browse files
test(logger): update logger test
1 parent 99bf773 commit c6c7d75

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/tracer/test_native_logger.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def test_logger_configure(output, path, files, max_bytes):
6868
cases = [(config, msg, LEVELS.index(msg) >= LEVELS.index(config)) for config in LEVELS for msg in LEVELS]
6969

7070

71-
@pytest.mark.parametrize("backend", ["stdout", "stderr", "file"])
71+
@pytest.mark.parametrize("backend", ["", "stdout", "stderr", "file"])
7272
@pytest.mark.parametrize("configured_level, message_level, should_log", cases)
7373
def test_logger_subprocess(
7474
backend, configured_level, message_level, should_log, tmp_path, ddtrace_run_python_code_in_subprocess
@@ -93,7 +93,11 @@ def test_logger_subprocess(
9393
out, err, status, _ = ddtrace_run_python_code_in_subprocess(code, env=env)
9494

9595
assert status == 0
96-
if backend == "stdout":
96+
if backend == "":
97+
assert out == b""
98+
assert err == b""
99+
assert log_path.read_text() == ""
100+
elif backend == "stdout":
97101
found = message in out.decode("utf8")
98102
assert err == b""
99103
assert found == should_log

0 commit comments

Comments
 (0)