Skip to content

Commit 00eb3bf

Browse files
author
Steve Ayers
committed
Test re2
1 parent 96329a4 commit 00eb3bf

File tree

4 files changed

+101
-40
lines changed

4 files changed

+101
-40
lines changed

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
cel-python = "==0.2.*"
7+
cel-python = {extras = ["re2"], version = "==0.3.*"}
88
protobuf = "==6.*"
99

1010
[dev-packages]

Pipfile.lock

Lines changed: 97 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/conformance/nonconforming.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ standard_rules/well_known_types/duration:
77
standard_rules/well_known_types/timestamp:
88
- gte_lte/invalid/above
99
- lte/invalid
10+
custom_rules:
11+
# See https://github.com/cloud-custodian/cel-python/issues/113
12+
- runtime/dyn_incorrect_type

tests/validate_test.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import unittest
1616

17-
import celpy
1817
import protovalidate
1918
from gen.tests.example.v1 import validations_pb2
2019

@@ -84,16 +83,3 @@ def test_timestamp(self):
8483

8584
violations = protovalidate.collect_violations(msg)
8685
assert len(violations) == 0
87-
88-
def test_dyn(self):
89-
msg = validations_pb2.DynRuntimeError()
90-
try:
91-
protovalidate.validate(msg)
92-
except celpy.CELEvalError as e:
93-
print("eval" + str(e))
94-
except protovalidate.CompilationError as e:
95-
print("comp" + str(e))
96-
except protovalidate.ValidationError as e:
97-
print("valid" + str(e))
98-
except Exception as e:
99-
print("rando" + str(e))

0 commit comments

Comments
 (0)