How to use the aria2p.utils.bool_or_value function in aria2p

To help you get started, we’ve selected a few aria2p examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_false_is_false():
    assert bool_or_value("false") is False
github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_keep_none():
    assert bool_or_value(None) is None
github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_keep_string_value():
    assert bool_or_value("mem") == "mem"
github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_keep_true_int():
    assert bool_or_value(1) == 1
github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_true_is_true():
    assert bool_or_value("true") is True
github pawamoy / aria2p / tests / test_utils.py View on Github external
def test_bool_or_value_keep_false_int():
    assert bool_or_value(0) == 0