コード例 #1
0
def test_convert_to_string():
    """Test the convert_to_string() function."""
    data = [[1, 'John'], [2, 'Jill']]
    headers = [0, 'name']
    expected = ([['1', 'John'], ['2', 'Jill']], ['0', 'name'])

    assert expected == convert_to_string(data, headers)
コード例 #2
0
def test_convert_to_string():
    """Test the convert_to_string() function."""
    data = [[1, "John"], [2, "Jill"]]
    headers = [0, "name"]
    expected = ([["1", "John"], ["2", "Jill"]], ["0", "name"])
    results = convert_to_string(data, headers)

    assert expected == (list(results[0]), results[1])