Esempio n. 1
0
def test_value_none() -> None:
    """optional.value(None) → RuntimeError."""
    # Use try except due to lack of typing on pytest module.
    try:
        optional.value(None)
    except RuntimeError:
        pass
    except:  # noqa: E722
        assert False, "Expected RuntimeError"
Esempio n. 2
0
def test_value_none() -> None:
    """optional.value(None) → RuntimeError"""

    # Use try except due to lack of typing on pytest module.
    try:
        optional.value(None)
    except RuntimeError:
        pass
    except:  # pylint: disable=bare-except
        assert False, "Expected RuntimeError"
Esempio n. 3
0
def test_value_not_none(value: int) -> None:
    """optional.value(value) == value."""
    assert optional.value(value) == value