Skip to content

Commit ffd2532

Browse files
authored
Turn on logging in the types test (#816)
- Will be needed to track down #813
1 parent e32bb5d commit ffd2532

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

tests/services/test_types.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,31 @@
44

55
"""Unit tests for zeroconf._services.types."""
66

7+
import logging
78
import os
89
import unittest
910
import socket
1011
import sys
11-
import time
1212

1313
import zeroconf as r
1414
from zeroconf import Zeroconf, ServiceInfo, ZeroconfServiceTypes
1515

1616
from .. import _clear_cache, has_working_ipv6
1717

18+
log = logging.getLogger('zeroconf')
19+
original_logging_level = logging.NOTSET
20+
21+
22+
def setup_module():
23+
global original_logging_level
24+
original_logging_level = log.level
25+
log.setLevel(logging.DEBUG)
26+
27+
28+
def teardown_module():
29+
if original_logging_level != logging.NOTSET:
30+
log.setLevel(original_logging_level)
31+
1832

1933
class ServiceTypesQuery(unittest.TestCase):
2034
def test_integration_with_listener(self):

0 commit comments

Comments
 (0)