From b2d971b8c523c8c39e3fe8cd2fd7551a7eaaab1c Mon Sep 17 00:00:00 2001 From: Mark McCormick Date: Wed, 9 Oct 2024 01:14:24 +0100 Subject: [PATCH] Add melange tests Signed-off-by: Mark McCormick --- py3-isodate.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/py3-isodate.yaml b/py3-isodate.yaml index 445e13d987..8248298810 100644 --- a/py3-isodate.yaml +++ b/py3-isodate.yaml @@ -40,3 +40,23 @@ update: github: use-tag: true identifier: gweis/isodate + +test: + environment: + contents: + packages: + - py3-isodate + pipeline: + - name: Verify Installation + runs: | + # Check that the isodate package is installed + python3 -c "import isodate" || exit 1 + echo "isodate package is installed." + - name: Test Basic Date Parsing + runs: | + # Test parsing a simple ISO 8601 date string + python3 -c " + import isodate + dt = isodate.parse_date('2024-10-09') + assert dt.year == 2024 and dt.month == 10 and dt.day == 9 + print('Date parsing passed.')"