-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CT-3195] [spike+] unit testing versioned models #8799
Comments
@dbeatty10 @jtcohen6 What are your thoughts here if you want to only run the unit test on the "latest" version on the model? How do we handle this for data tests? UPDATE |
@MichelleArk looking at some previous notes, it sounds like we may actually already support unit testing a specific version of a model, by setting We should switch this over to the spec described in this ticket |
Notes from refinement:
|
@graciegoheen How do we want to handle fixture files? If we have versioned models and want to test them all but need to use different versions of the fixture file, will we allow it by naming them |
@emmyoop I don't think we want to allow folks to use different fixtures depending on the version in a single unit test - a unit test should be defined on a static set of inputs. If you want to create a unit test on version 1 of your model, and a different unit test (with different fixtures) on versions 2 and 3 of your model, I would expect you to need to use 2 different unit test definitions (regardless of the format you're supplying the mock input/expected output data in):
If we get feedback to the contrary, we can always come back to this! |
Question: What's the use case for unit testing all versions of a model with a single unit test definition? How are the versions changing but the fixtures are staying the same? Answer: You could imagine needing to bump the version of my_model because you’re deprecating a column (breaking the model contract), but you could have a unit test on my_model that’s not related to the column you’re deprecating - so you would expect that unit test to still apply for the new version of the model as well as the older version. The input mock data only needs to be specified for the columns relevant to the specific unit test (not all columns). By having the default be “run this unit test on all version of my_model”, if a new version breaks that unit test you will immediately know about it! |
I'm closing this out in favor of #9344. The spike is complete, the implementation is now. |
Is this your first time submitting a feature request?
Describe the feature
So if I have version 1, 2, and 3 of
my_model
, mytest_is_valid_email_address
unit test will run on all 3 versions.So if I have version 1, 2, and 3 of my_model, my test_is_valid_email_address unit test will run on ONLY version 2.
So if I have version 1, 2, and 3 of my_model, my test_is_valid_email_address unit test will run on ONLY version 2 and 3.
(similar to include & exclude for warn_error_options)
input:
Describe alternatives you've considered
No response
Who will this benefit?
No response
Are you interested in contributing this feature?
No response
Anything else?
The text was updated successfully, but these errors were encountered: