|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -import logging |
6 | 5 | import string |
7 | 6 | import sys |
8 | 7 | import typing as t |
|
14 | 13 | RandomStrSequence, |
15 | 14 | get_test_session_name, |
16 | 15 | get_test_window_name, |
17 | | - logger, |
18 | 16 | namer, |
19 | 17 | ) |
20 | 18 |
|
|
25 | 23 | from libtmux.session import Session |
26 | 24 |
|
27 | 25 |
|
28 | | -def test_logger() -> None: |
29 | | - """Test that the logger is properly configured.""" |
30 | | - assert isinstance(logger, logging.Logger) |
31 | | - assert logger.name == "libtmux.test.random" |
32 | | - |
33 | | - |
34 | 26 | def test_random_str_sequence_default() -> None: |
35 | 27 | """Test RandomStrSequence with default characters.""" |
36 | 28 | rng = RandomStrSequence() |
@@ -295,20 +287,6 @@ def test_random_str_sequence_insufficient_characters() -> None: |
295 | 287 | next(rng) |
296 | 288 |
|
297 | 289 |
|
298 | | -def test_logger_configured(caplog: pytest.LogCaptureFixture) -> None: |
299 | | - """Test that the logger in random.py is properly configured.""" |
300 | | - # Verify the logger is set up with the correct name |
301 | | - assert logger.name == "libtmux.test.random" |
302 | | - |
303 | | - # Test that the logger functions properly |
304 | | - with caplog.at_level(logging.DEBUG): |
305 | | - logger.debug("Test debug message") |
306 | | - logger.info("Test info message") |
307 | | - |
308 | | - assert "Test debug message" in caplog.text |
309 | | - assert "Test info message" in caplog.text |
310 | | - |
311 | | - |
312 | 290 | def test_next_method_directly() -> None: |
313 | 291 | """Test directly calling __next__ method on RandomStrSequence.""" |
314 | 292 | rng = RandomStrSequence() |
@@ -424,7 +402,6 @@ def test_imports_coverage() -> None: |
424 | 402 | # This test simply ensures the imports are covered |
425 | 403 | from libtmux.test import random |
426 | 404 |
|
427 | | - assert hasattr(random, "logging") |
428 | 405 | assert hasattr(random, "random") |
429 | 406 | assert hasattr(random, "t") |
430 | 407 | assert hasattr(random, "TEST_SESSION_PREFIX") |
|
0 commit comments