def test():
    # Here we can either check objects created in the solution code, or the
    # string value of the solution, available as __solution__. A helper for
    # printing formatted messages is available as __msg__. See the testTemplate
    # in the meta.json for details.
    # If an assertion fails, the message will be displayed

    # Since we haven't started assigning charts to variable names yet,
    # this might be the better way to test for the first exercise.
    # Maybe even for later exercises.

    assert 'data.stocks()' in __solution__, "Make sure to call the stocks data from the data library."
    assert 'alt.Chart(stocks)' in __solution__, "Make sure you're passing the correct data object fot plotting."
    assert 'mark_line' in __solution__, "Make sure you're using the correct type of mark"
    assert 'x="date"' in __solution__, "Did you encode the x channel correctly?"
    assert 'y="price"' not in __solution__, "Almost there, but not quite. Here, you want one line with the average value of all stocks over time. Can you specify the y encoding to be the mean of a column?"
    assert 'y="mean(price)"' in __solution__, "Did you encode the y channel correctly?"
    # Don't want color encoding because the plot should be aggregated
    assert 'color="symbol"' not in __solution__, "You don't need color encoding here because we want one aggregated line plot"
    __msg__.good("You're correct, well done!")

def test():
    # Here we can either check objects created in the solution code, or the
    # string value of the solution, available as __solution__. A helper for
    # printing formatted messages is available as __msg__. See the testTemplate
    # in the meta.json for details.
    # If an assertion fails, the message will be displayed

    # Since we haven't started assigning charts to variable names yet,
    # this might be the better way to test for the first exercise.
    # Maybe even for later exercises.

    assert 'data.stocks()' in __solution__, "Make sure to call the stocks data from the data library."
    assert 'alt.Chart(stocks)' in __solution__, "Make sure you're passing the correct data object fot plotting."
    assert 'mark_line' in __solution__, "Make sure you're using the correct type of mark"
    assert 'x="date"' in __solution__, "Did you encode the x channel correctly?"
    assert 'y="price"' not in __solution__, "Almost there, but not quite. Here, you want one line with the average value of all stocks over time. Can you specify the y encoding to be the mean of a column?"
    assert 'y="mean(price)"' in __solution__, "Did you encode the y channel correctly?"
    # Don't want color encoding because the plot should be aggregated
    assert 'color="symbol"' not in __solution__, "You don't need color encoding here because we want one aggregated line plot"
    __msg__.good("You're correct, well done!")

# Here we can either check objects created in the solution code, or the # string value of the solution, available as __solution__. A helper for # printing formatted messages is available as __msg__. See the testTemplate # in the meta.json for details. # If an assertion fails, the message will be displayed # Since we haven't started assigning charts to variable names yet, # this might be the better way to test for the first exercise. # Maybe even for later exercises. # Don't want color encoding because the plot should be aggregated