Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support several mocks of the same API method in the testing framework #228

Open
popescu-v opened this issue Aug 8, 2024 · 0 comments
Open
Labels
Priority/2-Low To do after P1 Status/Draft The issue is still not well defined Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings

Comments

@popescu-v
Copy link
Collaborator

Description

Currently, the khiops.sklearn module is tested by mocking the underlying khiops.core.api functions. Thus, for each method of the khiops.sklearn estimators one can define a series of mocked khiops.core.api functions.

However, the current testing framework does not support defining several mocks of the same khiops.core.api function for a khiops.sklearn estimator method. This is needed to be able to mock khiops.core.api functions that are called several times in the same khiops.sklearn estimator method call.

Questions/Ideas

  • We need to add support for indexing function mocks with respect to their calling order inside the khiops.sklearn estimator method.
  • This risks being brittle, because calling order (or even whether the same khiops.core.api function is called once or several times, for that matter!) can depend on the inputs.
@popescu-v popescu-v added Status/Draft The issue is still not well defined Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings Priority/2-Low To do after P1 labels Aug 8, 2024
@popescu-v popescu-v removed the Priority/2-Low To do after P1 label Aug 8, 2024
@folmos-at-orange folmos-at-orange added the Priority/2-Low To do after P1 label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/2-Low To do after P1 Status/Draft The issue is still not well defined Type/DevChore Repository maintainance, CI/CD or non user-facing refactorings
Projects
None yet
Development

No branches or pull requests

2 participants