lyst / lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.
Apache License 2.0
4.77k stars 691 forks source link

Add new unit test for type checking logic #590

Open markdouthwaite opened 3 years ago

markdouthwaite commented 3 years ago

Hey again!

In response @maciejkula's request on #588 I've added a test to check all combinations of valid input types for user_ids and item_ids (i.e. tuple, list, ndarray) pass successfully.

To do this, I've added a conftest.py file that includes some handy fixtures for the new test_predict_user_item_inputs_with_valid_types test.

As an aside, I think some of these fixtures might be useful in other tests (not addressed in this PR) too. I'd be happy to look into how existing tests could be streamlined if that would be useful?