예제 #1
0
def test_case_sensitive_int_not_eq_rewritten(inc_man_spec, inc_man_file, val,
                                             expected):
    with pytest.raises(ValidationException):
        assert InclusiveManifestEvaluator(
            inc_man_spec,
            Expressions.not_(Expressions.equal("ID", val)),
            case_sensitive=True).eval(inc_man_file) == expected
예제 #2
0
 def cache_loader(self, spec_id):
     spec = self.ops.current().spec_id(spec_id)
     return InclusiveManifestEvaluator(spec, self.row_filter)
def test_int_gt_eq(inc_man_spec, inc_man_file, val, expected):
    assert InclusiveManifestEvaluator(inc_man_spec,
                                      Expressions.greater_than_or_equal("id", val)).eval(inc_man_file) == expected
def test_int_lt(inc_man_spec, inc_man_file, val, expected):
    assert InclusiveManifestEvaluator(inc_man_spec, Expressions.less_than("id", val)).eval(inc_man_file) == expected
def test_or(inc_man_spec, inc_man_file, expr1, expr2, expected):
    assert InclusiveManifestEvaluator(inc_man_spec, Expressions.or_(expr1, expr2)).eval(inc_man_file) == expected
def test_not(inc_man_spec, inc_man_file, expression, expected):
    assert InclusiveManifestEvaluator(inc_man_spec, Expressions.not_(expression)).eval(inc_man_file) == expected
def test_missing_stats(inc_man_spec, inc_man_file_ns, expression):
    assert InclusiveManifestEvaluator(inc_man_spec, expression).eval(inc_man_file_ns)
def test_missing_column(inc_man_spec, inc_man_file):
    with pytest.raises(ValidationException):
        InclusiveManifestEvaluator(inc_man_spec, Expressions.less_than("missing", 5)).eval(inc_man_file)
def test_no_nulls(inc_man_spec, inc_man_file, expression, expected):
    assert InclusiveManifestEvaluator(inc_man_spec, expression).eval(inc_man_file) == expected
def test_case_insensitive_int_not_eq_rewritten(inc_man_spec, inc_man_file, val, expected):
    assert InclusiveManifestEvaluator(inc_man_spec,
                                      Expressions.not_(Expressions.equal("ID", val)),
                                      case_sensitive=False).eval(inc_man_file) == expected
def test_int_not_eq_rewritten(inc_man_spec, inc_man_file, val, expected):
    assert InclusiveManifestEvaluator(inc_man_spec,
                                      Expressions.not_(Expressions.equal("id", val))).eval(inc_man_file) == expected