def test_load_movielens_data():
data = load_movielens_data(
os.path.join('data', 'ml-100k')
)
assert (data.shape == (943, 1682))
This only checks to see if the user made the right dimension matrix, without any regard to the validity of the data in the matrix.
Why not something like
let correct_hash = some_hash_value
def test_load_movielens_data():
data = load_movielens_data(
os.path.join('data', 'ml-100k')
)
assert (some_hash_function(data) == correct_hash)
to guarantee that we parsed the data correctly (This would force the students to cast it to a particular data type (or have the test go through everything and typecast it), i.e., int, float, or string, but this seems like a small price to pay to me).
This only checks to see if the user made the right dimension matrix, without any regard to the validity of the data in the matrix.
Why not something like
to guarantee that we parsed the data correctly (This would force the students to cast it to a particular data type (or have the test go through everything and typecast it), i.e., int, float, or string, but this seems like a small price to pay to me).