Fix mocks for upcoming rcrunch changes #249
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In an upcoming version of rcrunch,
CrunchCube
arrays will contain an attribute that identifies what kind of measure type they are so that calculations likeprop.table()
andbases()
can behave correctly on different kinds of measures (rather than assuming everything is a count, as they do now).This broke one test in crunchtabs because one of the mock fixtures contains
CrunchCube
s without this new attribute. Fortunately, this change is backwards compatible, so it works with both the current version of rcrunch as well as my still-in-development version.As discussed, this PR updates that fixture and also records the code I used to update it. I'm not totally sure the generate_mocks script will scale well for generating all mocks, but it's a start. Let me know if you had something else in mind.