<filename>tests/chp2/video7/test_sad_path_start.py
import pytest

from scripts import data_processor


@pytest.fixture(scope="function")
def city_list_location_malformed():
    return 'tests/resources/cities/malformed_map.csv'


def test_csv_reader_malformed_data_contents(city_list_location_malformed):
    """
    Sad Path Test

    """

    with pytest.raises(ValueError) as exp:
        data_processor.csv_reader(city_list_location_malformed)
    assert str(exp.value) == "could not convert string to float: 'not_an_altitude'"

<filename>tests/chp2/video7/test_sad_path_start.py
import pytest

from scripts import data_processor


@pytest.fixture(scope="function")
def city_list_location_malformed():
    return 'tests/resources/cities/malformed_map.csv'


def test_csv_reader_malformed_data_contents(city_list_location_malformed):
    """
    Sad Path Test

    """

    with pytest.raises(ValueError) as exp:
        data_processor.csv_reader(city_list_location_malformed)
    assert str(exp.value) == "could not convert string to float: 'not_an_altitude'"

Sad Path Test