Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ git_override(
remote = "https://github.com/cel-expr/cel-spec",
)

# https://registry.bazel.build/modules/cel-conformance
bazel_dep(name = "cel-conformance", version = "0.1.0", repo_name = "cel_conformance")
# TODO(b/582952496): Remove git_override once cel-conformance is published on BCR.
git_override(
module_name = "cel-conformance",
commit = "8d64ec2a2938204e388fc02e8e5102dc8ca16e83",
remote = "https://github.com/cel-expr/cel-conformance",
)

# https://registry.bazel.build/modules/googletest
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", repo_name = "com_google_googletest")

Expand Down
2 changes: 1 addition & 1 deletion cel_expr_python/cel_env_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
from typing import Any

from absl.testing import absltest
from cel.expr.conformance.proto2 import test_all_types_pb2 as test_all_types_pb
from cel_expr_python import cel
from cel_expr_python.ext import ext_bindings
from cel_expr_python.ext import ext_math
from cel_expr_python.ext import ext_optional
from cel_expr_python.ext import ext_strings
from cel.expr.conformance.proto2 import test_all_types_pb2 as test_all_types_pb


class CelEnvTest(absltest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion cel_expr_python/cel_parallel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from typing import Any

from absl.testing import absltest
from cel_expr_python import cel
from cel.expr.conformance.proto2 import test_all_types_pb2 as test_all_types_pb
from cel_expr_python import cel


@dataclasses.dataclass(frozen=True)
Expand Down
7 changes: 3 additions & 4 deletions cel_expr_python/cel_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
from typing import Any

from google.protobuf import message_factory

from google.protobuf import duration_pb2 as duration_pb
from google.protobuf import timestamp_pb2 as timestamp_pb
from absl.testing import absltest
from cel_expr_python import cel
from cel.expr.conformance.proto2 import test_all_types_pb2 as test_all_types_pb
from cel_expr_python import cel


@absltest.skipThisClass("Base class")
Expand Down Expand Up @@ -351,9 +352,7 @@ def testProto(self):
)
# TODO(b/516948297): Fix double to string conversion on macOS and
# revert to self.assertEqual.
self.assertTrue(
res.value().startswith("Hey, CEL! You are a piece of 3.14")
)
self.assertTrue(res.value().startswith("Hey, CEL! You are a piece of 3.14"))

def testProto_unexpectedType(self):
msg = test_all_types_pb.TestAllTypes.NestedMessage
Expand Down
56 changes: 28 additions & 28 deletions conformance/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@ load("@rules_python//python:py_test.bzl", "py_test")
package(default_visibility = ["//visibility:private"])

_ALL_TESTS = [
"@com_google_cel_spec//tests/simple:testdata/basic.textproto",
"@com_google_cel_spec//tests/simple:testdata/bindings_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/comparisons.textproto",
"@com_google_cel_spec//tests/simple:testdata/conversions.textproto",
"@com_google_cel_spec//tests/simple:testdata/dynamic.textproto",
"@com_google_cel_spec//tests/simple:testdata/encoders_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/enums.textproto",
"@com_google_cel_spec//tests/simple:testdata/fields.textproto",
"@com_google_cel_spec//tests/simple:testdata/fp_math.textproto",
"@com_google_cel_spec//tests/simple:testdata/integer_math.textproto",
"@com_google_cel_spec//tests/simple:testdata/lists.textproto",
"@com_google_cel_spec//tests/simple:testdata/lists_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/logic.textproto",
"@com_google_cel_spec//tests/simple:testdata/macros.textproto",
"@com_google_cel_spec//tests/simple:testdata/math_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/namespace.textproto",
"@com_google_cel_spec//tests/simple:testdata/optionals.textproto",
"@com_google_cel_spec//tests/simple:testdata/parse.textproto",
"@com_google_cel_spec//tests/simple:testdata/plumbing.textproto",
"@com_google_cel_spec//tests/simple:testdata/proto2.textproto",
"@com_google_cel_spec//tests/simple:testdata/proto3.textproto",
"@com_google_cel_spec//tests/simple:testdata/proto2_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/string.textproto",
"@com_google_cel_spec//tests/simple:testdata/string_ext.textproto",
"@com_google_cel_spec//tests/simple:testdata/timestamps.textproto",
"@com_google_cel_spec//tests/simple:testdata/type_deduction.textproto",
"@com_google_cel_spec//tests/simple:testdata/unknowns.textproto",
"@com_google_cel_spec//tests/simple:testdata/wrappers.textproto",
"@cel_conformance//tests/simple:testdata/basic.textproto",
"@cel_conformance//tests/simple:testdata/bindings_ext.textproto",
"@cel_conformance//tests/simple:testdata/comparisons.textproto",
"@cel_conformance//tests/simple:testdata/conversions.textproto",
"@cel_conformance//tests/simple:testdata/dynamic.textproto",
"@cel_conformance//tests/simple:testdata/encoders_ext.textproto",
"@cel_conformance//tests/simple:testdata/enums.textproto",
"@cel_conformance//tests/simple:testdata/fields.textproto",
"@cel_conformance//tests/simple:testdata/fp_math.textproto",
"@cel_conformance//tests/simple:testdata/integer_math.textproto",
"@cel_conformance//tests/simple:testdata/lists.textproto",
"@cel_conformance//tests/simple:testdata/lists_ext.textproto",
"@cel_conformance//tests/simple:testdata/logic.textproto",
"@cel_conformance//tests/simple:testdata/macros.textproto",
"@cel_conformance//tests/simple:testdata/math_ext.textproto",
"@cel_conformance//tests/simple:testdata/namespace.textproto",
"@cel_conformance//tests/simple:testdata/optionals.textproto",
"@cel_conformance//tests/simple:testdata/parse.textproto",
"@cel_conformance//tests/simple:testdata/plumbing.textproto",
"@cel_conformance//tests/simple:testdata/proto2.textproto",
"@cel_conformance//tests/simple:testdata/proto3.textproto",
"@cel_conformance//tests/simple:testdata/proto2_ext.textproto",
"@cel_conformance//tests/simple:testdata/string.textproto",
"@cel_conformance//tests/simple:testdata/string_ext.textproto",
"@cel_conformance//tests/simple:testdata/timestamps.textproto",
"@cel_conformance//tests/simple:testdata/type_deduction.textproto",
"@cel_conformance//tests/simple:testdata/unknowns.textproto",
"@cel_conformance//tests/simple:testdata/wrappers.textproto",
]

py_test(
Expand Down
6 changes: 3 additions & 3 deletions testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ py_proto_library(
name = "proto2_test_all_types_py_pb2",
visibility = ["//visibility:public"],
deps = [
"@com_google_cel_spec//proto/cel/expr/conformance/proto2:test_all_types_proto",
"@cel_conformance//proto/cel/expr/conformance/proto2:test_all_types_proto",
],
)

py_proto_library(
name = "proto3_test_all_types_py_pb2",
visibility = ["//visibility:public"],
deps = [
"@com_google_cel_spec//proto/cel/expr/conformance/proto3:test_all_types_proto",
"@cel_conformance//proto/cel/expr/conformance/proto3:test_all_types_proto",
],
)

py_proto_library(
name = "simple_py_pb2",
visibility = ["//visibility:public"],
deps = ["@com_google_cel_spec//proto/cel/expr/conformance/test:simple_proto"],
deps = ["@cel_conformance//proto/cel/expr/conformance/test:simple_proto"],
)
Loading