Commit 8563de6d authored by Laurent Peuch's avatar Laurent Peuch
Browse files

fix(qa): handle all requirements.txt files and a file needs to be splited by line

parent abb88a55ee74
Pipeline #17445 passed with stages
in 6 minutes and 13 seconds
......@@ -75,10 +75,12 @@ for number, cube in enumerate(all_cubes):
if PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI in deps:
has_capture_deprecated_warnings = True
elif uses_dev_requirements and "dev-requirements.txt" in cube_files:
requirements = [x.strip().lower() for x in cube.files.get("dev-requirements.txt", ref="branch/default").decode().decode("Utf-8") if not x.strip().startswith("#")]
if PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI in requirements:
has_capture_deprecated_warnings = True
else:
for requirements_file in {x for x in cube_files if "requirements" in x}:
requirements = [x.strip().lower() for x in cube.files.get(requirements_file, ref="branch/default").decode().decode("Utf-8").split("\n") if not x.strip().startswith("#")]
if PYTEST_CAPTURE_DEPRECATEDWARNINGS_PACKAGE_URI in requirements:
has_capture_deprecated_warnings = True
break
else:
has_capture_deprecated_warnings = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment