You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/09/01 17:45:43 UTC

[GitHub] [avro] RyanSkraba commented on a diff in pull request #1843: AVRO-3622: Fix compatibility check for schemas having or missing namespace

RyanSkraba commented on code in PR #1843:
URL: https://github.com/apache/avro/pull/1843#discussion_r960941587


##########
lang/py/avro/test/test_schema.py:
##########
@@ -629,6 +641,10 @@ def test_invalid_name(self):
             None,
             None,
         )
+        # A name cannot start with dot."
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, ".a", None, None)
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, "o..a", None, None)
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, ".a", None, None)

Review Comment:
   ```suggestion
           self.assertRaises(avro.errors.InvalidName, avro.schema.Name, "a.", None, None)
   ```
   Looks like this is a repeated test, did you mean to test trailing dots?



##########
lang/py/avro/test/test_schema.py:
##########
@@ -629,6 +641,10 @@ def test_invalid_name(self):
             None,
             None,
         )
+        # A name cannot start with dot."

Review Comment:
   ```suggestion
           # A name cannot start with dot.
   ```



##########
lang/py/avro/test/test_schema.py:
##########
@@ -629,6 +641,10 @@ def test_invalid_name(self):
             None,
             None,
         )
+        # A name cannot start with dot."
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, ".a", None, None)
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, "o..a", None, None)
+        self.assertRaises(avro.errors.InvalidName, avro.schema.Name, ".a", None, None)

Review Comment:
   Repeated test?  How about `"a."` for completeness!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org