{
  "expectation_type" : "expect_column_value_lengths_to_equal",
  "datasets" : [{
    "data" : {
      "s1":["smart","silly","sassy","slimy","sexy"],
      "s2":["cool","calm","collected","casual","creepy"],
      "s3":["cool","calm","collected","casual", null],
      "equal_length_integer":[1,2,3,4,5],
      "equal_length_string":["a", "b", "c", "d", "e"]
    },
    "tests": [{
      "title": "Positive test, String, one character length",
      "exact_match_out" : false,
      "in":{
        "column": "equal_length_string",
        "value": 1
      },
      "out":{
        "success":true,
        "unexpected_index_list": [],
        "unexpected_list": []
      }
    },{
      "title": "Negative test, String, value is 1 too high",
      "exact_match_out" : false,
      "in":{
        "column": "equal_length_string",
        "value": 2
      },
      "out":{
        "success":false,
        "unexpected_index_list": [0, 1, 2, 3, 4],
        "unexpected_list": ["a", "b", "c", "d", "e"]
      }
    },{
      "title": "Positive test with missing value in column, mostly",
      "exact_match_out" : false,
      "in":{
        "column": "s3",
        "value": 4,
        "mostly": 0.5
      },
      "out":{
        "success": true,
        "unexpected_index_list": [2, 3],
        "unexpected_list": ["collected", "casual"]
      }
    },{
      "title": "Negative, one length too small",
      "exact_match_out" : false,
      "in":{
        "column": "s1",
        "value": 5
      },
      "out" : {
        "success": false,
        "unexpected_index_list": [4],
        "unexpected_list": ["sexy"]
      }
    },{
      "title": "Positive, one length too small, mostly",
      "exact_match_out" : false,
      "in":{
        "column": "s1",
        "value": 5,
        "mostly": 0.8
      },
      "out" : {
        "success": true,
        "unexpected_index_list": [4],
        "unexpected_list": ["sexy"]
      }
    },{
      "title": "Positive test, integer, length = 1",
      "exact_match_out" : false,
      "in":{
        "column": "equal_length_integer",
        "value": 1,
        "catch_exceptions": true
      },
      "out": {},
      "traceback_substring": "TypeError: object of type 'int' has no len()"
    },{
      "title": "test_conditional_expectation_passes",
      "only_for": ["pandas"],
      "exact_match_out" : false,
      "in":{
        "column": "s1",
        "value": 4,
        "catch_exceptions": true,
        "row_condition": "(equal_length_integer == 5) & (equal_length_string == 'e')",
        "condition_parser": "pandas"
      },
      "out" : {
        "success":true,
        "unexpected_index_list": [],
        "unexpected_list": []
      }
    },{
      "title": "test_conditional_expectation_fails",
      "only_for": ["pandas"],
      "exact_match_out" : false,
      "in":{
        "column": "s1",
        "value": 4,
        "catch_exceptions": true,
        "row_condition": "(equal_length_integer == 4) & (equal_length_string == 'd')",
        "condition_parser": "pandas"
      },
      "out" : {
        "success": false,
        "unexpected_index_list": [0],
        "unexpected_list": ["slimy"]
      }
    },{
      "title": "test_conditional_expectation_parser_errors",
      "only_for": ["pandas"],
      "exact_match_out" : false,
      "in":{
        "column": "s1",
        "value": 4,
        "catch_exceptions": true,
        "row_condition": "(equal_length_integer == 4) & (equal_length_string == 'd')",
        "condition_parser": "bad_parser"
      },
      "out" : {
        "traceback_substring": "must be 'python' or 'pandas'"
      }
    }]
  }]
}
