diff --git a/semantic-conventions/src/tests/semconv/model/test_error_detection.py b/semantic-conventions/src/tests/semconv/model/test_error_detection.py index 45845a30..226842ce 100644 --- a/semantic-conventions/src/tests/semconv/model/test_error_detection.py +++ b/semantic-conventions/src/tests/semconv/model/test_error_detection.py @@ -454,16 +454,14 @@ def test_nameless_event(self): def test_condition_missing_conditionally_required_attribute(self): with self.assertRaises(ValidationError) as ex: self.open_yaml("yaml/errors/wrong_conditionally_required_no_condition.yaml") - self.fail() e = ex.exception msg = e.message.lower() self.assertIn("missing message for conditionally required field!", msg) self.assertEqual(e.line, 11) def test_multiple_requirement_levels(self): - with self.assertRaises(DuplicateKeyError) as ex: + with self.assertRaises(DuplicateKeyError): self.open_yaml("yaml/errors/wrong_multiple_requirement_levels.yaml") - self.fail() def open_yaml(self, path): with open(self.load_file(path), encoding="utf-8") as file: diff --git a/semantic-conventions/syntax.md b/semantic-conventions/syntax.md index a55b00b3..f99dee09 100644 --- a/semantic-conventions/syntax.md +++ b/semantic-conventions/syntax.md @@ -87,7 +87,7 @@ member ::= id value [brief] [note] requirement_level ::= "required" | "conditionally_required" - | "recommended" # Default if not specified + | "recommended" [condition] # Default if not specified | "optional" # EXPERIMENTAL: Using this is NOT ALLOWED in the specification currently.