Test: location column has all expected, sequential values #10
Please read how to create a new test if you're interested in writing this test.
All US cities, counties, or states if the 3/4s of the cells make a complete list
Assumptions: Is 3/4s a suitable cut-off? Should it be higher or lower?
@geraldarthur Can you explain the 3/4s concept a little more? Not sure what you mean
My initial thinking was we'd have the test only run if it looks like a column labeled state has most of the 50 states. But with test toggles, we can let the user select when they do and don't want to run that test.
Next steps here would be to write up a test that checks a column name state and see if it can detect any missing states.
Summary
Took a first stab at this. Need to QA it a bit more @ejfox @enjalot. Could you look over my logic and help me poke holes in this?
Inputs
Basically, I've formatted the test so there's an area for folks to add/remove lists of things to check against. This may come in handy in later versions if user input becomes a feature.
Methdology
For now, the test counts up the occurrences of each state's name, postal code, or ap abbreviation in any column labeled state. If any count is exactly 0 after it gets done looping, the test will fail.
How could it be different?
- Counts work regardless of the format. Right now i'm assuming a column won't switch between full names and abbreviations
- Logic could be DRY'd out a bit.
Next steps
Can you look over this and give me a :+1: or :-1:?