From b412ee5e2452e9c4fadf5b2472f24659be0951c1 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas.kluyver@xfel.eu>
Date: Thu, 20 Jun 2024 17:01:29 +0100
Subject: [PATCH] Check markdown table creation in tests

---
 tests/test_calcat_interface2.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/test_calcat_interface2.py b/tests/test_calcat_interface2.py
index ca84e3a5c..8c1978967 100644
--- a/tests/test_calcat_interface2.py
+++ b/tests/test_calcat_interface2.py
@@ -1,5 +1,6 @@
 import numpy as np
 import pytest
+import re
 import xarray as xr
 
 from cal_tools.calcat_interface2 import (
@@ -36,6 +37,10 @@ def test_AGIPD_CalibrationData_metadata():
     assert isinstance(agipd_cd["Offset", "AGIPD00"], SingleConstant)
     assert agipd_cd["Offset", "Q1M2"] == agipd_cd["Offset", "AGIPD01"]
 
+    assert re.search(
+        r"\[2022-\d{2}-\d{2} \d{2}:\d{2}\]\(https://in.xfel.eu/", agipd_cd.markdown_table()
+    )
+
 
 @pytest.mark.requires_gpfs
 def test_AGIPD_merge():
-- 
GitLab