Skip to content

Commit

Permalink
Rename plugin test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jopel committed Oct 28, 2024
1 parent 37ffa2f commit 10b5865
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_protoc_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
# Import into globals() so generated code string can be compiled
from snowflake.telemetry._internal.serialize import ProtoSerializer, Enum

class TestCompile(unittest.TestCase):
class TestProtocPlugin(unittest.TestCase):
def namespace_serialize_message(self, message_type: str, local_namespace: dict, **kwargs) -> bytes:
assert message_type in local_namespace, f"Message type {message_type} not found in local namespace"
return local_namespace[message_type](**kwargs)

def test_compile(self):
def test_protoc_plugin(self):
with tempfile.NamedTemporaryFile(suffix=".proto", mode="w", delete=False) as proto_file:
# Define a simple proto file
proto_file.write(
Expand Down Expand Up @@ -88,4 +88,4 @@ def test_compile(self):
local_namespace = {}
eval(compile(generated_code, generated_code_file, "exec"), globals(), local_namespace)

self.assertEquals(b'\n\x04test', self.namespace_serialize_message("AnyValue", local_namespace, string_value="test"))
self.assertEqual(b'\n\x04test', self.namespace_serialize_message("AnyValue", local_namespace, string_value="test"))

0 comments on commit 10b5865

Please sign in to comment.