From 9d5eb0611309976cb2374e989b5cfbd7cb2e2558 Mon Sep 17 00:00:00 2001 From: James Moessis Date: Tue, 25 Jan 2022 17:06:02 +1100 Subject: [PATCH] add extra_yaml_files param and use it in metric_table test --- .../src/tests/semconv/templating/test_markdown.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/semantic-conventions/src/tests/semconv/templating/test_markdown.py b/semantic-conventions/src/tests/semconv/templating/test_markdown.py index 53701861..c1be4977 100644 --- a/semantic-conventions/src/tests/semconv/templating/test_markdown.py +++ b/semantic-conventions/src/tests/semconv/templating/test_markdown.py @@ -124,7 +124,7 @@ def test_event_renamed(self): self.check("markdown/event_renamed/") def test_metric_tables(self): - self.check("markdown/metrics_tables") + self.check("markdown/metrics_tables", extra_yaml_files=["yaml/general.yaml", "yaml/http_metrics.yaml"]) def testSamplingRelevant(self): self.check("markdown/sampling_relevant/") @@ -136,6 +136,7 @@ def check( *, expected_name="expected.md", extra_yaml_dirs: Sequence[str] = (), + extra_yaml_files: Sequence[str] = (), assert_raises=None ) -> Optional[BaseException]: dirpath = Path(self.get_file_path(input_dir)) @@ -151,6 +152,9 @@ def check( for fname in Path(self.get_file_path(extra_dir)).glob("*.yaml"): print("Parsing", fname) semconv.parse(fname) + for fname in map(self.get_file_path, extra_yaml_files): + print("Parsing ", fname) + semconv.parse(fname) semconv.finish()