# Path: praatio/utilities/utils.py
# def reportNoop(_exception: Type[BaseException], _text: str) -> None:
# def reportException(exception: Type[BaseException], text: str) -> NoReturn:
# def reportWarning(_exception: Type[BaseException], text: str) -> None:
# def getErrorReporter(reportingMode: Literal["silence", "warning", "error"]):
# def checkIsUndershoot(time: float, referenceTime: float, errorReporter) -> bool:
# def checkIsOvershoot(time: float, referenceTime: float, errorReporter) -> bool:
# def validateOption(variableName, value, optionClass):
# def intervalOverlapCheck(
#     interval: Interval,
#     cmprInterval: Interval,
#     percentThreshold: float = 0,
#     timeThreshold: float = 0,
#     boundaryInclusive: bool = False,
# ) -> bool:
# def getIntervalsInInterval(
#     start: float,
#     end: float,
#     intervals: List[Interval],
#     mode: Literal["strict", "lax", "truncated"],
# ) -> List[Interval]:
# def escapeQuotes(text: str) -> str:
# def strToIntOrFloat(inputStr: str) -> float:
# def getValueAtTime(
#     timestamp: float,
#     sortedDataTupleList: List[Tuple[Any, ...]],
#     fuzzyMatching: bool = False,
#     startI: int = 0,
# ) -> Tuple[Tuple[Any, ...], int]:
# def getValuesInInterval(dataTupleList: List, start: float, end: float) -> List:
# def sign(x: float) -> int:
# def invertIntervalList(
#     inputList: List[Tuple[float, float]], minValue: float = None, maxValue: float = None
# ) -> List[Tuple[float, float]]:
# def makeDir(path: str) -> None:
# def findAll(txt: str, subStr: str) -> List[int]:
# def runPraatScript(
#     praatEXE: str, scriptFN: str, argList: List[Any], cwd: str = None
# ) -> None:
# def safeZip(listOfLists: List[list], enforceLength: bool) -> Iterator[Any]:
# def getWavDuration(wavFN: str) -> float:
# 
# Path: praatio/utilities/errors.py
# class PraatioException(Exception):
# class SafeZipException(PraatioException):
# class FileNotFound(PraatioException):
# class ParsingError(PraatioException):
# class ArgumentError(PraatioException):
# class UnexpectedError(PraatioException):
# class WrongOption(PraatioException):
# class TextgridException(PraatioException):
# class DuplicateTierName(TextgridException):
# class OutOfBounds(TextgridException):
# class CollisionError(TextgridException):
# class TimelessTextgridTierException(TextgridException):
# class TextgridStateAutoModified(TextgridException):
# class TextgridStateError(TextgridException):
# class TierNameExistsError(TextgridException):
# class IncompatibleTierError(TextgridException):
# class PraatExecutionFailed(PraatioException):
# class EndOfAudioData(PraatioException):
# class FindZeroCrossingError(PraatioException):
# class NormalizationException(PraatioException):
#     def __init__(self, fullPath: str):
#     def __str__(self):
#     def __init__(self, argumentName: str, givenValue: str, availableOptions: List[str]):
#     def __str__(self):
#     def __str__(self):
#     def __init__(self, tier):
#     def __str__(self):
#     def __init__(self, cmdList: List[str]):
#     def __str__(self):
#     def __init__(self, startTime: float, endTime: float):
#     def __str__(self):
#     def __str__(self):


import unittest
from praatio.utilities import utils
from praatio.utilities import errors
        self.assertEqual(1, utils.sign(100.5))

    def test_invert_interval_list_throws_exception_if_intervals_are_malformed(self):
        with self.assertRaises(errors.ArgumentError) as _:
            utils.invertIntervalList([[19, 30], [70, 44]])

    def test_invert_interval_list(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(10, 15), (21.5, 32.1)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut))

    def test_invert_interval_list_with_min_value(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(1, 5), (10, 15), (21.5, 32.1)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut, minValue=1))

    def test_invert_interval_list_with_max_value(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(10, 15), (21.5, 32.1), (40, 100)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut, maxValue=100))

    def test_invert_when_interval_list_is_empty(self):
        self.assertEqual([], utils.invertIntervalList([]))
        self.assertEqual(
            [(1, 99)], utils.invertIntervalList([], minValue=1, maxValue=99)
        )

    def test_safe_zip(self):
        listToZip = [[1, 2, 3], [4, 5, 6, 7]]


# Path: praatio/utilities/utils.py
# def reportNoop(_exception: Type[BaseException], _text: str) -> None:
# def reportException(exception: Type[BaseException], text: str) -> NoReturn:
# def reportWarning(_exception: Type[BaseException], text: str) -> None:
# def getErrorReporter(reportingMode: Literal["silence", "warning", "error"]):
# def checkIsUndershoot(time: float, referenceTime: float, errorReporter) -> bool:
# def checkIsOvershoot(time: float, referenceTime: float, errorReporter) -> bool:
# def validateOption(variableName, value, optionClass):
# def intervalOverlapCheck(
#     interval: Interval,
#     cmprInterval: Interval,
#     percentThreshold: float = 0,
#     timeThreshold: float = 0,
#     boundaryInclusive: bool = False,
# ) -> bool:
# def getIntervalsInInterval(
#     start: float,
#     end: float,
#     intervals: List[Interval],
#     mode: Literal["strict", "lax", "truncated"],
# ) -> List[Interval]:
# def escapeQuotes(text: str) -> str:
# def strToIntOrFloat(inputStr: str) -> float:
# def getValueAtTime(
#     timestamp: float,
#     sortedDataTupleList: List[Tuple[Any, ...]],
#     fuzzyMatching: bool = False,
#     startI: int = 0,
# ) -> Tuple[Tuple[Any, ...], int]:
# def getValuesInInterval(dataTupleList: List, start: float, end: float) -> List:
# def sign(x: float) -> int:
# def invertIntervalList(
#     inputList: List[Tuple[float, float]], minValue: float = None, maxValue: float = None
# ) -> List[Tuple[float, float]]:
# def makeDir(path: str) -> None:
# def findAll(txt: str, subStr: str) -> List[int]:
# def runPraatScript(
#     praatEXE: str, scriptFN: str, argList: List[Any], cwd: str = None
# ) -> None:
# def safeZip(listOfLists: List[list], enforceLength: bool) -> Iterator[Any]:
# def getWavDuration(wavFN: str) -> float:
# 
# Path: praatio/utilities/errors.py
# class PraatioException(Exception):
# class SafeZipException(PraatioException):
# class FileNotFound(PraatioException):
# class ParsingError(PraatioException):
# class ArgumentError(PraatioException):
# class UnexpectedError(PraatioException):
# class WrongOption(PraatioException):
# class TextgridException(PraatioException):
# class DuplicateTierName(TextgridException):
# class OutOfBounds(TextgridException):
# class CollisionError(TextgridException):
# class TimelessTextgridTierException(TextgridException):
# class TextgridStateAutoModified(TextgridException):
# class TextgridStateError(TextgridException):
# class TierNameExistsError(TextgridException):
# class IncompatibleTierError(TextgridException):
# class PraatExecutionFailed(PraatioException):
# class EndOfAudioData(PraatioException):
# class FindZeroCrossingError(PraatioException):
# class NormalizationException(PraatioException):
#     def __init__(self, fullPath: str):
#     def __str__(self):
#     def __init__(self, argumentName: str, givenValue: str, availableOptions: List[str]):
#     def __str__(self):
#     def __str__(self):
#     def __init__(self, tier):
#     def __str__(self):
#     def __init__(self, cmdList: List[str]):
#     def __str__(self):
#     def __init__(self, startTime: float, endTime: float):
#     def __str__(self):
#     def __str__(self):


# Path: tests/utilities/test_utils.py
import unittest
from praatio.utilities import utils
from praatio.utilities import errors

        self.assertEqual(1, utils.sign(100.5))

    def test_invert_interval_list_throws_exception_if_intervals_are_malformed(self):
        with self.assertRaises(errors.ArgumentError) as _:
            utils.invertIntervalList([[19, 30], [70, 44]])

    def test_invert_interval_list(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(10, 15), (21.5, 32.1)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut))

    def test_invert_interval_list_with_min_value(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(1, 5), (10, 15), (21.5, 32.1)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut, minValue=1))

    def test_invert_interval_list_with_max_value(self):
        sut = [(5, 10), (15, 21.5), (32.1, 40)]
        expected_output = [(10, 15), (21.5, 32.1), (40, 100)]
        self.assertEqual(expected_output, utils.invertIntervalList(sut, maxValue=100))

    def test_invert_when_interval_list_is_empty(self):
        self.assertEqual([], utils.invertIntervalList([]))
        self.assertEqual(
            [(1, 99)], utils.invertIntervalList([], minValue=1, maxValue=99)
        )

    def test_safe_zip(self):
        listToZip = [[1, 2, 3], [4, 5, 6, 7]]


        with self.assertRaises(errors.SafeZipException) as _: