ETA444 / datasafari

DataSafari simplifies complex data science tasks into straightforward, powerful one-liners.
https://datasafari.dev
GNU General Public License v3.0
2 stars 0 forks source link

Construct tests for model_recommendation_core_inference() #117

Closed ETA444 closed 4 months ago

ETA444 commented 4 months ago

Test Descriptions

  1. Invalid DataFrame Type:

    • Verifies that a TypeError is raised if the input df is not a pandas DataFrame.
  2. Invalid Formula Type:

    • Ensures a TypeError is triggered when formula is not a string.
  3. Invalid Priority Models Type:

    • Checks for a TypeError if priority_models is incorrectly specified as anything other than a list of strings.
  4. Invalid n_top_models Type:

    • Asserts that a ValueError is raised when n_top_models is not a positive integer.
  5. Invalid Model Kwargs Type:

    • Tests for a TypeError if model_kwargs is not a dictionary.
  6. Invalid Verbose Type:

    • Verifies that a TypeError is raised when verbose is not an integer.
  7. Empty DataFrame:

    • Confirms that a ValueError is raised if the provided DataFrame is empty.
  8. Invalid Formula Format:

    • Checks for a ValueError when the formula format is incorrect, specifically if it does not contain exactly one '~'.
  9. Missing Target Variable in DataFrame:

    • Ensures a ValueError is raised if the specified target variable in the formula is not present in the DataFrame.
  10. Missing Independent Variable in DataFrame:

    • Tests for a ValueError when one or more independent variables specified in the formula are missing from the DataFrame.
  11. Invalid n_top_models Value:

    • Asserts that a ValueError is raised if n_top_models is less than or equal to zero.
  12. Invalid Model Kwargs Type:

    • Verifies that a TypeError is triggered when model_kwargs is provided as something other than a dictionary.
  13. Formula With Multiple '~' Symbols:

    • Tests for a ValueError if the formula includes more than one '~' symbol, which would incorrectly imply multiple dependent variables.
  14. Verbose Not an Integer:

    • Ensures a TypeError is raised if verbose is specified as a non-integer value.

Access the full test suite here