def test_read_data(): input_file = "stable_isotope_data_assignment2.csv" data_directory = os.path.realpath(os.path.join(os.path.dirname(__file__),"..","data")) input_filename = os.path.join(data_directory,input_file) isotope_data = plotting.read_data(input_filename, starting_row=0) assert(isotope_data.shape == (54,2)) assert(isotope_data[0,1] == -5.85)
def test_read_data(): input_file = "110-tavg-12-12-1950-2020.csv" data_directory = os.path.realpath( os.path.join(os.path.dirname(__file__), "..", "data")) input_filename = os.path.join(data_directory, input_file) temperature_data = plotting.read_data(input_filename, starting_row=0) assert (temperature_data.shape == (71, 3)) assert (temperature_data[0, 1] == 51.39)
def test_read_data(): """"A test for the read_data function""" input_file = "12009_phase_diagram.txt" data_directory = os.path.realpath( os.path.join(os.path.dirname(__file__), "..", "data")) input_filename = os.path.join(data_directory, input_file) phase_diagram_data = plotting.read_data(input_filename) assert (phase_diagram_data.shape == (15, 6)) assert (phase_diagram_data.columns[0] == 'Pressure')