From 72cecc220d2c012bdb50e1a10e1ac27b715978b8 Mon Sep 17 00:00:00 2001
From: ayushnag <35325113+ayushnag@users.noreply.github.com>
Date: Wed, 6 Nov 2024 17:01:16 -0800
Subject: [PATCH] add dedent() to pytest fixtures
---
virtualizarr/tests/test_readers/test_dmrpp.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/virtualizarr/tests/test_readers/test_dmrpp.py b/virtualizarr/tests/test_readers/test_dmrpp.py
index 598d0e1c..cbafc40f 100644
--- a/virtualizarr/tests/test_readers/test_dmrpp.py
+++ b/virtualizarr/tests/test_readers/test_dmrpp.py
@@ -1,3 +1,4 @@
+import textwrap
from pathlib import Path
from xml.etree import ElementTree as ET
@@ -22,7 +23,8 @@
@pytest.fixture
def basic_dmrpp() -> DMRParser:
- xml_str = """
+ xml_str = """\
+
@@ -109,12 +111,13 @@ def basic_dmrpp() -> DMRParser:
"""
- return DMRParser(root=ET.fromstring(xml_str))
+ return DMRParser(root=ET.fromstring(textwrap.dedent(xml_str)))
@pytest.fixture
def nested_groups_dmrpp() -> DMRParser:
- xml_str = """
+ xml_str = """\
+
@@ -163,7 +166,7 @@ def nested_groups_dmrpp() -> DMRParser:
"""
- return DMRParser(root=ET.fromstring(xml_str))
+ return DMRParser(root=ET.fromstring(textwrap.dedent(xml_str)))
@network