From 80eacf34ca575c0c458fef845a046d76d2cd1b33 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Fri, 3 Jun 2022 17:16:01 +0200 Subject: [PATCH] Don't fail tests when xmlschema is missing --- tests/junit/validate_junit.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/junit/validate_junit.py b/tests/junit/validate_junit.py index c1c0573..1999551 100644 --- a/tests/junit/validate_junit.py +++ b/tests/junit/validate_junit.py @@ -1,4 +1,13 @@ -from xmlschema import XMLSchema, XMLSchemaValidationError +try: + from xmlschema import XMLSchema, XMLSchemaValidationError +except ImportError: + import os + if "NOSKIP" not in os.environ.get("MAKEFLAGS", ""): + print() + print("SKIPPING python library xmlschema not found, skipping JUnit output validation") + print() + exit(0) + import argparse def main(): -- 2.30.2