From 883c27e99145967fe48cb8ff9c86279867f08c7c Mon Sep 17 00:00:00 2001 From: Niloth P <20315308+Niloth-p@users.noreply.github.com> Date: Sun, 1 Jun 2025 14:38:31 +0530 Subject: [PATCH] test_docs: Add support for excluding certain integration screenshots. The integration doc and the screenshot images are in different repos. So, we cannot avoid going out of sync when adding or deleting image files. Added a new set to allow temporarily adding exclusions to the `test_integration_doc_endpoints` test. --- zerver/tests/test_docs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index c5e10b52f8..85cbced370 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -413,6 +413,14 @@ class DocPageTest(ZulipTestCase): not in (image_path := os.path.relpath(os.path.join(root, file), directory)) } + # The integration docs and the screenshot images are in different repos + # for the PythonAPIIntegrations, so we cannot avoid going out of sync + # when adding/deleting screenshots. + # Use this set to temporarily add exclusions to this test. + exception_images: set[str] = {} + images_in_dir.update(exception_images) + images_in_docs.update(exception_images) + self.assertEqual( images_in_dir, images_in_docs,