Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False
def test_str2bool(caplog):
"""Unit test of str2bool."""
caplog.set_level(logging.INFO)
assert str2bool("Yes") is True
assert str2bool("YeS") is True
assert str2bool("TRUE") is True
assert str2bool("True") is True
assert str2bool("T") is True
assert str2bool("Y") is True
assert str2bool("1") is True
assert str2bool("N") is False
assert str2bool("No") is False
assert str2bool("False") is False
assert str2bool("n") is False
assert str2bool("f") is False
assert str2bool("0") is False