# Path: charset_normalizer/api.py
# def from_bytes(
#     sequences: bytes,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.2,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def from_fp(
#     fp: BinaryIO,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def from_path(
#     path: PathLike,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def normalize(
#     path: PathLike,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
# ) -> CharsetMatch:
# 
# Path: charset_normalizer/constant.py
# TRACE = 5  # type: int


import pytest
import logging
from charset_normalizer.utils import set_logging_handler
from charset_normalizer.api import from_bytes, explain_handler
from charset_normalizer.constant import TRACE



class TestLogBehaviorClass:
    def setup(self):
        self.logger = logging.getLogger("charset_normalizer")
        self.logger.handlers.clear()
        self.logger.addHandler(logging.NullHandler())
        self.logger.level = logging.WARNING

    def test_explain_true_behavior(self, caplog):
        test_sequence = b'This is a test sequence of bytes that should be sufficient'

# Path: charset_normalizer/api.py
# def from_bytes(
#     sequences: bytes,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.2,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def from_fp(
#     fp: BinaryIO,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def from_path(
#     path: PathLike,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
#     explain: bool = False,
# ) -> CharsetMatches:
# def normalize(
#     path: PathLike,
#     steps: int = 5,
#     chunk_size: int = 512,
#     threshold: float = 0.20,
#     cp_isolation: List[str] = None,
#     cp_exclusion: List[str] = None,
#     preemptive_behaviour: bool = True,
# ) -> CharsetMatch:
# 
# Path: charset_normalizer/constant.py
# TRACE = 5  # type: int


# Path: tests/test_logging.py
import pytest
import logging
from charset_normalizer.utils import set_logging_handler
from charset_normalizer.api import from_bytes, explain_handler
from charset_normalizer.constant import TRACE




class TestLogBehaviorClass:
    def setup(self):
        self.logger = logging.getLogger("charset_normalizer")
        self.logger.handlers.clear()
        self.logger.addHandler(logging.NullHandler())
        self.logger.level = logging.WARNING

    def test_explain_true_behavior(self, caplog):
        test_sequence = b'This is a test sequence of bytes that should be sufficient'

        from_bytes(test_sequence, steps=1, chunk_size=50, explain=True)