Exemplo n.º 1
0
def test_only_nums_are_valid_inputs():
    """Test that only strings are valid inputs."""
    bad_inputs = [["boop", "boink"], 12, 99.99, {"one": 2, "three:": 4}]

    for input in bad_inputs:
        with pytest.raises(AttributeError):
            to_jaden_case(bad_inputs)
Exemplo n.º 2
0
def test_output_exists():
    """Test that an output exists."""
    assert to_jaden_case("test") is not None
Exemplo n.º 3
0
def test_basic():
    """Unit tests provided by codewars."""
    for quote in quotes:
        assert to_jaden_case(quote[0]) == quote[1]
Exemplo n.º 4
0
def test_inputs_are_needed():
    """Test that the function will throw an error without inputs."""
    with pytest.raises(TypeError):
        to_jaden_case()
Exemplo n.º 5
0
def test_output_type():
    """Test that the output is the type expected."""
    assert type(to_jaden_case("test")) is str